From 7d650eff8d49e4fd56cd568d7e0382fbdff0dab0 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Tue, 22 Oct 2019 16:27:26 -0600 Subject: [PATCH] Match TPS stats to Grafana dashboard (#6506) * Match TPS stats to Grafana dashboard * Add label names --- .../testnet-performance/testnet-automation.sh | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/system-test/testnet-performance/testnet-automation.sh b/system-test/testnet-performance/testnet-automation.sh index 4a33c70a11..af2fea0bb9 100755 --- a/system-test/testnet-performance/testnet-automation.sh +++ b/system-test/testnet-performance/testnet-automation.sh @@ -119,17 +119,23 @@ launchTestnet() { echo --- collect statistics about run declare q_mean_tps=' - SELECT round(mean("sum_count")) AS "mean_tps" FROM ( - SELECT sum("count") AS "sum_count" - FROM "'$TESTNET_TAG'"."autogen"."banking_stage-record_transactions" - WHERE time > now() - '"$TEST_DURATION_SECONDS"'s GROUP BY time(1s) + SELECT ROUND(MEAN("median_sum")) as "mean_tps" FROM ( + SELECT MEDIAN(sum_count) AS "median_sum" FROM ( + SELECT SUM("count") AS "sum_count" + FROM "'$TESTNET_TAG'"."autogen"."bank-process_transactions" + WHERE time > now() - '"$TEST_DURATION_SECONDS"'s AND count > 0 + GROUP BY time(1s), host_id) + GROUP BY time(1s) )' declare q_max_tps=' - SELECT round(max("sum_count")) AS "max_tps" FROM ( - SELECT sum("count") AS "sum_count" - FROM "'$TESTNET_TAG'"."autogen"."banking_stage-record_transactions" - WHERE time > now() - '"$TEST_DURATION_SECONDS"'s GROUP BY time(1s) + SELECT MAX("median_sum") as "max_tps" FROM ( + SELECT MEDIAN(sum_count) AS "median_sum" FROM ( + SELECT SUM("count") AS "sum_count" + FROM "'$TESTNET_TAG'"."autogen"."bank-process_transactions" + WHERE time > now() - '"$TEST_DURATION_SECONDS"'s AND count > 0 + GROUP BY time(1s), host_id) + GROUP BY time(1s) )' declare q_mean_confirmation='