未验证 提交 835886d1 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

Hotfix/sangshuduo/td 3393 taosdemo timestamp rework (#5531)

* [TD-3393] <fix>: taosdemo timestamp rework.

change default timestamp step to 1ms.

* [TD-3393] <fix>: taosdemo timestamp rework.

adjust shift timestamp logic to table sequence turn to start.
Co-authored-by: NShuduo Sang <sdsang@taosdata.com>
上级 2c19f443
...@@ -92,7 +92,7 @@ enum TEST_MODE { ...@@ -92,7 +92,7 @@ enum TEST_MODE {
#define MAX_DATABASE_COUNT 256 #define MAX_DATABASE_COUNT 256
#define INPUT_BUF_LEN 256 #define INPUT_BUF_LEN 256
#define DEFAULT_TIMESTAMP_STEP 10 #define DEFAULT_TIMESTAMP_STEP 1
typedef enum CREATE_SUB_TALBE_MOD_EN { typedef enum CREATE_SUB_TALBE_MOD_EN {
PRE_CREATE_SUBTBL, PRE_CREATE_SUBTBL,
...@@ -4519,7 +4519,6 @@ static void* syncWriteInterlace(threadInfo *pThreadInfo) { ...@@ -4519,7 +4519,6 @@ static void* syncWriteInterlace(threadInfo *pThreadInfo) {
pstr += dataLen; pstr += dataLen;
recOfBatch += batchPerTbl; recOfBatch += batchPerTbl;
startTime += batchPerTbl * superTblInfo->timeStampStep;
pThreadInfo->totalInsertRows += batchPerTbl; pThreadInfo->totalInsertRows += batchPerTbl;
verbosePrint("[%d] %s() LN%d batchPerTbl=%d recOfBatch=%d\n", verbosePrint("[%d] %s() LN%d batchPerTbl=%d recOfBatch=%d\n",
...@@ -4530,6 +4529,7 @@ static void* syncWriteInterlace(threadInfo *pThreadInfo) { ...@@ -4530,6 +4529,7 @@ static void* syncWriteInterlace(threadInfo *pThreadInfo) {
if (insertMode == INTERLACE_INSERT_MODE) { if (insertMode == INTERLACE_INSERT_MODE) {
if (tableSeq == pThreadInfo->start_table_from + pThreadInfo->ntables) { if (tableSeq == pThreadInfo->start_table_from + pThreadInfo->ntables) {
// turn to first table // turn to first table
startTime += batchPerTbl * superTblInfo->timeStampStep;
tableSeq = pThreadInfo->start_table_from; tableSeq = pThreadInfo->start_table_from;
generatedRecPerTbl += batchPerTbl; generatedRecPerTbl += batchPerTbl;
flagSleep = true; flagSleep = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册