feat:add test script
This commit is contained in:
parent
c1f3a4ef44
commit
cd1606802f
|
@ -0,0 +1,69 @@
|
||||||
|
{
|
||||||
|
"filetype": "insert",
|
||||||
|
"cfgdir": "/etc/taos",
|
||||||
|
"host": "127.0.0.1",
|
||||||
|
"port": 6030,
|
||||||
|
"user": "root",
|
||||||
|
"password": "taosdata",
|
||||||
|
"connection_pool_size": 20,
|
||||||
|
"thread_bind_vgroup": "yes",
|
||||||
|
"thread_count": 20,
|
||||||
|
"create_table_thread_count": 16,
|
||||||
|
"result_file": "./insert_res.txt",
|
||||||
|
"confirm_parameter_prompt": "no",
|
||||||
|
"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": 32,
|
||||||
|
"precision": "ms",
|
||||||
|
"WAL_RETENTION_PERIOD": 864000
|
||||||
|
},
|
||||||
|
"super_tables": [
|
||||||
|
{
|
||||||
|
"name": "meters",
|
||||||
|
"child_table_exists": "no",
|
||||||
|
"childtable_count": 10000,
|
||||||
|
"childtable_prefix": "d",
|
||||||
|
"auto_create_table": "no",
|
||||||
|
"batch_create_tbl_num": 500,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "stmt",
|
||||||
|
"non_stop_mode": "no",
|
||||||
|
"line_protocol": "line",
|
||||||
|
"insert_rows": 10000,
|
||||||
|
"childtable_limit": 0,
|
||||||
|
"childtable_offset": 0,
|
||||||
|
"interlace_rows": 1,
|
||||||
|
"insert_interval": 0,
|
||||||
|
"partial_col_num": 0,
|
||||||
|
"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": "INT", "name": "voltage", "max": 225, "min": 215 },
|
||||||
|
{ "type": "FLOAT", "name": "phase", "max": 1, "min": 0 }
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
{"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"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
import taos
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
import socket
|
||||||
|
import os
|
||||||
|
import threading
|
||||||
|
|
||||||
|
sys.path.append("../../pytest")
|
||||||
|
|
||||||
|
from util.log import *
|
||||||
|
from util.sql import *
|
||||||
|
from util.cases import *
|
||||||
|
from util.dnodes import *
|
||||||
|
from util.common import *
|
||||||
|
from taos.tmq import *
|
||||||
|
sys.path.append("./7-tmq")
|
||||||
|
from tmqCommon import *
|
||||||
|
|
||||||
|
tdDnodes1 = TDDnodes()
|
||||||
|
tdDnodes2 = TDDnodes()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
tdDnodes1.stopAll()
|
||||||
|
updatecfgDict1 = {'debugFlag': 135, 'serverPort': 6030}
|
||||||
|
tdDnodes1.init("./dnode1")
|
||||||
|
tdDnodes1.deploy(1,updatecfgDict1)
|
||||||
|
tdDnodes1.start(1)
|
||||||
|
|
||||||
|
updatecfgDict2 = {'debugFlag': 135, 'serverPort': 7030}
|
||||||
|
tdDnodes2.init("./dnode2")
|
||||||
|
tdDnodes2.deploy(1,updatecfgDict2)
|
||||||
|
tdDnodes2.start(1)
|
||||||
|
|
||||||
|
os.system("taosBenchmark -f taosx-performance.json")
|
||||||
|
|
||||||
|
tdLog.info("Procedures for tdengine deployed in")
|
Loading…
Reference in New Issue