mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Performance comparison improvements.
This commit is contained in:
parent
5cf8253203
commit
9c8f52c058
@ -3,15 +3,16 @@ FROM ubuntu:18.04
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install --yes --no-install-recommends \
|
||||
p7zip-full bash ncdu wget python3 python3-pip python3-dev g++ \
|
||||
p7zip-full bash git ncdu wget psmisc python3 python3-pip python3-dev g++ \
|
||||
&& pip3 --no-cache-dir install clickhouse_driver \
|
||||
&& apt-get purge --yes python3-dev g++ \
|
||||
&& apt-get autoremove --yes \
|
||||
&& apt-get clean
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY * /
|
||||
|
||||
CMD /entrypoint.sh
|
||||
|
||||
# docker run --network=host --volume <workspace>:/workspace --volume=<output>:/output -e LEFT_PR=<> -e LEFT_SHA=<> -e RIGHT_PR=<> -e RIGHT_SHA=<> yandex/clickhouse-performance-comparison
|
||||
# docker run --network=host --volume <workspace>:/workspace --volume=<output>:/output -e PR_TO_TEST=<> -e SHA_TO_TEST=<> yandex/clickhouse-performance-comparison
|
||||
|
||||
|
@ -1,8 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
cd /workspace
|
||||
|
||||
../compare.sh $LEFT_PR $LEFT_SHA $RIGHT_PR $RIGHT_SHA > compare.log 2>&1
|
||||
# We will compare to the most recent testing tag in master branch, let's find it.
|
||||
rm -rf ch ||:
|
||||
git clone --branch master --single-branch --depth 50 --bare https://github.com/ClickHouse/ClickHouse ch
|
||||
ref_tag=$(cd ch && git describe --match='v*-testing' --abbrev=0 --first-parent master)
|
||||
echo Reference tag is $ref_tag
|
||||
# We use annotated tags which have their own shas, so we have to further
|
||||
# dereference the tag to get the commit it points to, hence the '~0' thing.
|
||||
ref_sha=$(cd ch && git rev-parse $ref_tag~0)
|
||||
echo Reference SHA is $ref_sha
|
||||
|
||||
../compare.sh 0 $ref_sha $PR_TO_TEST $SHA_TO_TEST > compare.log 2>&1
|
||||
|
||||
7z a /output/output.7z *.log *.tsv
|
||||
cp compare.log /output
|
||||
|
@ -7,7 +7,8 @@ import argparse
|
||||
import pprint
|
||||
|
||||
parser = argparse.ArgumentParser(description='Run performance test.')
|
||||
parser.add_argument('file', metavar='FILE', type=argparse.FileType('r'), nargs=1, help='test description file')
|
||||
# Explicitly decode files as UTF-8 because sometimes we have Russian characters in queries, and LANG=C is set.
|
||||
parser.add_argument('file', metavar='FILE', type=argparse.FileType('r', encoding='utf-8'), nargs=1, help='test description file')
|
||||
args = parser.parse_args()
|
||||
|
||||
tree = et.parse(args.file[0])
|
||||
@ -88,7 +89,7 @@ for q in test_queries:
|
||||
for run in range(0, 7):
|
||||
for conn_index, c in enumerate(connections):
|
||||
res = c.execute(q)
|
||||
print(tsv_escape(q) + '\t' + str(run) + '\t' + str(conn_index) + '\t' + str(c.last_query.elapsed))
|
||||
print(tsv_escape(q) + '\t' + str(run) + '\t' + str(conn_index) + '\t' + str(c.last_query.elapsed))
|
||||
|
||||
# Run drop queries
|
||||
drop_query_templates = [q.text for q in root.findall('drop_query')]
|
||||
|
Loading…
Reference in New Issue
Block a user