From def67c0d559209408de254e49e21bbf2a2f6f82c Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 20 Jan 2025 09:24:14 +0800 Subject: [PATCH] feat:add test script --- tests/system-test/7-tmq/taosx-performance.json | 13 ++++++++----- tests/system-test/7-tmq/taosx-performance.py | 5 ++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/system-test/7-tmq/taosx-performance.json b/tests/system-test/7-tmq/taosx-performance.json index cbff630cbd..352bdbbd6d 100644 --- a/tests/system-test/7-tmq/taosx-performance.json +++ b/tests/system-test/7-tmq/taosx-performance.json @@ -11,7 +11,7 @@ "create_table_thread_count": 16, "result_file": "./insert_res.txt", "confirm_parameter_prompt": "no", - "num_of_records_per_req": 10000, + "num_of_records_per_req": 10, "prepared_rand": 10000, "chinese": "no", "escape_character": "yes", @@ -34,7 +34,7 @@ "auto_create_table": "no", "batch_create_tbl_num": 500, "data_source": "rand", - "insert_mode": "stmt", + "insert_mode": "taosc", "non_stop_mode": "no", "line_protocol": "line", "insert_rows": 10000, @@ -49,10 +49,13 @@ "sample_file": "./sample.csv", "use_sample_ts": "no", "tags_file": "", + "generate_row_rule": 2, "columns": [ - {"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 } + {"type": "TINYINT", "name": "current", "max": 128, "min": 1 }, + { "type": "BOOL", "name": "phaseewe" }, + { "type": "BINARY", "name": "locatin", "len":16374 }, + { "type": "BIGINT", "name": "cnt", "max" : 2563332323232, "min":1 }, + { "type": "DOUBLE", "name": "phase", "max": 1000, "min": 0 } ], "tags": [ {"type": "TINYINT", "name": "groupid", "max": 10, "min": 1}, diff --git a/tests/system-test/7-tmq/taosx-performance.py b/tests/system-test/7-tmq/taosx-performance.py index 63cfc01031..1c70b9bb6b 100755 --- a/tests/system-test/7-tmq/taosx-performance.py +++ b/tests/system-test/7-tmq/taosx-performance.py @@ -43,14 +43,13 @@ if __name__ == "__main__": tdDnodes2.deploy(1,updatecfgDict2) tdDnodes2.start(1) + os.system("taos -c ./dnode2/sim/dnode1/cfg -s \"drop database if exists test\"") + os.system("taos -c ./dnode2/sim/dnode1/cfg -s \"create database test vgroups 8\"") if insertData : os.system("taosBenchmark -f ../taosx-performance.json") print("create test in dst") - os.system("taos -c ./dnode2/sim/dnode1/cfg -s \"drop database if exists test\"") - os.system("taos -c ./dnode2/sim/dnode1/cfg -s \"create database test vgroups 8\"") - print("start to run taosx") os.system("taosx run -f \"tmq://root:taosdata@localhost:6030/test?group.id=taosx-new-`date +%s`&timeout=50s&experimental.snapshot.enable=false&auto.offset.reset=earliest&prefer=raw\" -t \"taos://root:taosdata@localhost:7030/test\" > /dev/null 2>&1 &") time.sleep(10)