Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
1e96eb75
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1e96eb75
编写于
7月 09, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tests
上级
a45f3dd6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
78 addition
and
1 deletion
+78
-1
tests/script/tmp/mnodes.sim
tests/script/tmp/mnodes.sim
+71
-0
tests/test/c/createTablePerformance.c
tests/test/c/createTablePerformance.c
+7
-1
未找到文件。
tests/script/tmp/mnodes.sim
浏览文件 @
1e96eb75
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/cfg.sh -n dnode1 -c walLevel -v 2
system sh/cfg.sh -n dnode2 -c walLevel -v 2
system sh/cfg.sh -n dnode3 -c walLevel -v 2
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 20
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 20
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 20
system sh/cfg.sh -n dnode1 -c http -v 1
system sh/cfg.sh -n dnode2 -c http -v 1
system sh/cfg.sh -n dnode3 -c http -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2001
sql connect
sql create dnode $hostname2
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
print =============== step1
$x = 0
show1:
$x = $x + 1
sleep 2000
if $x == 5 then
return -1
endi
sql show mnodes -x show1
$mnode1Role = $data2_1
print mnode1Role $mnode1Role
$mnode2Role = $data2_2
print mnode2Role $mnode2Role
$mnode3Role = $data2_3
print mnode3Role $mnode3Role
if $mnode1Role != master then
goto show1
endi
if $mnode2Role != slave then
goto show1
endi
if $mnode3Role != slave then
goto show1
endi
$x = 1
show2:
print =============== step $x
sql show mnodes
print $data0_1 $data2_1
print $data0_2 $data2_2
print $data0_3 $data2_3
$x = $x + 1
sleep 2000
if $x == 1000 then
return -1
endi
goto show2
tests/test/c/createTablePerformance.c
浏览文件 @
1e96eb75
...
...
@@ -31,6 +31,7 @@ char stableName[64] = "st";
int32_t
numOfThreads
=
30
;
int32_t
numOfTables
=
100000
;
int32_t
maxTables
=
5000
;
int32_t
replica
=
1
;
int32_t
numOfColumns
=
2
;
typedef
struct
{
...
...
@@ -96,7 +97,7 @@ void createDbAndSTable() {
exit
(
1
);
}
sprintf
(
qstr
,
"create database if not exists %s maxtables %d
"
,
dbName
,
maxTables
);
sprintf
(
qstr
,
"create database if not exists %s maxtables %d
replica %d"
,
dbName
,
maxTables
,
replica
);
TAOS_RES
*
pSql
=
taos_query
(
con
,
qstr
);
int32_t
code
=
taos_errno
(
pSql
);
if
(
code
!=
0
)
{
...
...
@@ -189,6 +190,8 @@ void printHelp() {
printf
(
"%s%s%s%d
\n
"
,
indent
,
indent
,
"numOfThreads, default is "
,
numOfThreads
);
printf
(
"%s%s
\n
"
,
indent
,
"-n"
);
printf
(
"%s%s%s%d
\n
"
,
indent
,
indent
,
"numOfTables, default is "
,
numOfTables
);
printf
(
"%s%s
\n
"
,
indent
,
"-r"
);
printf
(
"%s%s%s%d
\n
"
,
indent
,
indent
,
"replica, default is "
,
replica
);
printf
(
"%s%s
\n
"
,
indent
,
"-columns"
);
printf
(
"%s%s%s%d
\n
"
,
indent
,
indent
,
"numOfColumns, default is "
,
numOfColumns
);
printf
(
"%s%s
\n
"
,
indent
,
"-tables"
);
...
...
@@ -212,6 +215,8 @@ void shellParseArgument(int argc, char *argv[]) {
numOfThreads
=
atoi
(
argv
[
++
i
]);
}
else
if
(
strcmp
(
argv
[
i
],
"-n"
)
==
0
)
{
numOfTables
=
atoi
(
argv
[
++
i
]);
}
else
if
(
strcmp
(
argv
[
i
],
"-r"
)
==
0
)
{
replica
=
atoi
(
argv
[
++
i
]);
}
else
if
(
strcmp
(
argv
[
i
],
"-tables"
)
==
0
)
{
maxTables
=
atoi
(
argv
[
++
i
]);
}
else
if
(
strcmp
(
argv
[
i
],
"-columns"
)
==
0
)
{
...
...
@@ -226,6 +231,7 @@ void shellParseArgument(int argc, char *argv[]) {
pPrint
(
"%s numOfTables:%d %s"
,
GREEN
,
numOfTables
,
NC
);
pPrint
(
"%s numOfThreads:%d %s"
,
GREEN
,
numOfThreads
,
NC
);
pPrint
(
"%s numOfColumns:%d %s"
,
GREEN
,
numOfColumns
,
NC
);
pPrint
(
"%s replica:%d %s"
,
GREEN
,
replica
,
NC
);
pPrint
(
"%s dbPara maxTables:%d %s"
,
GREEN
,
maxTables
,
NC
);
pPrint
(
"%s start create table performace test %s"
,
GREEN
,
NC
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录