diff --git a/docker/test/performance-comparison/compare.sh b/docker/test/performance-comparison/compare.sh index ea7d9e74786d62258868bacd194371b55abb631f..c9a8f74822f8487a26e7d2ad4d8ff5fc9284ff22 100755 --- a/docker/test/performance-comparison/compare.sh +++ b/docker/test/performance-comparison/compare.sh @@ -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 diff --git a/docker/test/performance-comparison/entrypoint.sh b/docker/test/performance-comparison/entrypoint.sh index 3f86599b547052d6f239737c52bfca04372eb1d7..1f14e4f5d4ef89cfab2f97e51b27a66c566c85f7 100755 --- a/docker/test/performance-comparison/entrypoint.sh +++ b/docker/test/performance-comparison/entrypoint.sh @@ -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 diff --git a/docker/test/performance-comparison/report.py b/docker/test/performance-comparison/report.py index 1c95e98847c423fda0001aee00ace6f2f888d43f..650a1e8b931fd7cd9d56d161bed95b6cb4a87109 100755 --- a/docker/test/performance-comparison/report.py +++ b/docker/test/performance-comparison/report.py @@ -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']),