Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
49beef86
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,发现更多精彩内容 >>
未验证
提交
49beef86
编写于
7月 24, 2020
作者:
A
alexey-milovidov
提交者:
GitHub
7月 24, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #12733 from ClickHouse/aku/perf-version
Choose proper old version for perf comparison
上级
7776adcf
acf1e5fe
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
45 deletion
+38
-45
docker/test/performance-comparison/download.sh
docker/test/performance-comparison/download.sh
+5
-15
docker/test/performance-comparison/entrypoint.sh
docker/test/performance-comparison/entrypoint.sh
+33
-30
未找到文件。
docker/test/performance-comparison/download.sh
浏览文件 @
49beef86
...
...
@@ -6,7 +6,6 @@ trap 'kill $(jobs -pr) ||:' EXIT
mkdir
db0
||
:
mkdir
left
||
:
mkdir
right
||
:
left_pr
=
$1
left_sha
=
$2
...
...
@@ -24,7 +23,7 @@ dataset_paths["values"]="https://clickhouse-datasets.s3.yandex.net/values_with_e
function
download
{
# Historically there were various path for the performance test package.
# Historically there were various path
s
for the performance test package.
# Test all of them.
for
path
in
"https://clickhouse-builds.s3.yandex.net/
$left_pr
/
$left_sha
/"
{
,clickhouse_build_check/
}
"performance/performance.tgz"
do
...
...
@@ -34,22 +33,13 @@ function download
fi
done
for
path
in
"https://clickhouse-builds.s3.yandex.net/
$right_pr
/
$right_sha
/"
{
,clickhouse_build_check/
}
"performance/performance.tgz"
do
if
curl
--fail
--head
"
$path
"
then
right_path
=
"
$path
"
fi
done
# might have the same version on left and right
if
!
[
"
$left_path
"
=
"
$right_path
"
]
# Might have the same version on left and right (for testing).
if
!
[
"
$left_sha
"
=
"
$right_sha
"
]
then
wget
-nv
-nd
-c
"
$left_path
"
-O-
|
tar
-C
left
--strip-components
=
1
-zxv
&
wget
-nv
-nd
-c
"
$right_path
"
-O-
|
tar
-C
right
--strip-components
=
1
-zxv
&
else
mkdir
righ
t
||
:
wget
-nv
-nd
-c
"
$left_path
"
-O-
|
tar
-C
left
--strip-components
=
1
-zxv
&&
cp
-a
left/
*
righ
t &
mkdir
lef
t
||
:
cp
-a
right/
*
lef
t &
fi
for
dataset_name
in
$datasets
...
...
docker/test/performance-comparison/entrypoint.sh
浏览文件 @
49beef86
#!/bin/bash
set
-ex
chown
nobody workspace output
chgrp
nogroup workspace output
chmod
777 workspace output
cd
workspace
# Fetch the repository to find and describe the compared revisions.
rm
-rf
ch
||
:
time
git clone
--depth
50
--bare
https://github.com/ClickHouse/ClickHouse ch
git
-C
ch fetch origin
"
$SHA_TO_TEST
"
# Use the packaged repository to find the revision we will compare to.
function
find_reference_sha
{
# If not master, try to fetch pull/.../{head,merge}
if
[
"
$PR_TO_TEST
"
!=
"0"
]
then
git
-C
ch fetch origin
"refs/pull/
$PR_TO_TEST
/*:refs/heads/pull/
$PR_TO_TEST
/*"
fi
# Go back from the revision to be tested, trying to find the closest published
# testing release.
start_ref
=
"
$SHA_TO_TEST
"
~
#
If we are testing a PR, and it merges with master successfully, we ar
e
#
building and testing not the nominal last SHA specified by pull/.../head
#
and SHA_TO_TEST, but a revision that is merged with recent master, given
#
by pull/.../merge ref
.
# Master is the first parent of the pull/.../merge.
if
git
-C
ch rev-parse
"pull/
$PR_TO_TEST
/merge"
# testing release.
The PR branch may be either pull/*/head which is the
# author's branch, or pull/*/merge, which is head merged with some master
#
automatically by Github. We will use a merge base with master as a referenc
e
#
for tesing (or some older commit). A caveat is that if we're testing the
#
master, the merge base is the tested commit itself, so we have to step back
#
once
.
start_ref
=
$(
git
-C
ch merge-base origin/master
pr
)
if
[
"PR_TO_TEST"
==
"0"
]
then
start_ref
=
"pull/
$PR_TO_TEST
/merge~"
start_ref
=
$start_ref
~
fi
# Loop back to find a commit that actually has a published perf test package.
while
:
do
# FIXME the original idea was to compare to a closest testing tag, which
...
...
@@ -48,10 +33,10 @@ function find_reference_sha
# dereference the tag to get the commit it points to, hence the '~0' thing.
REF_SHA
=
$(
git
-C
ch rev-parse
"
$ref_tag
~0"
)
# FIXME sometimes we have testing tags on commits without published builds
--
#
n
ormally these are documentation commits. Loop to skip them.
# Historically there were various path for the performance test package
.
#
T
est all of them.
# FIXME sometimes we have testing tags on commits without published builds
.
#
N
ormally these are documentation commits. Loop to skip them.
# Historically there were various path for the performance test package
,
#
t
est all of them.
unset
found
for
path
in
"https://clickhouse-builds.s3.yandex.net/0/
$REF_SHA
/"
{
,clickhouse_build_check/
}
"performance/performance.tgz"
do
...
...
@@ -69,6 +54,24 @@ function find_reference_sha
REF_PR
=
0
}
chown
nobody workspace output
chgrp
nogroup workspace output
chmod
777 workspace output
cd
workspace
# Download the package for the version we are going to test
for
path
in
"https://clickhouse-builds.s3.yandex.net/
$PR_TO_TEST
/
$SHA_TO_TEST
/"
{
,clickhouse_build_check/
}
"performance/performance.tgz"
do
if
curl
--fail
--head
"
$path
"
then
right_path
=
"
$path
"
fi
done
mkdir
right
wget
-nv
-nd
-c
"
$right_path
"
-O-
|
tar
-C
right
--strip-components
=
1
-zxv
# Find reference revision if not specified explicitly
if
[
"
$REF_SHA
"
==
""
]
;
then
find_reference_sha
;
fi
if
[
"
$REF_SHA
"
==
""
]
;
then
echo
Reference SHA is not specified
;
exit
1
;
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录