performance comparison

This commit is contained in:
Alexander Kuzmenkov 2020-03-17 05:41:47 +03:00
parent 41510275c5
commit f6d745de7f
2 changed files with 9 additions and 6 deletions

View File

@ -246,11 +246,13 @@ function get_profiles
right/clickhouse client --port 9001 --query "set query_profiler_real_time_period_ns = 0"
left/clickhouse client --port 9001 --query "select * from system.query_log where type = 2 format TSVWithNamesAndTypes" > left-query-log.tsv ||: &
left/clickhouse client --port 9001 --query "select * from system.query_thread_log format TSVWithNamesAndTypes" > left-query-thread-log.tsv ||: &
left/clickhouse client --port 9001 --query "select * from system.trace_log format TSVWithNamesAndTypes" > left-trace-log.tsv ||: &
left/clickhouse client --port 9001 --query "select arrayJoin(trace) addr, concat(splitByChar('/', addressToLine(addr))[-1], '#', demangle(addressToSymbol(addr)) ) name from system.trace_log group by addr format TSVWithNamesAndTypes" > left-addresses.tsv ||: &
left/clickhouse client --port 9001 --query "select * from system.metric_log format TSVWithNamesAndTypes" > left-metric-log.tsv ||: &
right/clickhouse client --port 9002 --query "select * from system.query_log where type = 2 format TSVWithNamesAndTypes" > right-query-log.tsv ||: &
right/clickhouse client --port 9002 --query "select * from system.query_thread_log format TSVWithNamesAndTypes" > right-query-thread-log.tsv ||: &
right/clickhouse client --port 9002 --query "select * from system.trace_log format TSVWithNamesAndTypes" > right-trace-log.tsv ||: &
right/clickhouse client --port 9002 --query "select arrayJoin(trace) addr, concat(splitByChar('/', addressToLine(addr))[-1], '#', demangle(addressToSymbol(addr)) ) name from system.trace_log group by addr format TSVWithNamesAndTypes" > right-addresses.tsv ||: &
right/clickhouse client --port 9002 --query "select * from system.metric_log format TSVWithNamesAndTypes" > right-metric-log.tsv ||: &
@ -382,8 +384,8 @@ create table unstable_run_metrics_2 engine File(TSVWithNamesAndTypes, 'unstable-
select v, n, query_id, query
from
(select
['memory_usage', 'read_bytes', 'written_bytes'] n,
[memory_usage, read_bytes, written_bytes] v,
['memory_usage', 'read_bytes', 'written_bytes', 'query_duration_ms'] n,
[memory_usage, read_bytes, written_bytes, query_duration_ms] v,
query,
query_id
from right_query_log
@ -433,6 +435,7 @@ do
query_file=$(echo "$query" | cut -c-120 | sed 's/[/]/_/g')
grep -F "$query " stacks.rep \
| cut -d' ' -f 2- \
| sed 's/\t/ /g' \
| tee "$query_file.stacks.rep" \
| ~/fg/flamegraph.pl > "$query_file.svg" &
done

View File

@ -223,15 +223,15 @@ def print_test_times():
attrs = ['' for c in columns]
for r in rows:
if float(r[6]) > 15:
if float(r[6]) > 22:
# FIXME should be 15s max -- investigate parallel_insert
slow_average_tests += 1
attrs[6] = 'style="background: #ffb0a0"'
else:
attrs[6] = ''
if float(r[5]) > 30:
# Just a hint for now.
# slow_average_tests += 1
slow_average_tests += 1
attrs[5] = 'style="background: #ffb0a0"'
else:
attrs[5] = ''
@ -260,7 +260,7 @@ print("""
""")
if slow_average_tests:
#status = 'failure'
status = 'failure'
message_array.append(str(slow_average_tests) + ' too long')
if faster_queries: