refactor(sync): add test case
This commit is contained in:
parent
22635992fd
commit
7dc12d7e4f
|
@ -0,0 +1,45 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ $# != 5 ] ; then
|
||||||
|
echo "Uasge: $0 instances vgroups replica ctables rows"
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
instances=$1
|
||||||
|
vgroups=$2
|
||||||
|
replica=$3
|
||||||
|
ctables=$4
|
||||||
|
rows=$5
|
||||||
|
|
||||||
|
echo "params: instances:${instances}, vgroups:${vgroups}, replica:${replica}, ctables:${ctables}, rows:${rows}"
|
||||||
|
|
||||||
|
dt=`date "+%Y-%m-%d-%H-%M-%S"`
|
||||||
|
casedir=instances_${instances}_vgroups_${vgroups}_replica_${replica}_ctables_${ctables}_rows_${rows}_${dt}
|
||||||
|
mkdir ${casedir}
|
||||||
|
cp ./insert.tpl.json ${casedir}
|
||||||
|
cd ${casedir}
|
||||||
|
|
||||||
|
for i in `seq 1 ${instances}`;do
|
||||||
|
#echo ===$i===
|
||||||
|
cfg_file=bench_${i}.json
|
||||||
|
cp ./insert.tpl.json ${cfg_file}
|
||||||
|
rstfile=result_${i}
|
||||||
|
sed -i 's/tpl_vgroups_tpl/'${vgroups}'/g' ${cfg_file}
|
||||||
|
sed -i 's/tpl_replica_tpl/'${replica}'/g' ${cfg_file}
|
||||||
|
sed -i 's/tpl_ctables_tpl/'${ctables}'/g' ${cfg_file}
|
||||||
|
sed -i 's/tpl_stid_tpl/'${i}'/g' ${cfg_file}
|
||||||
|
sed -i 's/tpl_rows_tpl/'${rows}'/g' ${cfg_file}
|
||||||
|
sed -i 's/tpl_insert_result_tpl/'${rstfile}'/g' ${cfg_file}
|
||||||
|
done
|
||||||
|
|
||||||
|
for conf_file in `ls ./bench_*.json`;do
|
||||||
|
echo "nohup taosBenchmark -f ${conf_file} &"
|
||||||
|
nohup taosBenchmark -f ${conf_file} &
|
||||||
|
done
|
||||||
|
|
||||||
|
cd -
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
{
|
||||||
|
"filetype": "insert",
|
||||||
|
"cfgdir": "/etc/taos/",
|
||||||
|
"host": "v3cluster-0001",
|
||||||
|
"port": 7100,
|
||||||
|
"user": "root",
|
||||||
|
"password": "taosdata",
|
||||||
|
"thread_count": 8,
|
||||||
|
"thread_count_create_tbl": 8,
|
||||||
|
"result_file": "./tpl_insert_result_tpl",
|
||||||
|
"confirm_parameter_prompt": "no",
|
||||||
|
"insert_interval": 0,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"num_of_records_per_req": 100000,
|
||||||
|
"databases": [
|
||||||
|
{
|
||||||
|
"dbinfo": {
|
||||||
|
"name": "db1",
|
||||||
|
"drop": "yes",
|
||||||
|
"vgroups": tpl_vgroups_tpl,
|
||||||
|
"replica": tpl_replica_tpl
|
||||||
|
},
|
||||||
|
"super_tables": [
|
||||||
|
{
|
||||||
|
"name": "stb_tpl_stid_tpl",
|
||||||
|
"child_table_exists": "no",
|
||||||
|
"childtable_count": tpl_ctables_tpl,
|
||||||
|
"childtable_prefix": "stb_tpl_stid_tpl_",
|
||||||
|
"auto_create_table": "no",
|
||||||
|
"batch_create_tbl_num": 50000,
|
||||||
|
"data_source": "rand",
|
||||||
|
"insert_mode": "taosc",
|
||||||
|
"insert_rows": tpl_rows_tpl,
|
||||||
|
"interlace_rows": 0,
|
||||||
|
"insert_interval": 0,
|
||||||
|
"max_sql_len": 10000000,
|
||||||
|
"disorder_ratio": 0,
|
||||||
|
"disorder_range": 1000,
|
||||||
|
"timestamp_step": 10,
|
||||||
|
"sample_format": "csv",
|
||||||
|
"use_sample_ts": "no",
|
||||||
|
"tags_file": "",
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"type": "INT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "DOUBLE",
|
||||||
|
"count": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "BINARY",
|
||||||
|
"len": 40,
|
||||||
|
"count": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "nchar",
|
||||||
|
"len": 20,
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"type": "TINYINT",
|
||||||
|
"count": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "BINARY",
|
||||||
|
"len": 16,
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue