Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
1c2fe333
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1c2fe333
编写于
2月 28, 2020
作者:
A
Alexander Kuzmenkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
performance comparison
上级
6a562ea8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
12 deletion
+26
-12
docker/test/performance-comparison/compare.sh
docker/test/performance-comparison/compare.sh
+12
-6
docker/test/performance-comparison/perf.py
docker/test/performance-comparison/perf.py
+11
-6
docker/test/performance-comparison/report.py
docker/test/performance-comparison/report.py
+3
-0
未找到文件。
docker/test/performance-comparison/compare.sh
浏览文件 @
1c2fe333
...
...
@@ -204,6 +204,11 @@ function run_tests
grep
^query
"
$test_name
-raw.tsv"
|
cut
-f2-
>
"
$test_name
-queries.tsv"
grep
^client-time
"
$test_name
-raw.tsv"
|
cut
-f2-
>
"
$test_name
-client-time.tsv"
skipped
=
$(
grep
^skipped
"
$test_name
-raw.tsv"
|
cut
-f2-
)
if
[
"
$skipped
"
!=
""
]
then
printf
"
$test_name
""
\t
""
$skipped
""
\n
"
>>
skipped-tests.tsv
fi
done
unset
TIMEFORMAT
...
...
@@ -399,7 +404,7 @@ IFS=$'\n'
for
query
in
$(
cut
-d
' '
-f1
stacks.rep |
sort
|
uniq
)
do
query_file
=
$(
echo
"
$query
"
|
cut
-c-120
|
sed
's/[/]/_/g'
)
grep
-F
"
$query
"
stacks.rep
\
grep
-F
"
$query
"
stacks.rep
\
|
cut
-d
' '
-f
2-
\
|
tee
"
$query_file
.stacks.rep"
\
| ~/fg/flamegraph.pl
>
"
$query_file
.svg"
&
...
...
@@ -427,16 +432,17 @@ case "$stage" in
time
restart
;
&
"run_tests"
)
# If the tests fail with OOM or something, still try to restart the servers
# to collect the logs.
# Ignore the errors to collect the log anyway
time
run_tests
||
:
time
restart
;
&
"get_profiles"
)
time
get_profiles
# If the tests fail with OOM or something, still try to restart the servers
# to collect the logs. Prefer not to restart, because addresses might change
# and we won't be able to process trace_log data.
time
get_profiles
||
restart
||
get_profiles
;
&
"analyze_queries"
)
analyze_queries
time
analyze_queries
;
&
"report"
)
time
report
...
...
docker/test/performance-comparison/perf.py
浏览文件 @
1c2fe333
...
...
@@ -46,18 +46,23 @@ connections = [clickhouse_driver.Client(**server) for server in servers]
report_stage_end
(
'connect'
)
# Check tables that should exist
tables
=
[
e
.
text
for
e
in
root
.
findall
(
'preconditions/table_exists'
)]
for
t
in
tables
:
for
c
in
connections
:
res
=
c
.
execute
(
"show create table {}"
.
format
(
t
))
# Apply settings
settings
=
root
.
findall
(
'settings/*'
)
for
c
in
connections
:
for
s
in
settings
:
c
.
execute
(
"set {} = '{}'"
.
format
(
s
.
tag
,
s
.
text
))
# Check tables that should exist. If they don't exist, just skip this test.
tables
=
[
e
.
text
for
e
in
root
.
findall
(
'preconditions/table_exists'
)]
for
t
in
tables
:
for
c
in
connections
:
try
:
res
=
c
.
execute
(
"show create table {}"
.
format
(
t
))
except
:
print
(
'skipped
\t
'
+
traceback
.
format_exception_only
(
*
sys
.
exc_info
()[:
2
])[
-
1
])
traceback
.
print_exc
()
sys
.
exit
(
0
)
report_stage_end
(
'preconditions'
)
# Process substitutions
...
...
docker/test/performance-comparison/report.py
浏览文件 @
1c2fe333
...
...
@@ -192,6 +192,9 @@ run_error_rows = tsvRows('run-errors.tsv')
error_tests
+=
len
(
run_error_rows
)
printSimpleTable
(
'Run errors'
,
[
'Test'
,
'Error'
],
run_error_rows
)
skipped_tests_rows
=
tsvRows
(
'skipped-tests.tsv'
)
printSimpleTable
(
'Skipped tests'
,
[
'Test'
,
'Reason'
],
skipped_tests_rows
)
printSimpleTable
(
'Tests with most unstable queries'
,
[
'Test'
,
'Unstable'
,
'Changed perf'
,
'Total not OK'
],
tsvRows
(
'bad-tests.tsv'
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录