Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a3736583
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
提交
a3736583
编写于
8月 25, 2020
作者:
S
Shuduo Sang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change to v16/v20 instead of master/develop
上级
697ae8cb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
60 addition
and
26 deletion
+60
-26
tests/perftest-scripts/tdengineTestWriteLoop.sh
tests/perftest-scripts/tdengineTestWriteLoop.sh
+60
-26
未找到文件。
tests/perftest-scripts/tdengineTestWriteLoop.sh
浏览文件 @
a3736583
...
@@ -24,22 +24,46 @@ function runTest {
...
@@ -24,22 +24,46 @@ function runTest {
for
r
in
${
!rowsPerRequest[@]
}
;
do
for
r
in
${
!rowsPerRequest[@]
}
;
do
for
c
in
`
seq
1
$clients
`
;
do
for
c
in
`
seq
1
$clients
`
;
do
totalRPR
=
0
totalRPR
=
0
OUTPUT_FILE
=
tdengineTestWrite-RPR
${
rowsPerRequest
[
$r
]
}
-clients
$c
.out
if
$v16
;
then
OUTPUT_FILE
=
tdengineTestWrite-v16-RPR
${
rowsPerRequest
[
$r
]
}
-clients
$c
.out
else
OUTPUT_FILE
=
tdengineTestWrite-v20-RPR
${
rowsPerRequest
[
$r
]
}
-clients
$c
.out
fi
for
i
in
`
seq
1
$NUM_LOOP
`
;
do
for
i
in
`
seq
1
$NUM_LOOP
`
;
do
restartTaosd
if
!
$printresultonly
;
then
$TAOSD_DIR
/taos
-s
"drop database db"
>
/dev/null 2>&1
restartTaosd
printTo
"loop i:
$i
,
$TDTEST_DIR
/tdengineTest
\
$TAOSD_DIR
/taos
-s
"drop database db"
>
/dev/null 2>&1
if
$v16
;
then
printTo
"loop i:
$i
,
$TDTEST_DIR
/tdengineTest
\
-dataDir
$DATA_DIR
\
-dataDir
$DATA_DIR
\
-numOfFiles
$NUM_OF_FILES
\
-numOfFiles
$NUM_OF_FILES
\
-w -clients
$c
\
-writeClients
$c
\
-rowsPerRequest
${
rowsPerRequest
[
$r
]
}
"
-rowsPerRequest
${
rowsPerRequest
[
$r
]
}
\
$TDTEST_DIR
/tdengineTest
\
| tee
$OUTPUT_FILE
"
-dataDir
$DATA_DIR
\
$TDTEST_DIR
/tdengineTest
\
-numOfFiles
$NUM_OF_FILES
\
-dataDir
$DATA_DIR
\
-w
-clients
$c
\
-numOfFiles
$NUM_OF_FILES
\
-rowsPerRequest
${
rowsPerRequest
[
$r
]
}
\
-writeClients
$c
\
|
tee
$OUTPUT_FILE
-rowsPerRequest
${
rowsPerRequest
[
$r
]
}
\
|
tee
$OUTPUT_FILE
else
printTo
"loop i:
$i
,
$TDTEST_DIR
/tdengineTest
\
-dataDir
$DATA_DIR
\
-numOfFiles
$NUM_OF_FILES
\
-w -clients
$c
\
-rowsPerRequest
${
rowsPerRequest
[
$r
]
}
\
| tee
$OUTPUT_FILE
"
$TDTEST_DIR
/tdengineTest
\
-dataDir
$DATA_DIR
\
-numOfFiles
$NUM_OF_FILES
\
-w
-clients
$c
\
-rowsPerRequest
${
rowsPerRequest
[
$r
]
}
\
|
tee
$OUTPUT_FILE
fi
fi
RPR
=
`
cat
$OUTPUT_FILE
|
grep
speed |
awk
'{print $(NF-1)}'
`
RPR
=
`
cat
$OUTPUT_FILE
|
grep
speed |
awk
'{print $(NF-1)}'
`
totalRPR
=
`
echo
"scale=4;
$totalRPR
+
$RPR
"
| bc
`
totalRPR
=
`
echo
"scale=4;
$totalRPR
+
$RPR
"
| bc
`
printTo
"rows:
${
rowsPerRequest
[
$r
]
}
, clients:
$c
, i:
$i
RPR:
$RPR
"
printTo
"rows:
${
rowsPerRequest
[
$r
]
}
, clients:
$c
, i:
$i
RPR:
$RPR
"
...
@@ -86,25 +110,30 @@ function restartTaosd {
...
@@ -86,25 +110,30 @@ function restartTaosd {
################ Main ################
################ Main ################
master
=
false
v16
=
false
develop
=
true
v20
=
true
verbose
=
false
verbose
=
false
clients
=
1
clients
=
1
printresultonly
=
false
while
:
;
do
while
:
;
do
case
$1
in
case
$1
in
printresultonly
)
printresultonly
=
true
shift
;;
-v
)
-v
)
verbose
=
true
verbose
=
true
shift
;;
shift
;;
master
)
v16
)
master
=
true
v16
=
true
develop
=
false
v20
=
false
shift
;;
shift
;;
develop
)
v20
)
master
=
false
v16
=
false
develop
=
true
v20
=
true
shift
;;
shift
;;
-c
)
-c
)
...
@@ -120,19 +149,24 @@ while : ; do
...
@@ -120,19 +149,24 @@ while : ; do
esac
esac
done
done
if
$
master
;
then
if
$
v16
;
then
echo
"Test
master
branch.."
echo
"Test
v16
branch.."
cp
/mnt/root/cfg/master/taos.cfg /etc/taos/taos.cfg
WORK_DIR
=
/mnt/root/TDengine.v16
WORK_DIR
=
/mnt/root/TDengine.master
cp
/mnt/root/cfg/v16/taos.cfg /etc/taos/taos.cfg
else
else
echo
"Test
develop
branch.."
echo
"Test
v20
branch.."
cp
/mnt/root/cfg/
develop
/taos.cfg /etc/taos/taos.cfg
cp
/mnt/root/cfg/
v20
/taos.cfg /etc/taos/taos.cfg
WORK_DIR
=
/mnt/root/TDengine
WORK_DIR
=
/mnt/root/TDengine
fi
fi
TAOSD_DIR
=
$WORK_DIR
/debug/build/bin
TAOSD_DIR
=
$WORK_DIR
/debug/build/bin
TDTEST_DIR
=
$WORK_DIR
/tests/comparisonTest/tdengine
TDTEST_DIR
=
$WORK_DIR
/tests/comparisonTest/tdengine
if
[
!
-f
$TDTEST_DIR
/tdengineTest
]
;
then
echo
"Please build tdengineTest first!"
exit
1
fi
runTest
runTest
echo
"Test done!"
echo
"Test done!"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录