Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
69e0afed
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看板
未验证
提交
69e0afed
编写于
6月 08, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
6月 08, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2177 from taosdata/feature/sangshuduo/perftest-script-improve
update script to support wal param
上级
88168bb4
fb1f837d
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
124 addition
and
62 deletion
+124
-62
tests/perftest-scripts/perftest-csv2png.gnuplot
tests/perftest-scripts/perftest-csv2png.gnuplot
+1
-1
tests/perftest-scripts/perftest-daily.sh
tests/perftest-scripts/perftest-daily.sh
+59
-15
tests/perftest-scripts/perftest-taosdemo.sh
tests/perftest-scripts/perftest-taosdemo.sh
+45
-27
tests/perftest-scripts/perftest-tsdb-compare-13d.sh
tests/perftest-scripts/perftest-tsdb-compare-13d.sh
+6
-6
tests/perftest-scripts/perftest-tsdb-compare-1d.sh
tests/perftest-scripts/perftest-tsdb-compare-1d.sh
+6
-6
tests/perftest-scripts/runreal-13d-csv.sh
tests/perftest-scripts/runreal-13d-csv.sh
+1
-1
tests/perftest-scripts/runreal-1d-csv.sh
tests/perftest-scripts/runreal-1d-csv.sh
+1
-1
tests/perftest-scripts/taosdemo-csv2png.gnuplot
tests/perftest-scripts/taosdemo-csv2png.gnuplot
+5
-5
未找到文件。
tests/perftest-scripts/perftest-csv2png.gnuplot
浏览文件 @
69e0afed
...
...
@@ -2,7 +2,7 @@
reset
set terminal png
set title
"Performance Test Report"
font ",20"
set title
filename
font ",20"
set ylabel "Time in Seconds"
...
...
tests/perftest-scripts/perftest-daily.sh
浏览文件 @
69e0afed
...
...
@@ -16,9 +16,26 @@ function echoInfo { local args="$@"; white_brackets $(green_printf "INFO") &&
function
echoWarn
{
local
args
=
"
$@
"
;
echo
"
$(
white_brackets
"
$(
yellow_printf
"WARN"
)
"
&&
echo
"
${
args
}
"
;
)
"
1>&2
;
}
#
function
echoError
{
local
args
=
"
$@
"
;
echo
"
$(
white_brackets
"
$(
red_printf
"ERROR"
)
"
&&
echo
"
${
args
}
"
;
)
"
1>&2
;
}
#
function
set-Wal
{
function
setMaxConnections
{
echo
"/etc/taos/taos.cfg maxConnection will be set to
$1
"
hasText
=
`
grep
"maxConnections"
/etc/taos/taos.cfg
`
if
[[
-z
"
$hasText
"
]]
;
then
echo
"maxConnections
$1
"
>>
/etc/taos/taos.cfg
else
sed
-i
's/^maxConnections.*$/maxConnections '
"
$1
"
'/g'
/etc/taos/taos.cfg
fi
}
function
setWal
{
echo
"/etc/taos/taos.cfg walLevel will be set to
$1
"
hasText
=
`
grep
"walLevel"
/etc/taos/taos.cfg
`
if
[[
-z
"
$hasText
"
]]
;
then
echo
"walLevel
$1
"
>>
/etc/taos/taos.cfg
else
sed
-i
's/^walLevel.*$/walLevel '
"
$1
"
'/g'
/etc/taos/taos.cfg
fi
}
function
collectSysInfo
{
...
...
@@ -70,15 +87,25 @@ function sendReport {
mimebody
=
"MIME-Version: 1.0
\n
Content-Type: text/html; charset=utf-8
\n
"
echo
-e
"to:
${
receiver
}
\n
subject: Perf test report
${
today
}
, commit ID:
${
LOCAL_COMMIT
}
\n
"
|
\
(
cat
-
&&
uuencode perftest-1d-
$today
.log perftest-1d-
$today
.log
)
|
\
(
cat
-
&&
uuencode perftest-1d-report.csv perftest-1d-report-
$today
.csv
)
|
\
(
cat
-
&&
uuencode perftest-1d-report.png perftest-1d-report-
$today
.png
)
|
\
(
cat
-
&&
uuencode perftest-13d-
$today
.log perftest-13d-
$today
.log
)
|
\
(
cat
-
&&
uuencode perftest-13d-report.csv perftest-13d-report-
$today
.csv
)
|
\
(
cat
-
&&
uuencode perftest-13d-report.png perftest-13d-report-
$today
.png
)
|
\
(
cat
-
&&
uuencode taosdemo-
$today
.log taosdemo-
$today
.log
)
|
\
(
cat
-
&&
uuencode taosdemo-report.csv taosdemo-report-
$today
.csv
)
|
\
(
cat
-
&&
uuencode taosdemo-report.png taosdemo-report-
$today
.png
)
|
\
(
cat
-
&&
uuencode perftest-1d-wal1-
$today
.log perftest-1d-wal1-
$today
.log
)
|
\
(
cat
-
&&
uuencode perftest-1d-wal1-report.csv perftest-1d-wal1-report-
$today
.csv
)
|
\
(
cat
-
&&
uuencode perftest-1d-wal1-report.png perftest-1d-wal1-report-
$today
.png
)
|
\
(
cat
-
&&
uuencode perftest-13d-wal1-
$today
.log perftest-13d-wal1-
$today
.log
)
|
\
(
cat
-
&&
uuencode perftest-13d-wal1-report.csv perftest-13d-wal1-report-
$today
.csv
)
|
\
(
cat
-
&&
uuencode perftest-13d-wal1-report.png perftest-13d-wal1-report-
$today
.png
)
|
\
(
cat
-
&&
uuencode taosdemo-wal1-
$today
.log taosdemo-wal1-
$today
.log
)
|
\
(
cat
-
&&
uuencode taosdemo-wal1-report.csv taosdemo-wal1-report-
$today
.csv
)
|
\
(
cat
-
&&
uuencode taosdemo-rps-wal1-report.csv taosdemo-rps-wal1-report-
$today
.csv
)
|
\
(
cat
-
&&
uuencode taosdemo-wal1-report.png taosdemo-wal1-report-
$today
.png
)
|
\
(
cat
-
&&
uuencode perftest-1d-wal2-
$today
.log perftest-1d-wal2-
$today
.log
)
|
\
(
cat
-
&&
uuencode perftest-1d-wal2-report.csv perftest-1d-wal2-report-
$today
.csv
)
|
\
(
cat
-
&&
uuencode perftest-1d-wal2-report.png perftest-1d-wal2-report-
$today
.png
)
|
\
(
cat
-
&&
uuencode perftest-13d-wal2-
$today
.log perftest-13d-wal2-
$today
.log
)
|
\
(
cat
-
&&
uuencode perftest-13d-wal2-report.csv perftest-13d-wal2-report-
$today
.csv
)
|
\
(
cat
-
&&
uuencode perftest-13d-wal2-report.png perftest-13d-wal2-report-
$today
.png
)
|
\
(
cat
-
&&
uuencode taosdemo-wal2-
$today
.log taosdemo-wal2-
$today
.log
)
|
\
(
cat
-
&&
uuencode taosdemo-wal2-report.csv taosdemo-wal2-report-
$today
.csv
)
|
\
(
cat
-
&&
uuencode taosdemo-rps-wal2-report.csv taosdemo-rps-wal2-report-
$today
.csv
)
|
\
(
cat
-
&&
uuencode sysinfo.log sysinfo.txt
)
|
\
(
cat
-
&&
uuencode taos.cfg taos-cfg-
$today
.txt
)
|
\
ssmtp
"
${
receiver
}
"
...
...
@@ -91,17 +118,34 @@ echo -e "cron-ran-at-${today}" >> cron.log
echoInfo
"Build TDengine"
buildTDengine
set-Wal
"2"
############################
setMaxConnections 100
############################
setWal
"2"
cd
/root
./perftest-tsdb-compare-1d.sh
"wal2"
cd
/root
./perftest-tsdb-compare-13d.sh
"wal2"
cd
/root
./perftest-taosdemo.sh
"wal2"
#############################
setWal
"1"
cd
/root
./perftest-tsdb-compare-1d.sh
./perftest-tsdb-compare-1d.sh
"wal1"
cd
/root
./perftest-tsdb-compare-13d.sh
./perftest-tsdb-compare-13d.sh
"wal1"
cd
/root
./perftest-taosdemo.sh
./perftest-taosdemo.sh
"wal1"
#############################
collectSysInfo
echoInfo
"Send Report"
...
...
tests/perftest-scripts/perftest-taosdemo.sh
浏览文件 @
69e0afed
#!/bin/bash
# Coloured Echoes
#
function
red_echo
{
echo
-e
"
\0
33[31m
$@
\0
33[0m"
;
}
#
function
green_echo
{
echo
-e
"
\0
33[32m
$@
\0
33[0m"
;
}
#
function
yellow_echo
{
echo
-e
"
\0
33[33m
$@
\0
33[0m"
;
}
#
function
white_echo
{
echo
-e
"
\0
33[1;37m
$@
\0
33[0m"
;
}
#
# Coloured Printfs
#
function
red_printf
{
printf
"
\0
33[31m
$@
\0
33[0m"
;
}
#
function
green_printf
{
printf
"
\0
33[32m
$@
\0
33[0m"
;
}
#
function
yellow_printf
{
printf
"
\0
33[33m
$@
\0
33[0m"
;
}
#
function
white_printf
{
printf
"
\0
33[1;37m
$@
\0
33[0m"
;
}
#
# Debugging Outputs
#
function
white_brackets
{
local
args
=
"
$@
"
;
white_printf
"["
;
printf
"
${
args
}
"
;
white_printf
"]"
;
}
#
function
echoInfo
{
local
args
=
"
$@
"
;
white_brackets
$(
green_printf
"INFO"
)
&&
echo
"
${
args
}
"
;
}
#
function
echoWarn
{
local
args
=
"
$@
"
;
echo
"
$(
white_brackets
"
$(
yellow_printf
"WARN"
)
"
&&
echo
"
${
args
}
"
;
)
"
1>&2
;
}
#
function
echoError
{
local
args
=
"
$@
"
;
echo
"
$(
white_brackets
"
$(
red_printf
"ERROR"
)
"
&&
echo
"
${
args
}
"
;
)
"
1>&2
;
}
#
# Coloured Echoes
function
red_echo
{
echo
-e
"
\0
33[31m
$@
\0
33[0m"
;
}
function
green_echo
{
echo
-e
"
\0
33[32m
$@
\0
33[0m"
;
}
function
yellow_echo
{
echo
-e
"
\0
33[33m
$@
\0
33[0m"
;
}
function
white_echo
{
echo
-e
"
\0
33[1;37m
$@
\0
33[0m"
;
}
# Coloured Printfs
function
red_printf
{
printf
"
\0
33[31m
$@
\0
33[0m"
;
}
function
green_printf
{
printf
"
\0
33[32m
$@
\0
33[0m"
;
}
function
yellow_printf
{
printf
"
\0
33[33m
$@
\0
33[0m"
;
}
function
white_printf
{
printf
"
\0
33[1;37m
$@
\0
33[0m"
;
}
# Debugging Outputs
function
white_brackets
{
local
args
=
"
$@
"
;
white_printf
"["
;
printf
"
${
args
}
"
;
white_printf
"]"
;
}
function
echoInfo
{
local
args
=
"
$@
"
;
white_brackets
$(
green_printf
"INFO"
)
&&
echo
"
${
args
}
"
;
}
function
echoWarn
{
local
args
=
"
$@
"
;
echo
"
$(
white_brackets
"
$(
yellow_printf
"WARN"
)
"
&&
echo
"
${
args
}
"
;
)
"
1>&2
;
}
function
echoError
{
local
args
=
"
$@
"
;
echo
"
$(
white_brackets
"
$(
red_printf
"ERROR"
)
"
&&
echo
"
${
args
}
"
;
)
"
1>&2
;
}
function
restartTaosd
{
systemctl stop taosd
...
...
@@ -32,39 +32,57 @@ function runCreateTableOnly {
echoInfo
"Restart Taosd"
restartTaosd
/usr/bin/time
-f
"Total: %e"
-o
totaltime.out bash
-c
"yes | taosdemo -n 0 2>&1 | tee taosdemo-
$today
.log"
demoTableOnly
=
`
grep
"Total:"
totaltime.out|awk
'{print $2}'
`
/usr/bin/time
-f
"Total: %e"
-o
totaltime.out bash
-c
"yes | taosdemo -n 0 2>&1 | tee taosdemo-
$1
-
$today
.log"
demoCreateTableOnly
=
`
grep
"Total:"
totaltime.out|awk
'{print $2}'
`
}
function
runDeleteTableOnly
{
echoInfo
"Restart Taosd"
restartTaosd
/usr/bin/time
-f
"Total: %e"
-o
totaltime.out bash
-c
"yes | taosdemo -t 0 -D 1 2>&1 | tee taosdemo-
$1
-
$today
.log"
demoDeleteTableOnly
=
`
grep
"Total:"
totaltime.out|awk
'{print $2}'
`
}
function
runCreateTableThenInsert
{
echoInfo
"Restart Taosd"
restartTaosd
/usr/bin/time
-f
"Total: %e"
-o
totaltime.out bash
-c
"yes | taosdemo 2>&1 | tee -a taosdemo-
$today
.log"
/usr/bin/time
-f
"Total: %e"
-o
totaltime.out bash
-c
"yes | taosdemo 2>&1 | tee -a taosdemo-
$
1
-
$
today
.log"
demoTableAndInsert
=
`
grep
"Total:"
totaltime.out|awk
'{print $2}'
`
demoRPS
=
`
grep
"records
\/
second"
taosdemo-
$today
.log |
tail
-n1
|
awk
'{print $13}'
`
demoRPS
=
`
grep
"records
\/
second"
taosdemo-
$
1
-
$
today
.log |
tail
-n1
|
awk
'{print $13}'
`
}
function
generateTaosdemoPlot
{
echo
"
${
today
}
, demoTableOnly:
${
demoTableOnly
}
, demoTableAndInsert:
${
demoTableAndInsert
}
"
|
tee
-a
taosdemo-
$today
.log
echo
"
${
today
}
,
${
demoTableOnly
}
,
${
demoTableAndInsert
}
,
${
demoRPS
}
"
>>
taosdemo-report.csv
echo
"
${
today
}
$1
, demoCreateTableOnly:
${
demoCreateTableOnly
}
, demoDeleteTableOnly:
${
demoDeleteTableOnly
}
, demoTableAndInsert:
${
demoTableAndInsert
}
"
|
tee
-a
taosdemo-
$today
.log
echo
"
${
today
}
,
${
demoCreateTableOnly
}
,
${
demoDeleteTableOnly
}
,
${
demoTableAndInsert
}
"
>>
taosdemo-
$1
-report
.csv
echo
"
${
today
}
,
${
demoRPS
}
"
>>
taosdemo-rps-
$1
-report
.csv
csvLines
=
`
cat
taosdemo-report.csv |
wc
-l
`
csvLines
=
`
cat
taosdemo-
$1
-
report
.csv |
wc
-l
`
if
[
"
$csvLines
"
-gt
"10"
]
;
then
sed
-i
'1d'
taosdemo-report.csv
sed
-i
'1d'
taosdemo-
$1
-
report
.csv
fi
gnuplot
-p
taosdemo-csv2png.gnuplot
csvLines
=
`
cat
taosdemo-rps-
$1
-report
.csv |
wc
-l
`
if
[
"
$csvLines
"
-gt
"10"
]
;
then
sed
-i
'1d'
taosdemo-rps-
$1
-report
.csv
fi
gnuplot
-e
"filename='taosdemo-
$1
-report'"
-p
taosdemo-csv2png.gnuplot
gnuplot
-e
"filename='taosdemo-rps-
$1
-report'"
-p
taosdemo-rps-csv2png.gnuplot
}
today
=
`
date
+
"%Y%m%d"
`
cd
/root
echoInfo
"Test Create Table Only "
runCreateTableOnly
runCreateTableOnly
$1
echoInfo
"Test Create Table then Insert data"
runDeleteTableOnly
$1
echoInfo
"Test Create Table then Insert data"
runCreateTableThenInsert
runCreateTableThenInsert
$1
echoInfo
"Generate plot for taosdemo"
generateTaosdemoPlot
generateTaosdemoPlot
$1
echoInfo
"End of TaosDemo Test"
tests/perftest-scripts/perftest-tsdb-compare-13d.sh
浏览文件 @
69e0afed
...
...
@@ -33,26 +33,26 @@ function runPerfTest13d {
restartTaosd
cd
/home/taos/tliu/timeseriesdatabase-comparisons/build/tsdbcompare
./runreal-13d-csv.sh
2>&1 |
tee
/root/perftest-13d
-
$today
.log
./runreal-13d-csv.sh
$1
2>&1 |
tee
/root/perftest-13d-
$1
-
$today
.log
}
function
generatePerfPlot13d
{
cd
/root
csvLines
=
`
cat
perftest-13d-report.csv |
wc
-l
`
csvLines
=
`
cat
perftest-13d-
$1
-
report
.csv |
wc
-l
`
if
[
"
$csvLines
"
-gt
"10"
]
;
then
sed
-i
'1d'
perftest-13d-report.csv
sed
-i
'1d'
perftest-13d-
$1
-
report
.csv
fi
gnuplot
-e
"filename='perftest-13d-report'"
-p
perftest-csv2png.gnuplot
gnuplot
-e
"filename='perftest-13d-
$1
-
report'"
-p
perftest-csv2png.gnuplot
}
today
=
`
date
+
"%Y%m%d"
`
cd
/root
echoInfo
"run Performance Test with 13 days data"
runPerfTest13d
runPerfTest13d
$1
echoInfo
"Generate plot of 13 days data"
generatePerfPlot13d
generatePerfPlot13d
$1
echoInfo
"End of TSDB-Compare 13-days-data Test"
tests/perftest-scripts/perftest-tsdb-compare-1d.sh
浏览文件 @
69e0afed
...
...
@@ -33,26 +33,26 @@ function runPerfTest1d {
restartTaosd
cd
/home/taos/tliu/timeseriesdatabase-comparisons/build/tsdbcompare
./runreal-1d-csv.sh
2>&1 |
tee
/root/perftest-1d
-
$today
.log
./runreal-1d-csv.sh
$1
2>&1 |
tee
/root/perftest-1d-
$1
-
$today
.log
}
function
generatePerfPlot1d
{
cd
/root
csvLines
=
`
cat
perftest-1d-report.csv |
wc
-l
`
csvLines
=
`
cat
perftest-1d-
$1
-
report
.csv |
wc
-l
`
if
[
"
$csvLines
"
-gt
"10"
]
;
then
sed
-i
'2d'
perftest-1d-report.csv
sed
-i
'2d'
perftest-1d-
$1
-
report
.csv
fi
gnuplot
-e
"filename='perftest-1d-report'"
-p
perftest-csv2png.gnuplot
gnuplot
-e
"filename='perftest-1d-
$1
-
report'"
-p
perftest-csv2png.gnuplot
}
today
=
`
date
+
"%Y%m%d"
`
cd
/root
echoInfo
"run Performance Test with 1 day data"
runPerfTest1d
runPerfTest1d
$1
echoInfo
"Generate plot of 1 day data"
generatePerfPlot1d
generatePerfPlot1d
$1
echoInfo
"End of TSDB-Compare 1-day-data Test"
tests/perftest-scripts/runreal-13d-csv.sh
浏览文件 @
69e0afed
...
...
@@ -143,7 +143,7 @@ echo "------------------------------------------------------"
echo
today
=
`
date
+
"%Y%m%d"
`
echo
"
${
today
}
,
${
TDWTM
}
,
${
TDQ1
}
,
${
TDQ2
}
,
${
TDQ3
}
,
${
TDQ4
}
"
>>
/root/perftest-13d-report.csv
echo
"
${
today
}
,
${
TDWTM
}
,
${
TDQ1
}
,
${
TDQ2
}
,
${
TDQ3
}
,
${
TDQ4
}
"
>>
/root/perftest-13d-
$1
-
report
.csv
#bulk_query_gen/bulk_query_gen -format influx-http -query-type 1-host-1-hr -scale-var 10 -queries 1000 | query_benchmarker_influxdb/query_benchmarker_influxdb -urls="http://172.26.89.231:8086"
#bulk_query_gen/bulk_query_gen -format tdengine -query-type 1-host-1-hr -scale-var 10 -queries 1000 | query_benchmarker_tdengine/query_benchmarker_tdengine -urls="http://172.26.89.231:6020"
tests/perftest-scripts/runreal-1d-csv.sh
浏览文件 @
69e0afed
...
...
@@ -143,7 +143,7 @@ echo "------------------------------------------------------"
echo
today
=
`
date
+
"%Y%m%d"
`
echo
"
${
today
}
,
${
TDWTM
}
,
${
TDQ1
}
,
${
TDQ2
}
,
${
TDQ3
}
,
${
TDQ4
}
"
>>
/root/perftest-1d-report.csv
echo
"
${
today
}
,
${
TDWTM
}
,
${
TDQ1
}
,
${
TDQ2
}
,
${
TDQ3
}
,
${
TDQ4
}
"
>>
/root/perftest-1d-
$1
-
report
.csv
#bulk_query_gen/bulk_query_gen -format influx-http -query-type 1-host-1-hr -scale-var 10 -queries 1000 | query_benchmarker_influxdb/query_benchmarker_influxdb -urls="http://172.26.89.231:8086"
#bulk_query_gen/bulk_query_gen -format tdengine -query-type 1-host-1-hr -scale-var 10 -queries 1000 | query_benchmarker_tdengine/query_benchmarker_tdengine -urls="http://172.26.89.231:6020"
tests/perftest-scripts/taosdemo-csv2png.gnuplot
浏览文件 @
69e0afed
...
...
@@ -2,7 +2,7 @@
reset
set terminal png
set title
"TaosDemo Performance Report"
font ",20"
set title
filename
font ",20"
set ylabel "Time in Seconds"
...
...
@@ -14,13 +14,13 @@ set xlabel "Date"
set style data linespoints
set terminal pngcairo size 1024,768 enhanced font 'Segoe UI, 10'
set output
'taosdemo-report
.png'
set output
filename . '
.png'
set datafile separator ','
set key reverse Left outside
set grid
plot
'taosdemo-report.csv' using 1:2 title "Create 10,000 Table
", \
"" using 1:3 title "
Create 10,000 Table and Insert 100,000 data
", \
"" using 1:4 title "
Request Per Second of Insert 100,000 data
"
plot
filename . '.csv' using 1:2 title "Create 10,000 Tables
", \
"" using 1:3 title "
Delete 10,000 Tables
", \
"" using 1:4 title "
Create 10,000 Tables and Insert 100,000 records
"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录