Merge pull request #11989 from ClickHouse/aku/long-perf

Try to enable long perf tests
This commit is contained in:
Alexander Kuzmenkov 2020-06-30 08:52:29 +03:00 committed by GitHub
commit 588ff8fcc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 75 additions and 37 deletions

View File

@ -7,6 +7,7 @@ import csv
import itertools
import json
import os
import os.path
import pprint
import sys
import traceback
@ -324,6 +325,9 @@ if args.report == 'main':
print_test_times()
def print_benchmark_results():
if not os.path.isfile('benchmark/website-left.json'):
return
json_reports = [json.load(open(f'benchmark/website-{x}.json')) for x in ['left', 'right']]
stats = [next(iter(x.values()))["statistics"] for x in json_reports]
qps = [x["QPS"] for x in stats]

View File

@ -1,11 +1,5 @@
<test>
<tags>
<tag>long</tag>
</tags>
<tags><tag>long</tag></tags>
<substitutions>
<substitution>
<name>datetime_transform</name>
@ -126,8 +120,8 @@
</substitution>
</substitutions>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, {datetime_transform}(t, '{time_zone}'))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(toDate('2017-01-01') + number % 1000 + rand() % 10 AS t, {date_transform}(t))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, {binary_function}(t, 1))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, toStartOfInterval(t, INTERVAL 1 month))</query>
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, {datetime_transform}(t, '{time_zone}'))</query>
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDate('2017-01-01') + number % 1000 + rand() % 10 AS t, {date_transform}(t))</query>
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, {binary_function}(t, 1))</query>
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, toStartOfInterval(t, INTERVAL 1 month))</query>
</test>

View File

@ -0,0 +1,40 @@
<test>
<!--
This is a short screening test for DateTime and Date. Some
other basic functions are tested by date_time_64, and a more
exhaustive list of functions is in date_time_long.xml (it's
about an hour so we can't afford to test it on each commit).
-->
<substitutions>
<substitution>
<name>date_transform</name>
<values>
<value>toDayOfWeek</value>
<value>toMonday</value>
<value>toRelativeDayNum</value>
<value>toYYYYMMDDhhmmss</value>
<value>toUnixTimestamp</value>
</values>
</substitution>
<substitution>
<name>time_zone</name>
<values>
<value>Europe/Moscow</value>
</values>
</substitution>
<substitution>
<name>binary_function</name>
<values>
<value>lessOrEquals</value>
<value>greater</value>
<value>plus</value>
<value>addWeeks</value>
</values>
</substitution>
</substitutions>
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, {date_transform}(t, '{time_zone}'))</query>
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDate('2017-01-01') + number % 1000 + rand() % 10 AS t, {date_transform}(t))</query>
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, {binary_function}(t, 1))</query>
<query>SELECT count() FROM numbers(100000000) WHERE NOT ignore(toDateTime('2017-01-01 00:00:00') + number % 100000000 + rand() % 100000 AS t, toStartOfInterval(t, INTERVAL 1 month))</query>
</test>

View File

@ -1,10 +1,9 @@
<test>
<tags>
<tag>long</tag>
</tags>
<!--
The tests times are wildly different, e.g. toString(number % 100)
is 10 times faster than toString(number % 100 + 0.5). The shorter
queries are somewhat unstable, so ignore differences less than 10%.
-->
<test max_ignored_relative_difference="0.1">
<substitutions>
<substitution>
<name>expr</name>
@ -49,6 +48,6 @@
</substitution>
</substitutions>
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(toString({expr}))</query>
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(toString({expr_zero}))</query>
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(toString({expr}))</query>
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(toString({expr_zero}))</query>
</test>

View File

@ -1,10 +1,4 @@
<test>
<tags>
<tag>long</tag>
</tags>
<substitutions>
<substitution>
<name>expr</name>

View File

@ -1,30 +1,37 @@
<test>
<tags>
<tag>long</tag>
</tags>
<substitutions>
<substitution>
<name>table</name>
<name>table_small</name>
<values>
<value>zeros(10000000)</value>
<value>zeros_mt(100000000)</value>
</values>
</substitution>
<substitution>
<name>size</name>
<name>table_large</name>
<values>
<value>zeros(100000000)</value>
<value>zeros_mt(1000000000)</value>
</values>
</substitution>
<substitution>
<name>size_large</name>
<values>
<value>1048576</value>
<value>10000000</value>
</values>
</substitution>
<substitution>
<name>size_small</name>
<values>
<value>1</value>
<value>16</value>
<value>1024</value>
<value>16384</value>
<value>1048576</value>
<value>10000000</value>
</values>
</substitution>
</substitutions>
<query>SELECT count() FROM {table} WHERE rand64() IN (SELECT number FROM system.numbers LIMIT {size})</query>
<query>SELECT count() FROM {table_large} WHERE rand64() IN (SELECT number FROM system.numbers LIMIT {size_small})</query>
<query>SELECT count() FROM {table_small} WHERE rand64() IN (SELECT number FROM system.numbers LIMIT {size_large})</query>
</test>