Update testnet automation script to reflect changes in metrics (#3779)
This commit is contained in:
parent
7afd8644b3
commit
819a0c5c7e
|
@ -17,18 +17,22 @@ source ci/upload-ci-artifact.sh
|
||||||
LEADER_CPU_MACHINE_TYPE="n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100"
|
LEADER_CPU_MACHINE_TYPE="n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100"
|
||||||
[[ -n $CLIENT_COUNT ]] || CLIENT_COUNT=2
|
[[ -n $CLIENT_COUNT ]] || CLIENT_COUNT=2
|
||||||
[[ -n $TESTNET_TAG ]] || TESTNET_TAG=testnet-automation
|
[[ -n $TESTNET_TAG ]] || TESTNET_TAG=testnet-automation
|
||||||
[[ -n $TESTNET_ZONE ]] || TESTNET_ZONE=us-west1-b
|
[[ -n $TESTNET_ZONES ]] || TESTNET_ZONES="us-west1-b"
|
||||||
[[ -n $CHANNEL ]] || CHANNEL=beta
|
[[ -n $CHANNEL ]] || CHANNEL=beta
|
||||||
|
[[ -n $ADDITIONAL_FLAGS ]] || ADDITIONAL_FLAGS=""
|
||||||
|
|
||||||
|
TESTNET_CLOUD_ZONES=(); while read -r -d, ; do TESTNET_CLOUD_ZONES+=( "$REPLY" ); done <<< "${TESTNET_ZONES},"
|
||||||
|
|
||||||
launchTestnet() {
|
launchTestnet() {
|
||||||
declare nodeCount=$1
|
declare nodeCount=$1
|
||||||
echo --- setup "$nodeCount" node test
|
echo --- setup "$nodeCount" node test
|
||||||
|
|
||||||
|
# shellcheck disable=SC2068
|
||||||
net/gce.sh create \
|
net/gce.sh create \
|
||||||
-b \
|
|
||||||
-d pd-ssd \
|
-d pd-ssd \
|
||||||
-n "$nodeCount" -c "$CLIENT_COUNT" \
|
-n "$nodeCount" -c "$CLIENT_COUNT" \
|
||||||
-G "$LEADER_CPU_MACHINE_TYPE" \
|
-G "$LEADER_CPU_MACHINE_TYPE" \
|
||||||
-p "$TESTNET_TAG" -z "$TESTNET_ZONE"
|
-p "$TESTNET_TAG" ${TESTNET_CLOUD_ZONES[@]/#/-z } "$ADDITIONAL_FLAGS"
|
||||||
|
|
||||||
echo --- configure database
|
echo --- configure database
|
||||||
net/init-metrics.sh -e
|
net/init-metrics.sh -e
|
||||||
|
@ -43,37 +47,39 @@ launchTestnet() {
|
||||||
echo --- wait "$ITERATION_WAIT" seconds to complete test
|
echo --- wait "$ITERATION_WAIT" seconds to complete test
|
||||||
sleep "$ITERATION_WAIT"
|
sleep "$ITERATION_WAIT"
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
declare q_mean_tps='
|
declare q_mean_tps='
|
||||||
SELECT round(mean("sum_count")) AS "mean_tps" FROM (
|
SELECT round(mean("sum_count")) AS "mean_tps" FROM (
|
||||||
SELECT sum("count") AS "sum_count"
|
SELECT sum("count") AS "sum_count"
|
||||||
FROM "testnet-automation"."autogen"."counter-banking_stage-process_transactions"
|
FROM "testnet-automation"."autogen"."counter-bank-process_transactions-txs"
|
||||||
WHERE time > now() - 300s GROUP BY time(1s)
|
WHERE time > now() - 300s GROUP BY time(1s)
|
||||||
)'
|
)'
|
||||||
|
|
||||||
declare q_max_tps='
|
declare q_max_tps='
|
||||||
SELECT round(max("sum_count")) AS "max_tps" FROM (
|
SELECT round(max("sum_count")) AS "max_tps" FROM (
|
||||||
SELECT sum("count") AS "sum_count"
|
SELECT sum("count") AS "sum_count"
|
||||||
FROM "testnet-automation"."autogen"."counter-banking_stage-process_transactions"
|
FROM "testnet-automation"."autogen"."counter-bank-process_transactions-txs"
|
||||||
WHERE time > now() - 300s GROUP BY time(1s)
|
WHERE time > now() - 300s GROUP BY time(1s)
|
||||||
)'
|
)'
|
||||||
|
|
||||||
declare q_mean_confirmation='
|
declare q_mean_confirmation='
|
||||||
SELECT round(mean("duration_ms")) as "mean_confirmation"
|
SELECT round(mean("duration_ms")) as "mean_confirmation"
|
||||||
FROM "testnet-automation"."autogen"."leader-confirmation"
|
FROM "testnet-automation"."autogen"."validator-confirmation"
|
||||||
WHERE time > now() - 300s'
|
WHERE time > now() - 300s'
|
||||||
|
|
||||||
declare q_max_confirmation='
|
declare q_max_confirmation='
|
||||||
SELECT round(max("duration_ms")) as "max_confirmation"
|
SELECT round(max("duration_ms")) as "max_confirmation"
|
||||||
FROM "testnet-automation"."autogen"."leader-confirmation"
|
FROM "testnet-automation"."autogen"."validator-confirmation"
|
||||||
WHERE time > now() - 300s'
|
WHERE time > now() - 300s'
|
||||||
|
|
||||||
declare q_99th_confirmation='
|
declare q_99th_confirmation='
|
||||||
SELECT round(percentile("duration_ms", 99)) as "99th_confirmation"
|
SELECT round(percentile("duration_ms", 99)) as "99th_confirmation"
|
||||||
FROM "testnet-automation"."autogen"."leader-confirmation"
|
FROM "testnet-automation"."autogen"."validator-confirmation"
|
||||||
WHERE time > now() - 300s'
|
WHERE time > now() - 300s'
|
||||||
|
|
||||||
curl -G "https://metrics.solana.com:8086/query?u=${INFLUX_USERNAME}&p=${INFLUX_PASSWORD}" \
|
curl -G "${INFLUX_HOST}/query?u=ro&p=topsecret" \
|
||||||
--data-urlencode "db=$INFLUX_DATABASE" \
|
--data-urlencode "db=testnet-automation" \
|
||||||
--data-urlencode "q=$q_mean_tps;$q_max_tps;$q_mean_confirmation;$q_max_confirmation;$q_99th_confirmation" |
|
--data-urlencode "q=$q_mean_tps;$q_max_tps;$q_mean_confirmation;$q_max_confirmation;$q_99th_confirmation" |
|
||||||
python ci/testnet-automation-json-parser.py >>TPS"$nodeCount".log
|
python ci/testnet-automation-json-parser.py >>TPS"$nodeCount".log
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue