Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
89b712a1
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,发现更多精彩内容 >>
提交
89b712a1
编写于
8月 12, 2020
作者:
A
Alexander Kuzmenkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
performance comparison
上级
57eb912f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
23 addition
and
10 deletion
+23
-10
docker/test/performance-comparison/perf.py
docker/test/performance-comparison/perf.py
+23
-10
未找到文件。
docker/test/performance-comparison/perf.py
浏览文件 @
89b712a1
...
...
@@ -222,17 +222,22 @@ for query_index, q in enumerate(test_queries):
query_error_on_connection
[
conn_index
]
=
traceback
.
format_exc
();
continue
# If prewarm fails for the query on both servers -- report the error, skip
# the query and continue testing the next query.
if
query_error_on_connection
.
count
(
None
)
==
0
:
print
(
query_error_on_connection
[
0
],
file
=
sys
.
stderr
)
continue
# Report all errors that ocurred during prewarm and decide what to do next.
# If prewarm fails for the query on all servers -- skip the query and
# continue testing the next query.
# If prewarm fails on one of the servers, run the query on the rest of them.
# Useful for queries that use new functions added in the new server version.
if
query_error_on_connection
.
count
(
None
)
<
len
(
query_error_on_connection
):
no_error
=
[
i
for
i
,
e
in
enumerate
(
query_error_on_connection
)
if
not
e
]
print
(
f
'partial
\t
{
query_index
}
\t
{
no_error
}
'
)
no_errors
=
[]
for
i
,
e
in
enumerate
(
query_error_on_connection
):
if
e
:
print
(
e
,
file
=
sys
.
stderr
)
else
:
no_errors
.
append
(
i
)
if
len
(
no_errors
)
==
0
:
continue
elif
len
(
no_errors
)
<
len
(
connections
):
print
(
f
'partial
\t
{
query_index
}
\t
{
no_errors
}
'
)
# Now, perform measured runs.
# Track the time spent by the client to process this query, so that we can
...
...
@@ -245,7 +250,15 @@ for query_index, q in enumerate(test_queries):
for
conn_index
,
c
in
enumerate
(
connections
):
if
query_error_on_connection
[
conn_index
]:
continue
res
=
c
.
execute
(
q
,
query_id
=
run_id
)
try
:
res
=
c
.
execute
(
q
,
query_id
=
run_id
)
except
Exception
as
e
:
# Add query id to the exception to make debugging easier.
e
.
args
=
(
run_id
,
*
e
.
args
)
e
.
message
=
run_id
+
': '
+
e
.
message
raise
print
(
f
'query
\t
{
query_index
}
\t
{
run_id
}
\t
{
conn_index
}
\t
{
c
.
last_query
.
elapsed
}
'
)
server_seconds
+=
c
.
last_query
.
elapsed
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录