Skip to content

Commit

Permalink
[no-release-notes] fix benchmarking queries (#8421)
Browse files Browse the repository at this point in the history
  • Loading branch information
jycor authored Oct 8, 2024
1 parent 46d9f7c commit 217efe6
Showing 1 changed file with 6 additions and 122 deletions.
128 changes: 6 additions & 122 deletions .github/scripts/performance-benchmarking/get-dolt-dolt-job-json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '
{
Expand Down

0 comments on commit 217efe6

Please sign in to comment.