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: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
Shuduo Sang 2021-03-22 18:44:06 +08:00 committed by GitHub
parent 2c19f443f5
commit 835886d11e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ enum TEST_MODE {
#define MAX_DATABASE_COUNT 256
#define INPUT_BUF_LEN 256
#define DEFAULT_TIMESTAMP_STEP 10
#define DEFAULT_TIMESTAMP_STEP 1
typedef enum CREATE_SUB_TALBE_MOD_EN {
PRE_CREATE_SUBTBL,
@ -4519,7 +4519,6 @@ static void* syncWriteInterlace(threadInfo *pThreadInfo) {
pstr += dataLen;
recOfBatch += batchPerTbl;
startTime += batchPerTbl * superTblInfo->timeStampStep;
pThreadInfo->totalInsertRows += batchPerTbl;
verbosePrint("[%d] %s() LN%d batchPerTbl=%d recOfBatch=%d\n",
@ -4530,6 +4529,7 @@ static void* syncWriteInterlace(threadInfo *pThreadInfo) {
if (insertMode == INTERLACE_INSERT_MODE) {
if (tableSeq == pThreadInfo->start_table_from + pThreadInfo->ntables) {
// turn to first table
startTime += batchPerTbl * superTblInfo->timeStampStep;
tableSeq = pThreadInfo->start_table_from;
generatedRecPerTbl += batchPerTbl;
flagSleep = true;