Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
7dc12d7e
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1181
Star
22014
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7dc12d7e
编写于
7月 29, 2022
作者:
M
Minghao Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(sync): add test case
上级
22635992
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
122 addition
and
0 deletion
+122
-0
source/libs/sync/test/sh/auto_bench.sh
source/libs/sync/test/sh/auto_bench.sh
+45
-0
source/libs/sync/test/sh/insert.tpl.json
source/libs/sync/test/sh/insert.tpl.json
+77
-0
未找到文件。
source/libs/sync/test/sh/auto_bench.sh
0 → 100644
浏览文件 @
7dc12d7e
#!/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
source/libs/sync/test/sh/insert.tpl.json
0 → 100644
浏览文件 @
7dc12d7e
{
"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
}
]
}
]
}
]
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录