提交 009d3dc7 编写于 作者: A Alexander Kuzmenkov

performance comparison

上级 b3b40232
......@@ -130,7 +130,7 @@ function run_tests
rm left/performance/{IPv4,IPv6,modulo,parse_engine_file,number_formatting_formats,select_format}.xml ||:
# Run the tests
for test in left/performance/*.xml
for test in left/performance/${CHPC_TEST_GLOB:-*.xml}
do
test_name=$(basename $test ".xml")
echo test $test_name
......
......@@ -17,12 +17,16 @@ echo Reference tag is $ref_tag
ref_sha=$(cd ch && git rev-parse $ref_tag~0)
# Show what we're testing
echo Reference SHA is $ref_sha
(cd ch && git log -1 --decorate $ref_sha) ||:
echo
echo SHA to test is $SHA_TO_TEST
(cd ch && git log -1 --decorate $SHA_TO_TEST) ||:
echo
(
echo Reference SHA is $ref_sha
(cd ch && git log -1 --decorate $ref_sha) ||:
echo
) | tee left-commit.txt
(
echo SHA to test is $SHA_TO_TEST
(cd ch && git log -1 --decorate $SHA_TO_TEST) ||:
echo
) | tee right-commit.txt
# Set python output encoding so that we can print queries with Russian letters.
export PYTHONIOENCODING=utf-8
......@@ -36,5 +40,5 @@ set -m
time ../compare.sh 0 $ref_sha $PR_TO_TEST $SHA_TO_TEST 2>&1 | ts | tee compare.log
set +m
7z a /output/output.7z *.log *.tsv *.html
7z a /output/output.7z *.log *.tsv *.html *.txt
cp compare.log /output
......@@ -84,11 +84,16 @@ def tsv_rows(n):
params = collections.defaultdict(str)
params['header'] = "ClickHouse Performance Comparison"
params['test_part'] = (table_template.format_map(
collections.defaultdict(str,
params['test_part'] = (
table_template.format(
caption = 'Tested commits',
header = table_header(['Old', 'New']),
rows = table_row([open('left-commit.txt').read(), open('right-commit.txt').read()])
) +
table_template.format(
caption = 'Changes in performance',
header = table_header(['Old, s', 'New, s', 'Relative difference (new - old)/old', 'Randomization distribution quantiles [5%, 50%, 95%]', 'Query']),
rows = tsv_rows('changed-perf.tsv'))) +
rows = tsv_rows('changed-perf.tsv')) +
table_template.format(
caption = 'Slow on client',
header = table_header(['Client time, s', 'Server time, s', 'Ratio', 'Query']),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册