Skip to content

Commit

Permalink
Merge pull request #726 from taosdata/fix/TS-4338
Browse files Browse the repository at this point in the history
fix: tweak insert.json query.json and modify subscrible.json
  • Loading branch information
DuanKuanJun authored Dec 7, 2023
2 parents 1875dbe + 21343ce commit 067ef43
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 259 deletions.
191 changes: 0 additions & 191 deletions .github/workflows/3.0-non-x64.yml

This file was deleted.

36 changes: 10 additions & 26 deletions example/insert.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
"password": "taosdata",
"connection_pool_size": 8,
"thread_count": 4,
"create_table_thread_count": 7,
"create_table_thread_count": 4,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"interlace_rows": 100,
"num_of_records_per_req": 100,
"num_of_records_per_req": 10000,
"prepared_rand": 10000,
"chinese": "no",
"escape_character": "yes",
"continue_if_fail": "no",
"databases": [
{
"dbinfo": {
"name": "test",
"drop": "yes",
"vgroups": 4,
"precision": "ms"
},
"super_tables": [
{
"name": "meters",
"child_table_exists": "no",
"childtable_count": 10000,
"childtable_count": 1000,
"childtable_prefix": "d",
"auto_create_table": "no",
"batch_create_tbl_num": 5,
Expand All @@ -36,41 +36,25 @@
"non_stop_mode": "no",
"line_protocol": "line",
"insert_rows": 10000,
"childtable_limit": 10,
"childtable_offset": 100,
"childtable_limit": 0,
"childtable_offset": 0,
"interlace_rows": 0,
"insert_interval": 0,
"partial_col_num": 0,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 10,
"start_timestamp": "2020-10-01 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"use_sample_ts": "no",
"tags_file": "",
"columns": [
{
"type": "FLOAT",
"name": "current",
"count": 1,
"max": 12,
"min": 8
},
{"type": "FLOAT", "name": "current", "count": 1, "max": 12, "min": 8 },
{ "type": "INT", "name": "voltage", "max": 225, "min": 215 },
{ "type": "FLOAT", "name": "phase", "max": 1, "min": 0 }
],
"tags": [
{
"type": "TINYINT",
"name": "groupid",
"max": 10,
"min": 1
},
{
"name": "location",
"type": "BINARY",
"len": 16,
{"type": "TINYINT", "name": "groupid", "max": 10, "min": 1},
{"type": "BINARY", "name": "location", "len": 16,
"values": ["San Francisco", "Los Angles", "San Diego",
"San Jose", "Palo Alto", "Campbell", "Mountain View",
"Sunnyvale", "Santa Clara", "Cupertino"]
Expand Down
2 changes: 1 addition & 1 deletion example/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"confirm_parameter_prompt": "no",
"continue_if_fail": "yes",
"databases": "test",
"query_times": 2,
"query_times": 10,
"query_mode": "taosc",
"specified_table_query": {
"query_interval": 1,
Expand Down
60 changes: 25 additions & 35 deletions example/subscribe.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,27 @@
{
"filetype": "subscribe",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"databases": "test",
"specified_table_query": {
"concurrent": 1,
"mode": "sync",
"interval": 1000,
"restart": "yes",
"keepProgress": "yes",
"resubAfterConsume": 10,
"sqls": [
{
"sql": "select current from meters where location = 'beijing';",
"result": "./subscribe_res0.txt"
}
]
},
"super_table_query": {
"stblname": "meters",
"threads": 1,
"mode": "sync",
"interval": 1000,
"restart": "yes",
"keepProgress": "yes",
"sqls": [
{
"sql": "select phase from xxxx where groupid > 3;",
"result": "./subscribe_res1.txt"
}
]
}
"filetype": "subscribe",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"result_file": "tmq_res.txt",
"tmq_info": {
"concurrent": 3,
"poll_delay": 100000,
"group.id": "",
"group_mode": "independent",
"create_mode": "parallel",
"client.id": "cliid_0001",
"auto.offset.reset": "earliest",
"enable.manual.commit": "false",
"enable.auto.commit": "false",
"auto.commit.interval.ms": 1000,
"experimental.snapshot.enable": "false",
"msg.with.table.name": "false",
"rows_file": "rowfile",
"topic_list": [
{"name": "topic1", "sql": "select * from test.meters;"}
]
}
}
10 changes: 5 additions & 5 deletions example/tmq.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
"password": "taosdata",
"result_file": "tmq_res.txt",
"tmq_info": {
"concurrent": 99,
"poll_delay": 100000,
"concurrent": 3,
"poll_delay": 10000,
"group.id": "",
"group_mode": "independent",
"create_mode": "parallel",
"client.id": "cliid_0001",
"client.id": "client001",
"auto.offset.reset": "earliest",
"enable.manual.commit": "false",
"enable.auto.commit": "false",
"auto.commit.interval.ms": 1000,
"experimental.snapshot.enable": "false",
"msg.with.table.name": "false",
"rows_file": "",
"rows_file": "rowfile",
"topic_list": [
{"name": "dbtstb_0001", "sql": "select * from dbt.stb;"}
{"name": "topic1", "sql": "select * from test.meters;"}
]
}
}
2 changes: 1 addition & 1 deletion src/benchTmq.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ int subscribeTestProcess() {
pThreadInfo->totalRows = 0;
pThreadInfo->id = i;

if (strlen(pConsumerInfo->rowsFile)) {
if ( pConsumerInfo->rowsFile && strlen(pConsumerInfo->rowsFile)) {
memset(tmpBuff, 0, sizeof(tmpBuff));
snprintf(tmpBuff, 64, "%s_%d", pConsumerInfo->rowsFile, i);
pThreadInfo->fpOfRowsFile = fopen(tmpBuff, "a");
Expand Down

0 comments on commit 067ef43

Please sign in to comment.