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

Feature/sangshuduo/td 5136 taosdemo rework (#7432)

* [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: NShuduo Sang <sdsang@taosdata.com>
上级 fa9f76fc
...@@ -626,7 +626,7 @@ SArguments g_args = { ...@@ -626,7 +626,7 @@ SArguments g_args = {
"INT", // datatype "INT", // datatype
"FLOAT", // datatype. DEFAULT_DATATYPE_NUM is 3 "FLOAT", // datatype. DEFAULT_DATATYPE_NUM is 3
}, },
16, // len_of_binary 64, // len_of_binary
4, // num_of_CPR 4, // num_of_CPR
10, // num_of_connections/thread 10, // num_of_connections/thread
0, // insert_interval 0, // insert_interval
...@@ -2600,7 +2600,7 @@ static char* generateTagValuesForStb(SSuperTable* stbInfo, int64_t tableSeq) { ...@@ -2600,7 +2600,7 @@ static char* generateTagValuesForStb(SSuperTable* stbInfo, int64_t tableSeq) {
if ((g_args.demo_mode) && (i == 0)) { if ((g_args.demo_mode) && (i == 0)) {
dataLen += snprintf(dataBuf + dataLen, dataLen += snprintf(dataBuf + dataLen,
TSDB_MAX_SQL_LEN - dataLen, TSDB_MAX_SQL_LEN - dataLen,
"%"PRId64",", tableSeq % 10); "%"PRId64",", (tableSeq % 10) + 1);
} else { } else {
dataLen += snprintf(dataBuf + dataLen, dataLen += snprintf(dataBuf + dataLen,
TSDB_MAX_SQL_LEN - dataLen, TSDB_MAX_SQL_LEN - dataLen,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册