提交 ebbe1663 编写于 作者: S slguan

add testSuite

上级 80fe2e00
...@@ -44,6 +44,11 @@ extern int32_t tscEmbedded; ...@@ -44,6 +44,11 @@ extern int32_t tscEmbedded;
#define uPrint(...) \ #define uPrint(...) \
{ taosPrintLog("UTL ", tscEmbedded ? 255 : uDebugFlag, __VA_ARGS__); } { taosPrintLog("UTL ", tscEmbedded ? 255 : uDebugFlag, __VA_ARGS__); }
#define pError(...) \
{ taosPrintLog("ERROR APP ", 255, __VA_ARGS__); }
#define pPrint(...) \
{ taosPrintLog("APP ", 255, __VA_ARGS__); }
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -49,6 +49,7 @@ int syncForwardToPeer(tsync_h shandle, void *pHead, void *mhandle) { return ...@@ -49,6 +49,7 @@ int syncForwardToPeer(tsync_h shandle, void *pHead, void *mhandle) { return
void syncStop(tsync_h shandle) {} void syncStop(tsync_h shandle) {}
int syncReconfig(tsync_h shandle, const SSyncCfg * cfg) { return 0; } int syncReconfig(tsync_h shandle, const SSyncCfg * cfg) { return 0; }
int syncGetNodesRole(tsync_h shandle, SNodesRole * cfg) { return 0; } int syncGetNodesRole(tsync_h shandle, SNodesRole * cfg) { return 0; }
void syncConfirmForward(tsync_h shandle, uint64_t version, int32_t code) {}
#endif #endif
static void vnodeInit() { static void vnodeInit() {
......
run lite/account/pass_alter.sim run general/account/pass_alter.sim
run lite/account/pass_len.sim run general/account/pass_len.sim
run lite/account/user_create.sim run general/account/user_create.sim
run lite/account/user_len.sim run general/account/user_len.sim
run lite/account/monitor.sim run general/account/monitor.sim
\ No newline at end of file \ No newline at end of file
run lite/agg/fill.sim run general/agg/fill.sim
run lite/agg/stream.sim run general/agg/stream.sim
\ No newline at end of file \ No newline at end of file
run lite/alter/count.sim run general/alter/count.sim
run lite/alter/cached_schema_after_alter.sim run general/alter/cached_schema_after_alter.sim
run lite/alter/import.sim run general/alter/import.sim
run lite/alter/insert1.sim run general/alter/insert1.sim
run lite/alter/insert2.sim run general/alter/insert2.sim
run lite/alter/metrics.sim run general/alter/metrics.sim
run lite/alter/table.sim run general/alter/table.sim
\ No newline at end of file \ No newline at end of file
run lite/cache/restart_table.sim run general/cache/restart_table.sim
run lite/cache/restart_metrics.sim run general/cache/restart_metrics.sim
run lite/cache/restart_stream.sim run general/cache/restart_stream.sim
run lite/cache/new_metrics.sim run general/cache/new_metrics.sim
run lite/cache/new_stream.sim run general/cache/new_stream.sim
run lite/compress/compress.sim run general/compress/compress.sim
run lite/compress/uncompress.sim run general/compress/uncompress.sim
run lite/compress/commitlog.sim run general/compress/commitlog.sim
run lite/compress/compress2.sim run general/compress/compress2.sim
run lite/compute/count.sim run general/compute/count.sim
run lite/compute/avg.sim run general/compute/avg.sim
run lite/compute/sum.sim run general/compute/sum.sim
run lite/compute/min.sim run general/compute/min.sim
run lite/compute/max.sim run general/compute/max.sim
run lite/compute/first.sim run general/compute/first.sim
run lite/compute/last.sim run general/compute/last.sim
run lite/compute/stddev.sim run general/compute/stddev.sim
run lite/compute/leastsquare.sim run general/compute/leastsquare.sim
run lite/compute/top.sim run general/compute/top.sim
run lite/compute/bottom.sim run general/compute/bottom.sim
run lite/compute/percentile.sim run general/compute/percentile.sim
run lite/compute/diff.sim run general/compute/diff.sim
run lite/compute/interval.sim run general/compute/interval.sim
run lite/compute/null.sim run general/compute/null.sim
run lite/compute/diff2.sim run general/compute/diff2.sim
run lite/field/single.sim run general/field/single.sim
run lite/field/bool.sim run general/field/bool.sim
run lite/field/smallint.sim run general/field/smallint.sim
run lite/field/tinyint.sim run general/field/tinyint.sim
run lite/field/int.sim run general/field/int.sim
run lite/field/bigint.sim run general/field/bigint.sim
run lite/field/float.sim run general/field/float.sim
run lite/field/double.sim run general/field/double.sim
run lite/field/binary.sim run general/field/binary.sim
run lite/field/2.sim run general/field/2.sim
run lite/field/3.sim run general/field/3.sim
run lite/field/4.sim run general/field/4.sim
run lite/field/5.sim run general/field/5.sim
run lite/field/6.sim run general/field/6.sim
\ No newline at end of file \ No newline at end of file
run lite/http/grafana.sim run general/http/grafana.sim
run lite/http/restful.sim run general/http/restful.sim
run lite/http/restful_full.sim run general/http/restful_full.sim
run lite/http/telegraf.sim run general/http/telegraf.sim
run lite/http/prepare.sim run general/http/prepare.sim
run lite/http/grafana_bug.sim run general/http/grafana_bug.sim
#run lite/http/opentsdb.sim #run general/http/opentsdb.sim
run lite/import/basic.sim run general/import/basic.sim
#run lite/import/commit.sim #run general/import/commit.sim
run lite/import/large.sim run general/import/large.sim
run lite/import/replica1.sim run general/import/replica1.sim
run lite/metrics/disk.sim run general/metrics/disk.sim
run lite/metrics/metrics.sim run general/metrics/metrics.sim
run lite/metrics/values.sim run general/metrics/values.sim
run lite/metrics/vnode3.sim run general/metrics/vnode3.sim
run lite/parser/alter.sim run general/parser/alter.sim
sleep 2000 sleep 2000
run lite/parser/alter1.sim run general/parser/alter1.sim
sleep 2000 sleep 2000
run lite/parser/alter_stable.sim run general/parser/alter_stable.sim
sleep 2000 sleep 2000
run lite/parser/auto_create_tb.sim run general/parser/auto_create_tb.sim
sleep 2000 sleep 2000
run lite/parser/auto_create_tb_drop_tb.sim run general/parser/auto_create_tb_drop_tb.sim
sleep 2000 sleep 2000
run lite/parser/col_arithmetic_operation.sim run general/parser/col_arithmetic_operation.sim
sleep 2000 sleep 2000
run lite/parser/columnValue.sim run general/parser/columnValue.sim
sleep 2000 sleep 2000
run lite/parser/commit.sim run general/parser/commit.sim
run lite/parser/create_db.sim run general/parser/create_db.sim
sleep 2000 sleep 2000
run lite/parser/create_mt.sim run general/parser/create_mt.sim
sleep 2000 sleep 2000
run lite/parser/create_tb.sim run general/parser/create_tb.sim
sleep 2000 sleep 2000
run lite/parser/dbtbnameValidate.sim run general/parser/dbtbnameValidate.sim
sleep 2000 sleep 2000
run lite/parser/fill.sim run general/parser/fill.sim
sleep 2000 sleep 2000
run lite/parser/fill_stb.sim run general/parser/fill_stb.sim
sleep 2000 sleep 2000
run lite/parser/first_last.sim run general/parser/first_last.sim
sleep 2000 sleep 2000
run lite/parser/import_commit1.sim run general/parser/import_commit1.sim
sleep 2000 sleep 2000
run lite/parser/import_commit2.sim run general/parser/import_commit2.sim
sleep 2000 sleep 2000
run lite/parser/import_commit3.sim run general/parser/import_commit3.sim
sleep 2000 sleep 2000
run lite/parser/import_file.sim run general/parser/import_file.sim
sleep 2000 sleep 2000
run lite/parser/insert_tb.sim run general/parser/insert_tb.sim
sleep 2000 sleep 2000
run lite/parser/tags_dynamically_specifiy.sim run general/parser/tags_dynamically_specifiy.sim
sleep 2000 sleep 2000
run lite/parser/interp.sim run general/parser/interp.sim
run lite/parser/lastrow.sim run general/parser/lastrow.sim
sleep 2000 sleep 2000
run lite/parser/limit.sim run general/parser/limit.sim
sleep 2000 sleep 2000
run lite/parser/limit1.sim run general/parser/limit1.sim
sleep 2000 sleep 2000
run lite/parser/limit1_tblocks100.sim run general/parser/limit1_tblocks100.sim
sleep 2000 sleep 2000
run lite/parser/limit2.sim run general/parser/limit2.sim
sleep 2000 sleep 2000
run lite/parser/mixed_blocks.sim run general/parser/mixed_blocks.sim
sleep 2000 sleep 2000
run lite/parser/nchar.sim run general/parser/nchar.sim
sleep 2000 sleep 2000
run lite/parser/null_char.sim run general/parser/null_char.sim
sleep 2000 sleep 2000
run lite/parser/selectResNum.sim run general/parser/selectResNum.sim
sleep 2000 sleep 2000
run lite/parser/select_across_vnodes.sim run general/parser/select_across_vnodes.sim
sleep 2000 sleep 2000
run lite/parser/select_from_cache_disk.sim run general/parser/select_from_cache_disk.sim
sleep 2000 sleep 2000
run lite/parser/set_tag_vals.sim run general/parser/set_tag_vals.sim
sleep 2000 sleep 2000
run lite/parser/single_row_in_tb.sim run general/parser/single_row_in_tb.sim
sleep 2000 sleep 2000
run lite/parser/slimit.sim run general/parser/slimit.sim
sleep 2000 sleep 2000
run lite/parser/slimit1.sim run general/parser/slimit1.sim
sleep 2000 sleep 2000
run lite/parser/slimit_alter_tags.sim run general/parser/slimit_alter_tags.sim
sleep 2000 sleep 2000
run lite/parser/stream_on_sys.sim run general/parser/stream_on_sys.sim
sleep 2000 sleep 2000
run lite/parser/stream.sim run general/parser/stream.sim
sleep 2000 sleep 2000
run lite/parser/tbnameIn.sim run general/parser/tbnameIn.sim
sleep 2000 sleep 2000
run lite/parser/where.sim run general/parser/where.sim
sleep 2000 sleep 2000
#run lite/parser/repeatAlter.sim #run general/parser/repeatAlter.sim
sleep 2000 sleep 2000
#run lite/parser/repeatStream.sim #run general/parser/repeatStream.sim
sleep 2000 sleep 2000
run lite/parser/join.sim run general/parser/join.sim
run lite/parser/join_multivnode.sim run general/parser/join_multivnode.sim
run lite/parser/projection_limit_offset.sim run general/parser/projection_limit_offset.sim
sleep 2000 sleep 2000
run lite/parser/select_with_tags.sim run general/parser/select_with_tags.sim
run lite/parser/groupby.sim run general/parser/groupby.sim
run lite/stream/stream_1.sim run general/stream/stream_1.sim
run lite/stream/stream_2.sim run general/stream/stream_2.sim
run lite/stream/stream_3.sim run general/stream/stream_3.sim
run lite/stream/stream_restart.sim run general/stream/stream_restart.sim
run lite/stream/table_1.sim run general/stream/table_1.sim
run lite/stream/metrics_1.sim run general/stream/metrics_1.sim
run lite/stream/table_n.sim run general/stream/table_n.sim
run lite/stream/metrics_n.sim run general/stream/metrics_n.sim
run lite/stream/table_del.sim run general/stream/table_del.sim
run lite/stream/metrics_del.sim run general/stream/metrics_del.sim
run lite/stream/table_replica1_vnoden.sim run general/stream/table_replica1_vnoden.sim
run lite/stream/metrics_replica1_vnoden.sim run general/stream/metrics_replica1_vnoden.sim
\ No newline at end of file \ No newline at end of file
run lite/tag/filter.sim run general/tag/filter.sim
run lite/tag/column.sim run general/tag/column.sim
run lite/tag/bool.sim run general/tag/bool.sim
run lite/tag/smallint.sim run general/tag/smallint.sim
run lite/tag/tinyint.sim run general/tag/tinyint.sim
run lite/tag/int.sim run general/tag/int.sim
run lite/tag/bigint.sim run general/tag/bigint.sim
run lite/tag/float.sim run general/tag/float.sim
run lite/tag/double.sim run general/tag/double.sim
run lite/tag/binary.sim run general/tag/binary.sim
run lite/tag/bool_int.sim run general/tag/bool_int.sim
run lite/tag/bool_binary.sim run general/tag/bool_binary.sim
run lite/tag/int_float.sim run general/tag/int_float.sim
run lite/tag/int_binary.sim run general/tag/int_binary.sim
run lite/tag/binary_binary.sim run general/tag/binary_binary.sim
run lite/tag/3.sim run general/tag/3.sim
run lite/tag/4.sim run general/tag/4.sim
run lite/tag/5.sim run general/tag/5.sim
run lite/tag/6.sim run general/tag/6.sim
run lite/tag/create.sim run general/tag/create.sim
run lite/tag/delete.sim run general/tag/delete.sim
run lite/tag/change.sim run general/tag/change.sim
run lite/tag/set.sim run general/tag/set.sim
run lite/tag/add.sim run general/tag/add.sim
run lite/tag/commit.sim run general/tag/commit.sim
\ No newline at end of file \ No newline at end of file
run lite/vector/single.sim run general/vector/single.sim
run lite/vector/multi.sim run general/vector/multi.sim
run lite/vector/table_query.sim run general/vector/table_query.sim
run lite/vector/table_time.sim run general/vector/table_time.sim
run lite/vector/table_field.sim run general/vector/table_field.sim
run lite/vector/table_mix.sim run general/vector/table_mix.sim
run lite/vector/metrics_query.sim run general/vector/metrics_query.sim
run lite/vector/metrics_tag.sim run general/vector/metrics_tag.sim
run lite/vector/metrics_time.sim run general/vector/metrics_time.sim
run lite/vector/metrics_field.sim run general/vector/metrics_field.sim
run lite/vector/metrics_mix.sim run general/vector/metrics_mix.sim
run cluster/account/account_create.sim run unique/account/account_create.sim
run cluster/account/account_len.sim run unique/account/account_len.sim
run cluster/account/pass_alter.sim run unique/account/pass_alter.sim
run cluster/account/pass_len.sim run unique/account/pass_len.sim
run cluster/account/authority.sim run unique/account/authority.sim
run cluster/account/account_delete.sim run unique/account/account_delete.sim
run cluster/account/user_create.sim run unique/account/user_create.sim
run cluster/account/user_len.sim run unique/account/user_len.sim
run cluster/account/monitor.sim run unique/account/monitor.sim
#run cluster/big/balance.sim #run unique/big/balance.sim
#run cluster/big/maxvnodes.sim #run unique/big/maxvnodes.sim
run cluster/big/tcp.sim run unique/big/tcp.sim
run cluster/cluster/balance1.sim run unique/unique/balance1.sim
run cluster/cluster/balance2.sim run unique/unique/balance2.sim
run cluster/cluster/balance3.sim run unique/unique/balance3.sim
run cluster/cluster/balance1_bug.sim run unique/unique/balance1_bug.sim
run cluster/cluster/balance1_single.sim run unique/unique/balance1_single.sim
\ No newline at end of file \ No newline at end of file
run cluster/column/replica3.sim run unique/column/replica3.sim
#run cluster/db/commit.sim #run unique/db/commit.sim
run cluster/db/delete.sim run unique/db/delete.sim
run cluster/db/replica_add12.sim run unique/db/replica_add12.sim
run cluster/db/replica_add13.sim run unique/db/replica_add13.sim
run cluster/db/replica_add23.sim run unique/db/replica_add23.sim
run cluster/db/replica_reduce21.sim run unique/db/replica_reduce21.sim
run cluster/db/replica_reduce32.sim run unique/db/replica_reduce32.sim
run cluster/db/replica_reduce31.sim run unique/db/replica_reduce31.sim
run cluster/db/replica_part.sim run unique/db/replica_part.sim
run cluster/db/delete_part.sim run unique/db/delete_part.sim
run cluster/dnode/balance1.sim run unique/dnode/balance1.sim
run cluster/dnode/balance2.sim run unique/dnode/balance2.sim
run cluster/dnode/balance3.sim run unique/dnode/balance3.sim
run cluster/dnode/balancex.sim run unique/dnode/balancex.sim
run cluster/dnode/offline1.sim run unique/dnode/offline1.sim
run cluster/dnode/offline2.sim run unique/dnode/offline2.sim
run cluster/dnode/remove1.sim run unique/dnode/remove1.sim
run cluster/dnode/remove2.sim run unique/dnode/remove2.sim
run cluster/dnode/vnode_clean.sim run unique/dnode/vnode_clean.sim
......
run cluster/http/admin.sim run unique/http/admin.sim
\ No newline at end of file \ No newline at end of file
run cluster/import/replica2.sim run unique/import/replica2.sim
run cluster/import/replica3.sim run unique/import/replica3.sim
\ No newline at end of file \ No newline at end of file
run cluster/metrics/disk.sim run unique/metrics/disk.sim
run cluster/metrics/metrics.sim run unique/metrics/metrics.sim
run cluster/metrics/values.sim run unique/metrics/values.sim
run cluster/metrics/vnode3.sim run unique/metrics/vnode3.sim
\ No newline at end of file \ No newline at end of file
run cluster/mnode/mgmt22.sim run unique/mnode/mgmt22.sim
run cluster/mnode/mgmt23.sim run unique/mnode/mgmt23.sim
run cluster/mnode/mgmt24.sim run unique/mnode/mgmt24.sim
run cluster/mnode/mgmt25.sim run unique/mnode/mgmt25.sim
run cluster/mnode/mgmt26.sim run unique/mnode/mgmt26.sim
run cluster/mnode/mgmt33.sim run unique/mnode/mgmt33.sim
run cluster/mnode/mgmt34.sim run unique/mnode/mgmt34.sim
run cluster/mnode/mgmtr1.sim run unique/mnode/mgmtr1.sim
run cluster/mnode/mgmtr2.sim run unique/mnode/mgmtr2.sim
run cluster/mnode/drop.sim run unique/mnode/drop.sim
run cluster/mnode/reuse.sim run unique/mnode/reuse.sim
run cluster/mnode/secondIp.sim run unique/mnode/secondIp.sim
run cluster/stream/table_replica1_dnode2.sim run unique/stream/table_replica1_dnode2.sim
run cluster/stream/metrics_replica1_dnode2.sim run unique/stream/metrics_replica1_dnode2.sim
run cluster/stream/table_replica2_dnode2.sim run unique/stream/table_replica2_dnode2.sim
run cluster/stream/metrics_replica2_dnode2.sim run unique/stream/metrics_replica2_dnode2.sim
run cluster/stream/table_replica2_dnode2_vnoden.sim run unique/stream/table_replica2_dnode2_vnoden.sim
run cluster/stream/metrics_replica2_dnode2_vnoden.sim run unique/stream/metrics_replica2_dnode2_vnoden.sim
run cluster/stream/table_replica2_dnode3.sim run unique/stream/table_replica2_dnode3.sim
run cluster/stream/metrics_replica2_dnode3.sim run unique/stream/metrics_replica2_dnode3.sim
run cluster/stream/table_replica3_dnode4.sim run unique/stream/table_replica3_dnode4.sim
run cluster/stream/metrics_replica3_dnode4.sim run unique/stream/metrics_replica3_dnode4.sim
run cluster/stream/table_vnode_stop.sim run unique/stream/table_vnode_stop.sim
run cluster/stream/metrics_vnode_stop.sim run unique/stream/metrics_vnode_stop.sim
#run cluster/stream/table_balance.sim #run unique/stream/table_balance.sim
#run cluster/stream/metrics_balance.sim #run unique/stream/metrics_balance.sim
#run cluster/stream/table_move.sim #run unique/stream/table_move.sim
\ No newline at end of file \ No newline at end of file
run cluster/table/delete_part.sim run unique/table/delete_part.sim
run cluster/vnode/replica2_basic2.sim run unique/vnode/replica2_basic2.sim
run cluster/vnode/replica2_basic.sim run unique/vnode/replica2_basic.sim
run cluster/vnode/replica2_repeat.sim run unique/vnode/replica2_repeat.sim
run cluster/vnode/replica3_basic.sim run unique/vnode/replica3_basic.sim
run cluster/vnode/replica3_repeat.sim run unique/vnode/replica3_repeat.sim
run cluster/vnode/commit.sim run unique/vnode/commit.sim
run cluster/vnode/many.sim run unique/vnode/many.sim
#################################
run unique/mnode/testSuite.sim
##################################
...@@ -66,9 +66,9 @@ void shellParseArgument(int argc, char *argv[]) { ...@@ -66,9 +66,9 @@ void shellParseArgument(int argc, char *argv[]) {
} }
} }
uPrint("%s rowNum:%d %s", GREEN, rowNum, NC); pPrint("%s rowNum:%d %s", GREEN, rowNum, NC);
uPrint("%s threadNum:%d %s", GREEN, threadNum, NC); pPrint("%s threadNum:%d %s", GREEN, threadNum, NC);
uPrint("%s replica:%d %s", GREEN, replica, NC); pPrint("%s replica:%d %s", GREEN, replica, NC);
} }
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
......
...@@ -61,7 +61,7 @@ int main(int argc, char *argv[]) { ...@@ -61,7 +61,7 @@ int main(int argc, char *argv[]) {
} }
void createDbAndTable() { void createDbAndTable() {
uPrint("start to create table"); pPrint("start to create table");
TAOS * con; TAOS * con;
struct timeval systemTime; struct timeval systemTime;
...@@ -70,19 +70,19 @@ void createDbAndTable() { ...@@ -70,19 +70,19 @@ void createDbAndTable() {
con = taos_connect(tsMasterIp, tsDefaultUser, tsDefaultPass, NULL, 0); con = taos_connect(tsMasterIp, tsDefaultUser, tsDefaultPass, NULL, 0);
if (con == NULL) { if (con == NULL) {
uError("failed to connect to DB, reason:%s", taos_errstr(con)); pError("failed to connect to DB, reason:%s", taos_errstr(con));
exit(1); exit(1);
} }
sprintf(qstr, "create database if not exists %s cache %d tables %d", dbName, cache, tables); sprintf(qstr, "create database if not exists %s cache %d tables %d", dbName, cache, tables);
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to create database:%s, code:%d reason:%s", dbName, taos_errno(con), taos_errstr(con)); pError("failed to create database:%s, code:%d reason:%s", dbName, taos_errno(con), taos_errstr(con));
exit(0); exit(0);
} }
sprintf(qstr, "use %s", dbName); sprintf(qstr, "use %s", dbName);
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to use db, code:%d reason:%s", taos_errno(con), taos_errstr(con)); pError("failed to use db, code:%d reason:%s", taos_errno(con), taos_errstr(con));
exit(0); exit(0);
} }
...@@ -98,14 +98,14 @@ void createDbAndTable() { ...@@ -98,14 +98,14 @@ void createDbAndTable() {
sprintf(qstr + len, ") tags(t int)"); sprintf(qstr + len, ") tags(t int)");
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to create stable, code:%d reason:%s", taos_errno(con), taos_errstr(con)); pError("failed to create stable, code:%d reason:%s", taos_errno(con), taos_errstr(con));
exit(0); exit(0);
} }
for (int64_t t = 0; t < totalTables; ++t) { for (int64_t t = 0; t < totalTables; ++t) {
sprintf(qstr, "create table if not exists %s%ld using %s tags(%ld)", stableName, t, stableName, t); sprintf(qstr, "create table if not exists %s%ld using %s tags(%ld)", stableName, t, stableName, t);
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to create table %s%d, reason:%s", stableName, t, taos_errstr(con)); pError("failed to create table %s%d, reason:%s", stableName, t, taos_errstr(con));
exit(0); exit(0);
} }
} }
...@@ -118,7 +118,7 @@ void createDbAndTable() { ...@@ -118,7 +118,7 @@ void createDbAndTable() {
sprintf(qstr + len, ")"); sprintf(qstr + len, ")");
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to create table %s%ld, reason:%s", stableName, t, taos_errstr(con)); pError("failed to create table %s%ld, reason:%s", stableName, t, taos_errstr(con));
exit(0); exit(0);
} }
} }
...@@ -126,7 +126,7 @@ void createDbAndTable() { ...@@ -126,7 +126,7 @@ void createDbAndTable() {
gettimeofday(&systemTime, NULL); gettimeofday(&systemTime, NULL);
et = systemTime.tv_sec * 1000000 + systemTime.tv_usec; et = systemTime.tv_sec * 1000000 + systemTime.tv_usec;
uPrint("%.1f seconds to create %ld tables", (et - st) / 1000.0 / 1000.0, totalTables); pPrint("%.1f seconds to create %ld tables", (et - st) / 1000.0 / 1000.0, totalTables);
} }
void insertData() { void insertData() {
...@@ -136,7 +136,7 @@ void insertData() { ...@@ -136,7 +136,7 @@ void insertData() {
gettimeofday(&systemTime, NULL); gettimeofday(&systemTime, NULL);
st = systemTime.tv_sec * 1000000 + systemTime.tv_usec; st = systemTime.tv_sec * 1000000 + systemTime.tv_usec;
uPrint("%d threads are spawned to import data", numOfThreads); pPrint("%d threads are spawned to import data", numOfThreads);
pthread_attr_t thattr; pthread_attr_t thattr;
pthread_attr_init(&thattr); pthread_attr_init(&thattr);
...@@ -170,12 +170,12 @@ void insertData() { ...@@ -170,12 +170,12 @@ void insertData() {
double speedOfRows = totalRows / seconds; double speedOfRows = totalRows / seconds;
double speedOfPoints = totalPoints / seconds; double speedOfPoints = totalPoints / seconds;
uPrint( pPrint(
"%sall threads:%ld finished, use %.1lf seconds, tables:%.ld rows:%ld points:%ld, speed RowsPerSecond:%.1lf " "%sall threads:%ld finished, use %.1lf seconds, tables:%.ld rows:%ld points:%ld, speed RowsPerSecond:%.1lf "
"PointsPerSecond:%.1lf%s", "PointsPerSecond:%.1lf%s",
GREEN, numOfThreads, seconds, totalTables, totalRows, totalPoints, speedOfRows, speedOfPoints, NC); GREEN, numOfThreads, seconds, totalTables, totalRows, totalPoints, speedOfRows, speedOfPoints, NC);
uPrint("threads exit"); pPrint("threads exit");
pthread_attr_destroy(&thattr); pthread_attr_destroy(&thattr);
free(pInfo); free(pInfo);
...@@ -189,11 +189,11 @@ void *syncTest(void *param) { ...@@ -189,11 +189,11 @@ void *syncTest(void *param) {
char qstr[65000]; char qstr[65000];
int maxBytes = 60000; int maxBytes = 60000;
uPrint("thread:%d, start to run", pInfo->threadIndex); pPrint("thread:%d, start to run", pInfo->threadIndex);
con = taos_connect(tsMasterIp, tsDefaultUser, tsDefaultPass, NULL, 0); con = taos_connect(tsMasterIp, tsDefaultUser, tsDefaultPass, NULL, 0);
if (con == NULL) { if (con == NULL) {
uError("index:%d, failed to connect to DB, reason:%s", pInfo->threadIndex, taos_errstr(con)); pError("index:%d, failed to connect to DB, reason:%s", pInfo->threadIndex, taos_errstr(con));
exit(1); exit(1);
} }
...@@ -221,7 +221,7 @@ void *syncTest(void *param) { ...@@ -221,7 +221,7 @@ void *syncTest(void *param) {
len += sprintf(sql + len, ")"); len += sprintf(sql + len, ")");
if (len > maxBytes) { if (len > maxBytes) {
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("thread:%d, failed to import table:%s%ld row:%ld, reason:%s", pInfo->threadIndex, pInfo->stableName, pError("thread:%d, failed to import table:%s%ld row:%ld, reason:%s", pInfo->threadIndex, pInfo->stableName,
table, row, taos_errstr(con)); table, row, taos_errstr(con));
} }
...@@ -245,7 +245,7 @@ void *syncTest(void *param) { ...@@ -245,7 +245,7 @@ void *syncTest(void *param) {
int64_t totalTables = pInfo->tableEndIndex - pInfo->tableBeginIndex; int64_t totalTables = pInfo->tableEndIndex - pInfo->tableBeginIndex;
int64_t totalRows = totalTables * pInfo->rowsPerTable; int64_t totalRows = totalTables * pInfo->rowsPerTable;
int64_t totalPoints = totalRows * pInfo->pointsPerTable; int64_t totalPoints = totalRows * pInfo->pointsPerTable;
uPrint("thread:%d, import finished, use %.2f seconds, tables:%ld rows:%ld points:%ld", pInfo->threadIndex, pPrint("thread:%d, import finished, use %.2f seconds, tables:%ld rows:%ld points:%ld", pInfo->threadIndex,
(et - st) / 1000.0 / 1000.0, totalTables, totalRows, totalPoints); (et - st) / 1000.0 / 1000.0, totalTables, totalRows, totalPoints);
return NULL; return NULL;
...@@ -310,13 +310,13 @@ void shellParseArgument(int argc, char *argv[]) { ...@@ -310,13 +310,13 @@ void shellParseArgument(int argc, char *argv[]) {
} }
} }
uPrint("%srowsPerTable:%" PRId64 "%s", GREEN, rowsPerTable, NC); pPrint("%srowsPerTable:%" PRId64 "%s", GREEN, rowsPerTable, NC);
uPrint("%spointsPerTable:%" PRId64 "%s", GREEN, pointsPerTable, NC); pPrint("%spointsPerTable:%" PRId64 "%s", GREEN, pointsPerTable, NC);
uPrint("%snumOfThreads:%" PRId64 "%s", GREEN, numOfThreads, NC); pPrint("%snumOfThreads:%" PRId64 "%s", GREEN, numOfThreads, NC);
uPrint("%snumOfTablesPerThread:%" PRId64 "%s", GREEN, numOfTablesPerThread, NC); pPrint("%snumOfTablesPerThread:%" PRId64 "%s", GREEN, numOfTablesPerThread, NC);
uPrint("%scache:%" PRId64 "%s", GREEN, cache, NC); pPrint("%scache:%" PRId64 "%s", GREEN, cache, NC);
uPrint("%stables:%" PRId64 "%s", GREEN, tables, NC); pPrint("%stables:%" PRId64 "%s", GREEN, tables, NC);
uPrint("%sdbName:%s%s", GREEN, dbName, NC); pPrint("%sdbName:%s%s", GREEN, dbName, NC);
uPrint("%stableName:%s%s", GREEN, stableName, NC); pPrint("%stableName:%s%s", GREEN, stableName, NC);
uPrint("%sstart to run%s", GREEN, NC); pPrint("%sstart to run%s", GREEN, NC);
} }
...@@ -61,7 +61,7 @@ int main(int argc, char *argv[]) { ...@@ -61,7 +61,7 @@ int main(int argc, char *argv[]) {
} }
void createDbAndTable() { void createDbAndTable() {
uPrint("start to create table"); pPrint("start to create table");
TAOS * con; TAOS * con;
struct timeval systemTime; struct timeval systemTime;
...@@ -70,19 +70,19 @@ void createDbAndTable() { ...@@ -70,19 +70,19 @@ void createDbAndTable() {
con = taos_connect(tsMasterIp, tsDefaultUser, tsDefaultPass, NULL, 0); con = taos_connect(tsMasterIp, tsDefaultUser, tsDefaultPass, NULL, 0);
if (con == NULL) { if (con == NULL) {
uError("failed to connect to DB, reason:%s", taos_errstr(con)); pError("failed to connect to DB, reason:%s", taos_errstr(con));
exit(1); exit(1);
} }
sprintf(qstr, "create database if not exists %s cache %d tables %d", dbName, cache, tables); sprintf(qstr, "create database if not exists %s cache %d tables %d", dbName, cache, tables);
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to create database:%s, code:%d reason:%s", dbName, taos_errno(con), taos_errstr(con)); pError("failed to create database:%s, code:%d reason:%s", dbName, taos_errno(con), taos_errstr(con));
exit(0); exit(0);
} }
sprintf(qstr, "use %s", dbName); sprintf(qstr, "use %s", dbName);
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to use db, code:%d reason:%s", taos_errno(con), taos_errstr(con)); pError("failed to use db, code:%d reason:%s", taos_errno(con), taos_errstr(con));
exit(0); exit(0);
} }
...@@ -98,14 +98,14 @@ void createDbAndTable() { ...@@ -98,14 +98,14 @@ void createDbAndTable() {
sprintf(qstr + len, ") tags(t int)"); sprintf(qstr + len, ") tags(t int)");
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to create stable, code:%d reason:%s", taos_errno(con), taos_errstr(con)); pError("failed to create stable, code:%d reason:%s", taos_errno(con), taos_errstr(con));
exit(0); exit(0);
} }
for (int64_t t = 0; t < totalTables; ++t) { for (int64_t t = 0; t < totalTables; ++t) {
sprintf(qstr, "create table if not exists %s%ld using %s tags(%ld)", stableName, t, stableName, t); sprintf(qstr, "create table if not exists %s%ld using %s tags(%ld)", stableName, t, stableName, t);
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to create table %s%d, reason:%s", stableName, t, taos_errstr(con)); pError("failed to create table %s%d, reason:%s", stableName, t, taos_errstr(con));
exit(0); exit(0);
} }
} }
...@@ -118,7 +118,7 @@ void createDbAndTable() { ...@@ -118,7 +118,7 @@ void createDbAndTable() {
sprintf(qstr + len, ")"); sprintf(qstr + len, ")");
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to create table %s%ld, reason:%s", stableName, t, taos_errstr(con)); pError("failed to create table %s%ld, reason:%s", stableName, t, taos_errstr(con));
exit(0); exit(0);
} }
} }
...@@ -126,7 +126,7 @@ void createDbAndTable() { ...@@ -126,7 +126,7 @@ void createDbAndTable() {
gettimeofday(&systemTime, NULL); gettimeofday(&systemTime, NULL);
et = systemTime.tv_sec * 1000000 + systemTime.tv_usec; et = systemTime.tv_sec * 1000000 + systemTime.tv_usec;
uPrint("%.1f seconds to create %ld tables", (et - st) / 1000.0 / 1000.0, totalTables); pPrint("%.1f seconds to create %ld tables", (et - st) / 1000.0 / 1000.0, totalTables);
} }
void insertData() { void insertData() {
...@@ -136,7 +136,7 @@ void insertData() { ...@@ -136,7 +136,7 @@ void insertData() {
gettimeofday(&systemTime, NULL); gettimeofday(&systemTime, NULL);
st = systemTime.tv_sec * 1000000 + systemTime.tv_usec; st = systemTime.tv_sec * 1000000 + systemTime.tv_usec;
uPrint("%d threads are spawned to insert data", numOfThreads); pPrint("%d threads are spawned to insert data", numOfThreads);
pthread_attr_t thattr; pthread_attr_t thattr;
pthread_attr_init(&thattr); pthread_attr_init(&thattr);
...@@ -170,12 +170,12 @@ void insertData() { ...@@ -170,12 +170,12 @@ void insertData() {
double speedOfRows = totalRows / seconds; double speedOfRows = totalRows / seconds;
double speedOfPoints = totalPoints / seconds; double speedOfPoints = totalPoints / seconds;
uPrint( pPrint(
"%sall threads:%ld finished, use %.1lf seconds, tables:%.ld rows:%ld points:%ld, speed RowsPerSecond:%.1lf " "%sall threads:%ld finished, use %.1lf seconds, tables:%.ld rows:%ld points:%ld, speed RowsPerSecond:%.1lf "
"PointsPerSecond:%.1lf%s", "PointsPerSecond:%.1lf%s",
GREEN, numOfThreads, seconds, totalTables, totalRows, totalPoints, speedOfRows, speedOfPoints, NC); GREEN, numOfThreads, seconds, totalTables, totalRows, totalPoints, speedOfRows, speedOfPoints, NC);
uPrint("threads exit"); pPrint("threads exit");
pthread_attr_destroy(&thattr); pthread_attr_destroy(&thattr);
free(pInfo); free(pInfo);
...@@ -189,11 +189,11 @@ void *syncTest(void *param) { ...@@ -189,11 +189,11 @@ void *syncTest(void *param) {
char qstr[65000]; char qstr[65000];
int maxBytes = 60000; int maxBytes = 60000;
uPrint("thread:%d, start to run", pInfo->threadIndex); pPrint("thread:%d, start to run", pInfo->threadIndex);
con = taos_connect(tsMasterIp, tsDefaultUser, tsDefaultPass, NULL, 0); con = taos_connect(tsMasterIp, tsDefaultUser, tsDefaultPass, NULL, 0);
if (con == NULL) { if (con == NULL) {
uError("index:%d, failed to connect to DB, reason:%s", pInfo->threadIndex, taos_errstr(con)); pError("index:%d, failed to connect to DB, reason:%s", pInfo->threadIndex, taos_errstr(con));
exit(1); exit(1);
} }
...@@ -221,7 +221,7 @@ void *syncTest(void *param) { ...@@ -221,7 +221,7 @@ void *syncTest(void *param) {
len += sprintf(sql + len, ")"); len += sprintf(sql + len, ")");
if (len > maxBytes) { if (len > maxBytes) {
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("thread:%d, failed to insert table:%s%ld row:%ld, reason:%s", pInfo->threadIndex, pInfo->stableName, pError("thread:%d, failed to insert table:%s%ld row:%ld, reason:%s", pInfo->threadIndex, pInfo->stableName,
table, row, taos_errstr(con)); table, row, taos_errstr(con));
} }
...@@ -240,7 +240,7 @@ void *syncTest(void *param) { ...@@ -240,7 +240,7 @@ void *syncTest(void *param) {
int64_t totalTables = pInfo->tableEndIndex - pInfo->tableBeginIndex; int64_t totalTables = pInfo->tableEndIndex - pInfo->tableBeginIndex;
int64_t totalRows = totalTables * pInfo->rowsPerTable; int64_t totalRows = totalTables * pInfo->rowsPerTable;
int64_t totalPoints = totalRows * pInfo->pointsPerTable; int64_t totalPoints = totalRows * pInfo->pointsPerTable;
uPrint("thread:%d, insert finished, use %.2f seconds, tables:%ld rows:%ld points:%ld", pInfo->threadIndex, pPrint("thread:%d, insert finished, use %.2f seconds, tables:%ld rows:%ld points:%ld", pInfo->threadIndex,
(et - st) / 1000.0 / 1000.0, totalTables, totalRows, totalPoints); (et - st) / 1000.0 / 1000.0, totalTables, totalRows, totalPoints);
return NULL; return NULL;
...@@ -305,13 +305,13 @@ void shellParseArgument(int argc, char *argv[]) { ...@@ -305,13 +305,13 @@ void shellParseArgument(int argc, char *argv[]) {
} }
} }
uPrint("%srowsPerTable:%" PRId64 "%s", GREEN, rowsPerTable, NC); pPrint("%srowsPerTable:%" PRId64 "%s", GREEN, rowsPerTable, NC);
uPrint("%spointsPerTable:%" PRId64 "%s", GREEN, pointsPerTable, NC); pPrint("%spointsPerTable:%" PRId64 "%s", GREEN, pointsPerTable, NC);
uPrint("%snumOfThreads:%" PRId64 "%s", GREEN, numOfThreads, NC); pPrint("%snumOfThreads:%" PRId64 "%s", GREEN, numOfThreads, NC);
uPrint("%snumOfTablesPerThread:%" PRId64 "%s", GREEN, numOfTablesPerThread, NC); pPrint("%snumOfTablesPerThread:%" PRId64 "%s", GREEN, numOfTablesPerThread, NC);
uPrint("%scache:%" PRId64 "%s", GREEN, cache, NC); pPrint("%scache:%" PRId64 "%s", GREEN, cache, NC);
uPrint("%stables:%" PRId64 "%s", GREEN, tables, NC); pPrint("%stables:%" PRId64 "%s", GREEN, tables, NC);
uPrint("%sdbName:%s%s", GREEN, dbName, NC); pPrint("%sdbName:%s%s", GREEN, dbName, NC);
uPrint("%stableName:%s%s", GREEN, stableName, NC); pPrint("%stableName:%s%s", GREEN, stableName, NC);
uPrint("%sstart to run%s", GREEN, NC); pPrint("%sstart to run%s", GREEN, NC);
} }
...@@ -61,7 +61,7 @@ int main(int argc, char *argv[]) { ...@@ -61,7 +61,7 @@ int main(int argc, char *argv[]) {
} }
void createDbAndTable() { void createDbAndTable() {
uPrint("start to create table"); pPrint("start to create table");
TAOS * con; TAOS * con;
struct timeval systemTime; struct timeval systemTime;
...@@ -70,19 +70,19 @@ void createDbAndTable() { ...@@ -70,19 +70,19 @@ void createDbAndTable() {
con = taos_connect(tsMasterIp, tsDefaultUser, tsDefaultPass, NULL, 0); con = taos_connect(tsMasterIp, tsDefaultUser, tsDefaultPass, NULL, 0);
if (con == NULL) { if (con == NULL) {
uError("failed to connect to DB, reason:%s", taos_errstr(con)); pError("failed to connect to DB, reason:%s", taos_errstr(con));
exit(1); exit(1);
} }
sprintf(qstr, "create database if not exists %s cache %d tables %d", dbName, cache, tables); sprintf(qstr, "create database if not exists %s cache %d tables %d", dbName, cache, tables);
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to create database:%s, code:%d reason:%s", dbName, taos_errno(con), taos_errstr(con)); pError("failed to create database:%s, code:%d reason:%s", dbName, taos_errno(con), taos_errstr(con));
exit(0); exit(0);
} }
sprintf(qstr, "use %s", dbName); sprintf(qstr, "use %s", dbName);
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to use db, code:%d reason:%s", taos_errno(con), taos_errstr(con)); pError("failed to use db, code:%d reason:%s", taos_errno(con), taos_errstr(con));
exit(0); exit(0);
} }
...@@ -98,14 +98,14 @@ void createDbAndTable() { ...@@ -98,14 +98,14 @@ void createDbAndTable() {
sprintf(qstr + len, ") tags(t int)"); sprintf(qstr + len, ") tags(t int)");
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to create stable, code:%d reason:%s", taos_errno(con), taos_errstr(con)); pError("failed to create stable, code:%d reason:%s", taos_errno(con), taos_errstr(con));
exit(0); exit(0);
} }
for (int64_t t = 0; t < totalTables; ++t) { for (int64_t t = 0; t < totalTables; ++t) {
sprintf(qstr, "create table if not exists %s%ld using %s tags(%ld)", stableName, t, stableName, t); sprintf(qstr, "create table if not exists %s%ld using %s tags(%ld)", stableName, t, stableName, t);
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to create table %s%d, reason:%s", stableName, t, taos_errstr(con)); pError("failed to create table %s%d, reason:%s", stableName, t, taos_errstr(con));
exit(0); exit(0);
} }
} }
...@@ -118,7 +118,7 @@ void createDbAndTable() { ...@@ -118,7 +118,7 @@ void createDbAndTable() {
sprintf(qstr + len, ")"); sprintf(qstr + len, ")");
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("failed to create table %s%ld, reason:%s", stableName, t, taos_errstr(con)); pError("failed to create table %s%ld, reason:%s", stableName, t, taos_errstr(con));
exit(0); exit(0);
} }
} }
...@@ -126,7 +126,7 @@ void createDbAndTable() { ...@@ -126,7 +126,7 @@ void createDbAndTable() {
gettimeofday(&systemTime, NULL); gettimeofday(&systemTime, NULL);
et = systemTime.tv_sec * 1000000 + systemTime.tv_usec; et = systemTime.tv_sec * 1000000 + systemTime.tv_usec;
uPrint("%.1f seconds to create %ld tables", (et - st) / 1000.0 / 1000.0, totalTables); pPrint("%.1f seconds to create %ld tables", (et - st) / 1000.0 / 1000.0, totalTables);
} }
void insertData() { void insertData() {
...@@ -136,7 +136,7 @@ void insertData() { ...@@ -136,7 +136,7 @@ void insertData() {
gettimeofday(&systemTime, NULL); gettimeofday(&systemTime, NULL);
st = systemTime.tv_sec * 1000000 + systemTime.tv_usec; st = systemTime.tv_sec * 1000000 + systemTime.tv_usec;
uPrint("%d threads are spawned to insert data", numOfThreads); pPrint("%d threads are spawned to insert data", numOfThreads);
pthread_attr_t thattr; pthread_attr_t thattr;
pthread_attr_init(&thattr); pthread_attr_init(&thattr);
...@@ -170,12 +170,12 @@ void insertData() { ...@@ -170,12 +170,12 @@ void insertData() {
double speedOfRows = totalRows / seconds; double speedOfRows = totalRows / seconds;
double speedOfPoints = totalPoints / seconds; double speedOfPoints = totalPoints / seconds;
uPrint( pPrint(
"%sall threads:%ld finished, use %.1lf seconds, tables:%.ld rows:%ld points:%ld, speed RowsPerSecond:%.1lf " "%sall threads:%ld finished, use %.1lf seconds, tables:%.ld rows:%ld points:%ld, speed RowsPerSecond:%.1lf "
"PointsPerSecond:%.1lf%s", "PointsPerSecond:%.1lf%s",
GREEN, numOfThreads, seconds, totalTables, totalRows, totalPoints, speedOfRows, speedOfPoints, NC); GREEN, numOfThreads, seconds, totalTables, totalRows, totalPoints, speedOfRows, speedOfPoints, NC);
uPrint("threads exit"); pPrint("threads exit");
pthread_attr_destroy(&thattr); pthread_attr_destroy(&thattr);
free(pInfo); free(pInfo);
...@@ -189,11 +189,11 @@ void *syncTest(void *param) { ...@@ -189,11 +189,11 @@ void *syncTest(void *param) {
char qstr[65000]; char qstr[65000];
int maxBytes = 60000; int maxBytes = 60000;
uPrint("thread:%d, start to run", pInfo->threadIndex); pPrint("thread:%d, start to run", pInfo->threadIndex);
con = taos_connect(tsMasterIp, tsDefaultUser, tsDefaultPass, NULL, 0); con = taos_connect(tsMasterIp, tsDefaultUser, tsDefaultPass, NULL, 0);
if (con == NULL) { if (con == NULL) {
uError("index:%d, failed to connect to DB, reason:%s", pInfo->threadIndex, taos_errstr(con)); pError("index:%d, failed to connect to DB, reason:%s", pInfo->threadIndex, taos_errstr(con));
exit(1); exit(1);
} }
...@@ -221,7 +221,7 @@ void *syncTest(void *param) { ...@@ -221,7 +221,7 @@ void *syncTest(void *param) {
len += sprintf(sql + len, ")"); len += sprintf(sql + len, ")");
if (len > maxBytes) { if (len > maxBytes) {
if (taos_query(con, qstr)) { if (taos_query(con, qstr)) {
uError("thread:%d, failed to insert table:%s%ld row:%ld, reason:%s", pInfo->threadIndex, pInfo->stableName, pError("thread:%d, failed to insert table:%s%ld row:%ld, reason:%s", pInfo->threadIndex, pInfo->stableName,
table, row, taos_errstr(con)); table, row, taos_errstr(con));
} }
...@@ -245,7 +245,7 @@ void *syncTest(void *param) { ...@@ -245,7 +245,7 @@ void *syncTest(void *param) {
int64_t totalTables = pInfo->tableEndIndex - pInfo->tableBeginIndex; int64_t totalTables = pInfo->tableEndIndex - pInfo->tableBeginIndex;
int64_t totalRows = totalTables * pInfo->rowsPerTable; int64_t totalRows = totalTables * pInfo->rowsPerTable;
int64_t totalPoints = totalRows * pInfo->pointsPerTable; int64_t totalPoints = totalRows * pInfo->pointsPerTable;
uPrint("thread:%d, insert finished, use %.2f seconds, tables:%ld rows:%ld points:%ld", pInfo->threadIndex, pPrint("thread:%d, insert finished, use %.2f seconds, tables:%ld rows:%ld points:%ld", pInfo->threadIndex,
(et - st) / 1000.0 / 1000.0, totalTables, totalRows, totalPoints); (et - st) / 1000.0 / 1000.0, totalTables, totalRows, totalPoints);
return NULL; return NULL;
...@@ -310,13 +310,13 @@ void shellParseArgument(int argc, char *argv[]) { ...@@ -310,13 +310,13 @@ void shellParseArgument(int argc, char *argv[]) {
} }
} }
uPrint("%srowsPerTable:%" PRId64 "%s", GREEN, rowsPerTable, NC); pPrint("%srowsPerTable:%" PRId64 "%s", GREEN, rowsPerTable, NC);
uPrint("%spointsPerTable:%" PRId64 "%s", GREEN, pointsPerTable, NC); pPrint("%spointsPerTable:%" PRId64 "%s", GREEN, pointsPerTable, NC);
uPrint("%snumOfThreads:%" PRId64 "%s", GREEN, numOfThreads, NC); pPrint("%snumOfThreads:%" PRId64 "%s", GREEN, numOfThreads, NC);
uPrint("%snumOfTablesPerThread:%" PRId64 "%s", GREEN, numOfTablesPerThread, NC); pPrint("%snumOfTablesPerThread:%" PRId64 "%s", GREEN, numOfTablesPerThread, NC);
uPrint("%scache:%" PRId64 "%s", GREEN, cache, NC); pPrint("%scache:%" PRId64 "%s", GREEN, cache, NC);
uPrint("%stables:%" PRId64 "%s", GREEN, tables, NC); pPrint("%stables:%" PRId64 "%s", GREEN, tables, NC);
uPrint("%sdbName:%s%s", GREEN, dbName, NC); pPrint("%sdbName:%s%s", GREEN, dbName, NC);
uPrint("%stableName:%s%s", GREEN, stableName, NC); pPrint("%stableName:%s%s", GREEN, stableName, NC);
uPrint("%sstart to run%s", GREEN, NC); pPrint("%sstart to run%s", GREEN, NC);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册