Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
ba090e22
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ba090e22
编写于
7月 12, 2021
作者:
haoranc
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of github.com:taosdata/TDengine into dev/chr
上级
0ef4ef05
4486cae1
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
1742 addition
and
1664 deletion
+1742
-1664
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+1739
-1661
tests/pytest/tools/taosdemoTest.py
tests/pytest/tools/taosdemoTest.py
+1
-1
tests/pytest/tools/taosdemoTestTblAlt.py
tests/pytest/tools/taosdemoTestTblAlt.py
+1
-1
tests/pytest/tools/taosdemoTestWithoutMetric.py
tests/pytest/tools/taosdemoTestWithoutMetric.py
+1
-1
未找到文件。
src/kit/taosdemo/taosdemo.c
浏览文件 @
ba090e22
...
...
@@ -236,6 +236,7 @@ typedef struct SArguments_S {
char
**
arg_list
;
uint64_t
totalInsertRows
;
uint64_t
totalAffectedRows
;
bool
demo_mode
;
// use default column name and semi-random data
}
SArguments
;
typedef
struct
SColumn_S
{
...
...
@@ -552,6 +553,8 @@ static int postProceSql(char *host, struct sockaddr_in *pServAddr,
uint16_t
port
,
char
*
sqlstr
,
threadInfo
*
pThreadInfo
);
static
int64_t
getTSRandTail
(
int64_t
timeStampStep
,
int32_t
seq
,
int
disorderRatio
,
int
disorderRange
);
static
bool
getInfoFromJsonFile
(
char
*
file
);
static
void
init_rand_data
();
/* ************ Global variables ************ */
...
...
@@ -569,16 +572,16 @@ SArguments g_args = {
6030
,
// port
TAOSC_IFACE
,
// iface
"root"
,
// user
#ifdef _TD_POWER_
#ifdef _TD_POWER_
"powerdb"
,
// password
#elif (_TD_TQ_ == true)
#elif (_TD_TQ_ == true)
"tqueue"
,
// password
#else
#else
"taosdata"
,
// password
#endif
#endif
"test"
,
// database
1
,
// replica
"t
"
,
// tb_prefix
"d
"
,
// tb_prefix
NULL
,
// sqlFile
true
,
// use_metric
true
,
// drop_database
...
...
@@ -590,10 +593,9 @@ SArguments g_args = {
"./output.txt"
,
// output_file
0
,
// mode : sync or async
{
"FLOAT"
,
// datatype
"INT"
,
// datatype
"INT"
,
// datatype
"INT"
,
// datatype
"INT"
,
// datatype
"FLOAT"
,
// datatype
},
16
,
// len_of_binary
4
,
// num_of_CPR
...
...
@@ -609,7 +611,10 @@ SArguments g_args = {
0
,
// disorderRatio
1000
,
// disorderRange
1
,
// method_of_delete
NULL
// arg_list
NULL
,
// arg_list
0
,
// totalInsertRows;
0
,
// totalAffectedRows;
true
,
// demo_mode;
};
...
...
@@ -709,7 +714,7 @@ static void printHelp() {
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-a"
,
indent
,
"Set the replica parameters of the database, Default 1, min: 1, max: 3."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-m"
,
indent
,
"Table prefix name. Default is 't
'."
);
"Table prefix name. Default is 'd
'."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-s"
,
indent
,
"The select sql file."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-N"
,
indent
,
"Use normal table flag."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-o"
,
indent
,
...
...
@@ -717,11 +722,11 @@ static void printHelp() {
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-q"
,
indent
,
"Query mode -- 0: SYNC, 1: ASYNC. Default is SYNC."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-b"
,
indent
,
"The data_type of columns, default: INT,INT,INT,IN
T."
);
"The data_type of columns, default: FLOAT, INT, FLOA
T."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-w"
,
indent
,
"The length of data_type 'BINARY' or 'NCHAR'. Default is 16"
);
printf
(
"%s%s%s%s%d
\n
"
,
indent
,
"-l"
,
indent
,
"The number of columns per record. Default is 4
. Max values is "
,
"The number of columns per record. Default is 3
. Max values is "
,
MAX_NUM_DATATYPE
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-T"
,
indent
,
"The number of threads. Default is 10."
);
...
...
@@ -733,6 +738,10 @@ static void printHelp() {
"The number of tables. Default is 10000."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-n"
,
indent
,
"The number of records per table. Default is 10000."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-M"
,
indent
,
"The value of records generated are totally random."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
indent
,
indent
,
" The default is to simulate power equipment senario."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-x"
,
indent
,
"Not insert only flag."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-y"
,
indent
,
"Default input yes for prompt."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"-O"
,
indent
,
...
...
@@ -745,8 +754,8 @@ static void printHelp() {
"Print version info."
);
printf
(
"%s%s%s%s
\n
"
,
indent
,
"--help
\t
"
,
indent
,
"Print command line arguments list info."
);
/* printf("%s%s%s%s\n", indent, "-D", indent,
"
if
elete database if exists. 0: no, 1: yes, default is 1");
/* printf("%s%s%s%s\n", indent, "-D", indent,
"
D
elete database if exists. 0: no, 1: yes, default is 1");
*/
}
...
...
@@ -769,6 +778,7 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
for
(
int
i
=
1
;
i
<
argc
;
i
++
)
{
if
(
strcmp
(
argv
[
i
],
"-f"
)
==
0
)
{
arguments
->
demo_mode
=
false
;
arguments
->
metaFile
=
argv
[
++
i
];
}
else
if
(
strcmp
(
argv
[
i
],
"-c"
)
==
0
)
{
if
(
argc
==
i
+
1
)
{
...
...
@@ -911,6 +921,7 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
}
arguments
->
database
=
argv
[
++
i
];
}
else
if
(
strcmp
(
argv
[
i
],
"-l"
)
==
0
)
{
arguments
->
demo_mode
=
false
;
if
(
argc
==
i
+
1
)
{
if
(
!
isStringNumber
(
argv
[
i
+
1
]))
{
printHelp
();
...
...
@@ -931,6 +942,7 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
}
}
else
if
(
strcmp
(
argv
[
i
],
"-b"
)
==
0
)
{
arguments
->
demo_mode
=
false
;
if
(
argc
==
i
+
1
)
{
printHelp
();
errorPrint
(
"%s"
,
"
\n\t
-b need valid string following!
\n
"
);
...
...
@@ -1000,6 +1012,8 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
arguments
->
tb_prefix
=
argv
[
++
i
];
}
else
if
(
strcmp
(
argv
[
i
],
"-N"
)
==
0
)
{
arguments
->
use_metric
=
false
;
}
else
if
(
strcmp
(
argv
[
i
],
"-M"
)
==
0
)
{
arguments
->
demo_mode
=
false
;
}
else
if
(
strcmp
(
argv
[
i
],
"-x"
)
==
0
)
{
arguments
->
insert_only
=
false
;
}
else
if
(
strcmp
(
argv
[
i
],
"-y"
)
==
0
)
{
...
...
@@ -1133,8 +1147,6 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
}
}
static
bool
getInfoFromJsonFile
(
char
*
file
);
static
void
init_rand_data
();
static
void
tmfclose
(
FILE
*
fp
)
{
if
(
NULL
!=
fp
)
{
fclose
(
fp
);
...
...
@@ -1231,7 +1243,8 @@ static void fetchResult(TAOS_RES *res, threadInfo* pThreadInfo) {
//printf("query result:%s\n", temp);
memcpy
(
databuf
+
totalLen
,
temp
,
len
);
totalLen
+=
len
;
verbosePrint
(
"%s() LN%d, totalLen: %"
PRId64
"
\n
"
,
__func__
,
__LINE__
,
totalLen
);
verbosePrint
(
"%s() LN%d, totalLen: %"
PRId64
"
\n
"
,
__func__
,
__LINE__
,
totalLen
);
}
verbosePrint
(
"%s() LN%d, databuf=%s resultFile=%s
\n
"
,
...
...
@@ -1314,6 +1327,27 @@ static float rand_float(){
return
randfloat
[
cursor
];
}
static
float
demo_current_float
(){
static
int
cursor
;
cursor
++
;
cursor
=
cursor
%
MAX_PREPARED_RAND
;
return
(
float
)(
5
+
randfloat
[
cursor
]
/
1000000000
);
}
static
int32_t
demo_voltage_int
(){
static
int
cursor
;
cursor
++
;
cursor
=
cursor
%
MAX_PREPARED_RAND
;
return
210
+
randint
[
cursor
]
%
20
;
}
static
float
demo_phase_float
(){
static
int
cursor
;
cursor
++
;
cursor
=
cursor
%
MAX_PREPARED_RAND
;
return
(
float
)(
120
+
randfloat
[
cursor
]
/
1000000000
);
}
#if 0
static const char charNum[] = "0123456789";
...
...
@@ -1351,7 +1385,6 @@ static double rand_double() {
cursor
++
;
cursor
=
cursor
%
MAX_PREPARED_RAND
;
return
randdouble
[
cursor
];
}
static
void
init_rand_data
()
{
...
...
@@ -1386,6 +1419,11 @@ static void init_rand_data() {
static
int
printfInsertMeta
()
{
SHOW_PARSE_RESULT_START
();
if
(
g_args
.
demo_mode
)
printf
(
"
\n
taosdemo is simulating data generated by power equipments monitoring...
\n\n
"
);
else
printf
(
"
\n
taosdemo is simulating random data as you request..
\n\n
"
);
printf
(
"interface:
\033
[33m%s
\033
[0m
\n
"
,
(
g_args
.
iface
==
TAOSC_IFACE
)
?
"taosc"
:
(
g_args
.
iface
==
REST_IFACE
)
?
"rest"
:
"stmt"
);
printf
(
"host:
\033
[33m%s:%u
\033
[0m
\n
"
,
...
...
@@ -1519,7 +1557,7 @@ static int printfInsertMeta() {
}
printf
(
" insertRows:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
insertRows
);
/*
/*
if (0 == g_Dbs.db[i].superTbls[j].multiThreadWriteOneTbl) {
printf(" multiThreadWriteOneTbl: \033[33mno\033[0m\n");
}else {
...
...
@@ -1707,7 +1745,7 @@ static void printfInsertMetaToFile(FILE* fp) {
fprintf
(
fp
,
" stable insert interval: %"
PRIu64
"
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
insertInterval
);
}
/*
/*
if (0 == g_Dbs.db[i].superTbls[j].multiThreadWriteOneTbl) {
fprintf(fp, " multiThreadWriteOneTbl: no\n");
}else {
...
...
@@ -1863,7 +1901,7 @@ static char* formatTimestamp(char* buf, int64_t val, int precision) {
tt
=
(
time_t
)(
val
/
1000
);
}
/* comment out as it make testcases like select_with_tags.sim fail.
/* comment out as it make testcases like select_with_tags.sim fail.
but in windows, this may cause the call to localtime crash if tt < 0,
need to find a better solution.
if (tt < 0) {
...
...
@@ -1943,7 +1981,8 @@ static int xDumpResultToFile(const char* fname, TAOS_RES* tres) {
FILE
*
fp
=
fopen
(
fname
,
"at"
);
if
(
fp
==
NULL
)
{
errorPrint
(
"%s() LN%d, failed to open file: %s
\n
"
,
__func__
,
__LINE__
,
fname
);
errorPrint
(
"%s() LN%d, failed to open file: %s
\n
"
,
__func__
,
__LINE__
,
fname
);
return
-
1
;
}
...
...
@@ -1966,7 +2005,8 @@ static int xDumpResultToFile(const char* fname, TAOS_RES* tres) {
if
(
i
>
0
)
{
fputc
(
','
,
fp
);
}
xDumpFieldToFile
(
fp
,
(
const
char
*
)
row
[
i
],
fields
+
i
,
length
[
i
],
precision
);
xDumpFieldToFile
(
fp
,
(
const
char
*
)
row
[
i
],
fields
+
i
,
length
[
i
],
precision
);
}
fputc
(
'\n'
,
fp
);
...
...
@@ -1988,7 +2028,8 @@ static int getDbFromServer(TAOS * taos, SDbInfo** dbInfos) {
int32_t
code
=
taos_errno
(
res
);
if
(
code
!=
0
)
{
errorPrint
(
"failed to run <show databases>, reason: %s
\n
"
,
taos_errstr
(
res
));
errorPrint
(
"failed to run <show databases>, reason: %s
\n
"
,
taos_errstr
(
res
));
return
-
1
;
}
...
...
@@ -2318,8 +2359,10 @@ static char* generateTagVaulesForStb(SSuperTable* stbInfo, int32_t tableSeq) {
int
dataLen
=
0
;
dataLen
+=
snprintf
(
dataBuf
+
dataLen
,
TSDB_MAX_SQL_LEN
-
dataLen
,
"("
);
for
(
int
i
=
0
;
i
<
stbInfo
->
tagCount
;
i
++
)
{
if
((
0
==
strncasecmp
(
stbInfo
->
tags
[
i
].
dataType
,
"binary"
,
strlen
(
"binary"
)))
||
(
0
==
strncasecmp
(
stbInfo
->
tags
[
i
].
dataType
,
"nchar"
,
strlen
(
"nchar"
))))
{
if
((
0
==
strncasecmp
(
stbInfo
->
tags
[
i
].
dataType
,
"binary"
,
strlen
(
"binary"
)))
||
(
0
==
strncasecmp
(
stbInfo
->
tags
[
i
].
dataType
,
"nchar"
,
strlen
(
"nchar"
))))
{
if
(
stbInfo
->
tags
[
i
].
dataLen
>
TSDB_MAX_BINARY_LEN
)
{
printf
(
"binary or nchar length overflow, max size:%u
\n
"
,
(
uint32_t
)
TSDB_MAX_BINARY_LEN
);
...
...
@@ -2664,13 +2707,20 @@ static int createSuperTable(
superTbl
->
columns
[
colIndex
].
dataLen
);
lenOfOneRow
+=
superTbl
->
columns
[
colIndex
].
dataLen
+
3
;
}
else
if
(
strcasecmp
(
dataType
,
"INT"
)
==
0
)
{
if
((
g_args
.
demo_mode
)
&&
(
colIndex
==
1
))
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", VOLTAGE INT"
);
}
else
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col%d %s"
,
colIndex
,
"INT"
);
}
lenOfOneRow
+=
11
;
}
else
if
(
strcasecmp
(
dataType
,
"BIGINT"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col%d %s"
,
colIndex
,
"BIGINT"
);
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col%d %s"
,
colIndex
,
"BIGINT"
);
lenOfOneRow
+=
21
;
}
else
if
(
strcasecmp
(
dataType
,
"SMALLINT"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col%d %s"
,
colIndex
,
"SMALLINT"
);
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col%d %s"
,
colIndex
,
"SMALLINT"
);
lenOfOneRow
+=
6
;
}
else
if
(
strcasecmp
(
dataType
,
"TINYINT"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col%d %s"
,
colIndex
,
"TINYINT"
);
...
...
@@ -2679,13 +2729,24 @@ static int createSuperTable(
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col%d %s"
,
colIndex
,
"BOOL"
);
lenOfOneRow
+=
6
;
}
else
if
(
strcasecmp
(
dataType
,
"FLOAT"
)
==
0
)
{
if
(
g_args
.
demo_mode
)
{
if
(
colIndex
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", CURRENT FLOAT"
);
}
else
if
(
colIndex
==
2
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", PHASE FLOAT"
);
}
}
else
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col%d %s"
,
colIndex
,
"FLOAT"
);
}
lenOfOneRow
+=
22
;
}
else
if
(
strcasecmp
(
dataType
,
"DOUBLE"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col%d %s"
,
colIndex
,
"DOUBLE"
);
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col%d %s"
,
colIndex
,
"DOUBLE"
);
lenOfOneRow
+=
42
;
}
else
if
(
strcasecmp
(
dataType
,
"TIMESTAMP"
)
==
0
)
{
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col%d %s"
,
colIndex
,
"TIMESTAMP"
);
len
+=
snprintf
(
cols
+
len
,
STRING_LEN
-
len
,
", col%d %s"
,
colIndex
,
"TIMESTAMP"
);
lenOfOneRow
+=
21
;
}
else
{
taos_close
(
taos
);
...
...
@@ -2696,7 +2757,6 @@ static int createSuperTable(
}
superTbl
->
lenOfOneRow
=
lenOfOneRow
+
20
;
// timestamp
//printf("%s.%s column count:%d, column length:%d\n\n", g_Dbs.db[i].dbName, g_Dbs.db[i].superTbl[j].sTblName, g_Dbs.db[i].superTbl[j].columnCount, lenOfOneRow);
// save for creating child table
superTbl
->
colsOfCreateChildTable
=
(
char
*
)
calloc
(
len
+
20
,
1
);
...
...
@@ -4746,15 +4806,16 @@ static void postFreeResource() {
static
int
getRowDataFromSample
(
char
*
dataBuf
,
int64_t
maxLen
,
int64_t
timestamp
,
SSuperTable
*
superTblInfo
,
int64_t
*
sampleUsePos
)
{
SSuperTable
*
superTblInfo
,
int64_t
*
sampleUsePos
)
{
if
((
*
sampleUsePos
)
==
MAX_SAMPLES_ONCE_FROM_FILE
)
{
/* int ret = readSampleFromCsvFileToMem(superTblInfo);
/* int ret = readSampleFromCsvFileToMem(superTblInfo);
if (0 != ret) {
tmfree(superTblInfo->sampleDataBuf);
superTblInfo->sampleDataBuf = NULL;
return -1;
}
*/
*/
*
sampleUsePos
=
0
;
}
...
...
@@ -4763,7 +4824,9 @@ static int getRowDataFromSample(
dataLen
+=
snprintf
(
dataBuf
+
dataLen
,
maxLen
-
dataLen
,
"(%"
PRId64
", "
,
timestamp
);
dataLen
+=
snprintf
(
dataBuf
+
dataLen
,
maxLen
-
dataLen
,
"%s"
,
superTblInfo
->
sampleDataBuf
+
superTblInfo
->
lenOfOneRow
*
(
*
sampleUsePos
));
"%s"
,
superTblInfo
->
sampleDataBuf
+
superTblInfo
->
lenOfOneRow
*
(
*
sampleUsePos
));
dataLen
+=
snprintf
(
dataBuf
+
dataLen
,
maxLen
-
dataLen
,
")"
);
(
*
sampleUsePos
)
++
;
...
...
@@ -4803,16 +4866,31 @@ static int64_t generateStbRowData(
tmfree
(
buf
);
}
else
if
(
0
==
strncasecmp
(
stbInfo
->
columns
[
i
].
dataType
,
"INT"
,
strlen
(
"INT"
)))
{
if
((
g_args
.
demo_mode
)
&&
(
i
==
1
))
{
dataLen
+=
snprintf
(
pstr
+
dataLen
,
maxLen
-
dataLen
,
"%d,"
,
demo_voltage_int
());
}
else
{
dataLen
+=
snprintf
(
pstr
+
dataLen
,
maxLen
-
dataLen
,
"%d,"
,
rand_int
());
}
}
else
if
(
0
==
strncasecmp
(
stbInfo
->
columns
[
i
].
dataType
,
"BIGINT"
,
strlen
(
"BIGINT"
)))
{
dataLen
+=
snprintf
(
pstr
+
dataLen
,
maxLen
-
dataLen
,
"%"
PRId64
","
,
rand_bigint
());
}
else
if
(
0
==
strncasecmp
(
stbInfo
->
columns
[
i
].
dataType
,
"FLOAT"
,
strlen
(
"FLOAT"
)))
{
if
(
g_args
.
demo_mode
)
{
if
(
i
==
0
)
{
dataLen
+=
snprintf
(
pstr
+
dataLen
,
maxLen
-
dataLen
,
"%f,"
,
demo_current_float
());
}
else
{
dataLen
+=
snprintf
(
pstr
+
dataLen
,
maxLen
-
dataLen
,
"%f,"
,
demo_phase_float
());
}
}
else
{
dataLen
+=
snprintf
(
pstr
+
dataLen
,
maxLen
-
dataLen
,
"%f,"
,
rand_float
());
}
}
else
if
(
0
==
strncasecmp
(
stbInfo
->
columns
[
i
].
dataType
,
"DOUBLE"
,
strlen
(
"DOUBLE"
)))
{
dataLen
+=
snprintf
(
pstr
+
dataLen
,
maxLen
-
dataLen
,
...
...
tests/pytest/tools/taosdemoTest.py
浏览文件 @
ba090e22
...
...
@@ -51,7 +51,7 @@ class TDTestCase:
else
:
tdLog
.
info
(
"taosdemo found in %s"
%
buildPath
)
binPath
=
buildPath
+
"/build/bin/"
os
.
system
(
"%staosdemo -y -t %d -n %d"
%
os
.
system
(
"%staosdemo -y -t %d -n %d
-b INT,INT,INT,INT
"
%
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
tdSql
.
execute
(
"use test"
)
...
...
tests/pytest/tools/taosdemoTestTblAlt.py
浏览文件 @
ba090e22
...
...
@@ -54,7 +54,7 @@ class TDTestCase:
binPath
=
buildPath
+
"/build/bin/"
if
(
threadID
==
0
):
os
.
system
(
"%staosdemo -y -t %d -n %d"
%
os
.
system
(
"%staosdemo -y -t %d -n %d
-b INT,INT,INT,INT -m t
"
%
(
binPath
,
self
.
numberOfTables
,
self
.
numberOfRecords
))
if
(
threadID
==
1
):
time
.
sleep
(
2
)
...
...
tests/pytest/tools/taosdemoTestWithoutMetric.py
浏览文件 @
ba090e22
...
...
@@ -60,7 +60,7 @@ class TDTestCase:
tdSql
.
execute
(
"use test"
)
tdSql
.
query
(
"select count(*) from test.
t
%d"
%
(
self
.
numberOfTables
-
1
))
"select count(*) from test.
d
%d"
%
(
self
.
numberOfTables
-
1
))
tdSql
.
checkData
(
0
,
0
,
self
.
numberOfRecords
)
def
stop
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录