Hotfix/sangshuduo/td 5136 taosdemo rework for master (#7433)

* cherry pick from develop branch.

* [TD-5136]<feature>: taosdemo simulate real senario.

* update test case according to taosdemo change

* adjust range of semi-random data.

* make demo mode use different tag name and value.

* change malloc to calloc for pid allocation.

* fix typo.

* fix binary length default value and group id logic.

Co-authored-by: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
Shuduo Sang 2021-08-18 16:12:36 +08:00 committed by GitHub
parent 4da75f91ab
commit ffcc93016a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -626,7 +626,7 @@ SArguments g_args = {
"INT", // datatype
"FLOAT", // datatype. DEFAULT_DATATYPE_NUM is 3
},
16, // len_of_binary
64, // len_of_binary
4, // num_of_CPR
10, // num_of_connections/thread
0, // insert_interval
@ -2598,7 +2598,7 @@ static char* generateTagValuesForStb(SSuperTable* stbInfo, int64_t tableSeq) {
if ((g_args.demo_mode) && (i == 0)) {
dataLen += snprintf(dataBuf + dataLen,
TSDB_MAX_SQL_LEN - dataLen,
"%"PRId64",", tableSeq % 10);
"%"PRId64",", (tableSeq % 10) + 1);
} else {
dataLen += snprintf(dataBuf + dataLen,
TSDB_MAX_SQL_LEN - dataLen,