mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-25 00:54:51 -06:00
[no-release-notes] fix benchmarking queries (#8421)
This commit is contained in:
@@ -33,133 +33,17 @@ if [ -n "$withTpcc" ]; then
|
||||
withTpcc="\"--withTpcc=$withTpcc\","
|
||||
fi
|
||||
|
||||
readTests="(
|
||||
'oltp_read_only',
|
||||
'oltp_point_select',
|
||||
'select_random_points',
|
||||
'select_random_ranges',
|
||||
'covering_index_scan',
|
||||
'index_scan',
|
||||
'table_scan',
|
||||
'groupby_scan',
|
||||
'index_join_scan',
|
||||
'types_table_scan',
|
||||
'index_join'
|
||||
)"
|
||||
readTests="('oltp_read_only','oltp_point_select','select_random_points','select_random_ranges','covering_index_scan','index_scan','table_scan','groupby_scan','index_join_scan','types_table_scan','index_join')"
|
||||
|
||||
medianLatencyChangeReadsQuery="
|
||||
with result(test_name, from_latency, to_latency) as (
|
||||
select
|
||||
f.test_name,
|
||||
avg(f.latency_percentile),
|
||||
avg(t.latency_percentile)
|
||||
from
|
||||
from_results as f
|
||||
join
|
||||
to_results as t
|
||||
on
|
||||
f.test_name = t.test_name
|
||||
where
|
||||
f.test_name in $readTests
|
||||
group by
|
||||
f.test_name
|
||||
)
|
||||
select
|
||||
test_name as read_tests,
|
||||
from_latency,
|
||||
to_latency,
|
||||
round(100 * ((from_latency - to_latency) / from_latency), 2) as percent_change
|
||||
from result;"
|
||||
medianLatencyChangeReadsQuery="with result(test_name, from_latency, to_latency) as (select f.test_name, avg(f.latency_percentile), avg(t.latency_percentile) from from_results as f join to_results as t on f.test_name = t.test_name where f.test_name in $readTests group by f.test_name) select test_name as read_tests, from_latency, to_latency, round(100 * ((from_latency - to_latency) / from_latency), 2) as percent_change from result;"
|
||||
|
||||
writeTests="(
|
||||
'oltp_read_write',
|
||||
'oltp_update_index',
|
||||
'oltp_update_non_index',
|
||||
'oltp_insert',
|
||||
'oltp_write_only',
|
||||
'oltp_delete_insert',
|
||||
'types_delete_insert'
|
||||
)"
|
||||
writeTests="('oltp_read_write','oltp_update_index','oltp_update_non_index','oltp_insert','oltp_write_only','oltp_delete_insert','types_delete_insert')"
|
||||
|
||||
medianLatencyChangeWritesQuery="
|
||||
with result(test_name, from_latency, to_latency) as (
|
||||
select
|
||||
f.test_name,
|
||||
avg(f.latency_percentile),
|
||||
avg(t.latency_percentile)
|
||||
from
|
||||
from_results as f
|
||||
join
|
||||
to_results as t
|
||||
on
|
||||
f.test_name = t.test_name
|
||||
where
|
||||
f.test_name in $writeTests
|
||||
group by
|
||||
f.test_name
|
||||
)
|
||||
select
|
||||
test_name as write_tests,
|
||||
from_latency,
|
||||
to_latency,
|
||||
round(100 * ((from_latency - to_latency) / from_latency), 2) as percent_change
|
||||
from result;"
|
||||
medianLatencyChangeWritesQuery="with result(test_name, from_latency, to_latency) as (select f.test_name, avg(f.latency_percentile), avg(t.latency_percentile) from from_results as f join to_results as t on f.test_name = t.test_name where f.test_name in $writeTests group by f.test_name) select test_name as write_tests, from_latency, to_latency, round(100 * ((from_latency - to_latency) / from_latency), 2) as percent_change from result;"
|
||||
|
||||
tpccLatencyQuery="
|
||||
with result(test_name, from_latency, to_latency) as (
|
||||
select
|
||||
f.test_name,
|
||||
avg(f.latency_percentile) + 0.001,
|
||||
avg(t.latency_percentile) + 0.001
|
||||
from
|
||||
from_results as f
|
||||
join
|
||||
to_results as t
|
||||
on
|
||||
f.test_name = t.test_name
|
||||
where
|
||||
f.test_name LIKE '$tpccRegex'
|
||||
group by
|
||||
f.test_name
|
||||
)
|
||||
select
|
||||
test_name,
|
||||
from_latency as from_latency_p95,
|
||||
to_latency as to_latency_p95,
|
||||
round(100 * ((from_latency - to_latency) / from_latency), 2) as percentage_change
|
||||
from result;"
|
||||
tpccLatencyQuery="with result(test_name, from_latency, to_latency) as (select f.test_name, avg(f.latency_percentile), avg(t.latency_percentile) from from_results as f join to_results as t on f.test_name = t.test_name where f.test_name LIKE '$tpccRegex' group by f.test_name) select test_name, from_latency as from_latency_p95, to_latency as to_latency_p95, round(100 * ((from_latency - to_latency) / from_latency), 2) as percentage_change from result;"
|
||||
|
||||
tpccTpsQuery="
|
||||
with result(test_name, from_server_name, from_server_version, from_tps, to_server_name, to_server_version, to_tps) as (
|
||||
select
|
||||
f.test_name,
|
||||
f.server_name,
|
||||
f.server_version,
|
||||
avg(f.sql_transactions_per_second),
|
||||
t.server_name,
|
||||
t.server_version,
|
||||
avg(t.sql_transactions_per_second)
|
||||
from
|
||||
from_results as f
|
||||
join
|
||||
to_results as t
|
||||
on
|
||||
f.test_name = t.test_name
|
||||
where
|
||||
f.test_name LIKE 'tpcc%'
|
||||
group by
|
||||
f.test_name
|
||||
)
|
||||
select
|
||||
test_name,
|
||||
from_server_name,
|
||||
from_server_version,
|
||||
from_tps,
|
||||
to_server_name,
|
||||
to_server_version,
|
||||
to_tps,
|
||||
round(100 * ((from_tps - to_tps) / from_tps), 2) as percentage_change
|
||||
from result;"
|
||||
tpccTpsQuery="with result(test_name, from_server_name, from_server_version, from_tps, to_server_name, to_server_version, to_tps) as (select f.test_name, f.server_name, f.server_version, avg(f.sql_transactions_per_second), t.server_name, t.server_version, avg(t.sql_transactions_per_second) from from_results as f join to_results as t on f.test_name = t.test_name where f.test_name LIKE 'tpcc%' group by f.test_name) select test_name, from_server_name, from_server_version, from_tps, to_server_name, to_server_version, to_tps, round(100 * ((from_tps - to_tps) / from_tps), 2) as percentage_change from result;"
|
||||
|
||||
echo '
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user