mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Merge pull request #11989 from ClickHouse/aku/long-perf
Try to enable long perf tests
This commit is contained in:
commit
588ff8fcc1
@ -7,6 +7,7 @@ import csv
|
|||||||
import itertools
|
import itertools
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import os.path
|
||||||
import pprint
|
import pprint
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
@ -324,6 +325,9 @@ if args.report == 'main':
|
|||||||
print_test_times()
|
print_test_times()
|
||||||
|
|
||||||
def print_benchmark_results():
|
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']]
|
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]
|
stats = [next(iter(x.values()))["statistics"] for x in json_reports]
|
||||||
qps = [x["QPS"] for x in stats]
|
qps = [x["QPS"] for x in stats]
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
<test>
|
<test>
|
||||||
|
<tags><tag>long</tag></tags>
|
||||||
|
|
||||||
<tags>
|
|
||||||
<tag>long</tag>
|
|
||||||
</tags>
|
|
||||||
|
|
||||||
|
|
||||||
<substitutions>
|
<substitutions>
|
||||||
<substitution>
|
<substitution>
|
||||||
<name>datetime_transform</name>
|
<name>datetime_transform</name>
|
||||||
@ -126,8 +120,8 @@
|
|||||||
</substitution>
|
</substitution>
|
||||||
</substitutions>
|
</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(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(10000000) 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(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(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(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, toStartOfInterval(t, INTERVAL 1 month))</query>
|
||||||
</test>
|
</test>
|
40
tests/performance/date_time_short.xml
Normal file
40
tests/performance/date_time_short.xml
Normal 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>
|
@ -1,10 +1,9 @@
|
|||||||
<test>
|
<!--
|
||||||
<tags>
|
The tests times are wildly different, e.g. toString(number % 100)
|
||||||
<tag>long</tag>
|
is 10 times faster than toString(number % 100 + 0.5). The shorter
|
||||||
</tags>
|
queries are somewhat unstable, so ignore differences less than 10%.
|
||||||
|
-->
|
||||||
|
<test max_ignored_relative_difference="0.1">
|
||||||
|
|
||||||
<substitutions>
|
<substitutions>
|
||||||
<substitution>
|
<substitution>
|
||||||
<name>expr</name>
|
<name>expr</name>
|
||||||
@ -49,6 +48,6 @@
|
|||||||
</substitution>
|
</substitution>
|
||||||
</substitutions>
|
</substitutions>
|
||||||
|
|
||||||
<query>SELECT count() FROM numbers(1000000) WHERE NOT ignore(toString({expr}))</query>
|
<query>SELECT count() FROM numbers(10000000) WHERE NOT ignore(toString({expr}))</query>
|
||||||
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(toString({expr_zero}))</query>
|
<query>SELECT count() FROM zeros(10000000) WHERE NOT ignore(toString({expr_zero}))</query>
|
||||||
</test>
|
</test>
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
<test>
|
<test>
|
||||||
<tags>
|
|
||||||
<tag>long</tag>
|
|
||||||
</tags>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<substitutions>
|
<substitutions>
|
||||||
<substitution>
|
<substitution>
|
||||||
<name>expr</name>
|
<name>expr</name>
|
||||||
|
@ -1,30 +1,37 @@
|
|||||||
<test>
|
<test>
|
||||||
<tags>
|
|
||||||
<tag>long</tag>
|
|
||||||
</tags>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<substitutions>
|
<substitutions>
|
||||||
<substitution>
|
<substitution>
|
||||||
<name>table</name>
|
<name>table_small</name>
|
||||||
<values>
|
<values>
|
||||||
<value>zeros(10000000)</value>
|
<value>zeros(10000000)</value>
|
||||||
<value>zeros_mt(100000000)</value>
|
<value>zeros_mt(100000000)</value>
|
||||||
</values>
|
</values>
|
||||||
</substitution>
|
</substitution>
|
||||||
<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>
|
<values>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
<value>16</value>
|
<value>16</value>
|
||||||
<value>1024</value>
|
<value>1024</value>
|
||||||
<value>16384</value>
|
<value>16384</value>
|
||||||
<value>1048576</value>
|
|
||||||
<value>10000000</value>
|
|
||||||
</values>
|
</values>
|
||||||
</substitution>
|
</substitution>
|
||||||
</substitutions>
|
</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>
|
</test>
|
||||||
|
Loading…
Reference in New Issue
Block a user