Add slot rate check to automation framework (#8676)
This commit is contained in:
parent
cb6848aa80
commit
f2b0e2f418
|
@ -71,6 +71,12 @@ function wait_for_bootstrap_validator_stake_drop {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_slot {
|
||||||
|
source net/common.sh
|
||||||
|
loadConfigFile
|
||||||
|
ssh "${sshOptions[@]}" "${validatorIpList[0]}" '$HOME/.cargo/bin/solana slot'
|
||||||
|
}
|
||||||
|
|
||||||
function cleanup_testnet {
|
function cleanup_testnet {
|
||||||
RC=$?
|
RC=$?
|
||||||
if [[ $RC != 0 ]]; then
|
if [[ $RC != 0 ]]; then
|
||||||
|
@ -197,6 +203,10 @@ function launchTestnet() {
|
||||||
--gpu-mode $startGpuMode --client-delay-start $CLIENT_DELAY_START
|
--gpu-mode $startGpuMode --client-delay-start $CLIENT_DELAY_START
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
START_SLOT=$(get_slot)
|
||||||
|
SLOT_COUNT_START_SECONDS=$SECONDS
|
||||||
|
execution_step "Slot: $START_SLOT, Seconds: $SLOT_COUNT_START_SECONDS"
|
||||||
|
|
||||||
execution_step "Waiting for bootstrap validator's stake percentage to fall below $BOOTSTRAP_VALIDATOR_MAX_STAKE_THRESHOLD %"
|
execution_step "Waiting for bootstrap validator's stake percentage to fall below $BOOTSTRAP_VALIDATOR_MAX_STAKE_THRESHOLD %"
|
||||||
wait_for_bootstrap_validator_stake_drop "$BOOTSTRAP_VALIDATOR_MAX_STAKE_THRESHOLD"
|
wait_for_bootstrap_validator_stake_drop "$BOOTSTRAP_VALIDATOR_MAX_STAKE_THRESHOLD"
|
||||||
|
|
||||||
|
@ -223,7 +233,14 @@ function launchTestnet() {
|
||||||
# We should never get here
|
# We should never get here
|
||||||
echo Test duration and partition config not defined
|
echo Test duration and partition config not defined
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
END_SLOT=$(get_slot)
|
||||||
|
SLOT_COUNT_END_SECONDS=$SECONDS
|
||||||
|
execution_step "Slot: $END_SLOT, Seconds: $SLOT_COUNT_END_SECONDS"
|
||||||
|
|
||||||
|
SLOTS_PER_SECOND="$(bc <<< "scale=3; ($END_SLOT - $START_SLOT)/($SLOT_COUNT_END_SECONDS - $SLOT_COUNT_START_SECONDS)")"
|
||||||
|
execution_step "Average slot rate: $SLOTS_PER_SECOND slots/second over $((SLOT_COUNT_END_SECONDS - SLOT_COUNT_START_SECONDS)) seconds"
|
||||||
|
|
||||||
execution_step "Collect statistics about run"
|
execution_step "Collect statistics about run"
|
||||||
declare q_mean_tps='
|
declare q_mean_tps='
|
||||||
SELECT ROUND(MEAN("median_sum")) as "mean_tps" FROM (
|
SELECT ROUND(MEAN("median_sum")) as "mean_tps" FROM (
|
||||||
|
@ -278,6 +295,8 @@ function launchTestnet() {
|
||||||
--data-urlencode "q=$q_mean_tps;$q_max_tps;$q_mean_confirmation;$q_max_confirmation;$q_99th_confirmation;$q_max_tower_distance_observed;$q_last_tower_distance_observed" |
|
--data-urlencode "q=$q_mean_tps;$q_max_tps;$q_mean_confirmation;$q_max_confirmation;$q_99th_confirmation;$q_max_tower_distance_observed;$q_last_tower_distance_observed" |
|
||||||
python system-test/testnet-automation-json-parser.py >>"$RESULT_FILE"
|
python system-test/testnet-automation-json-parser.py >>"$RESULT_FILE"
|
||||||
|
|
||||||
|
echo "slots_per_second: $SLOTS_PER_SECOND" >>"$RESULT_FILE"
|
||||||
|
|
||||||
execution_step "Writing test results to ${RESULT_FILE}"
|
execution_step "Writing test results to ${RESULT_FILE}"
|
||||||
RESULT_DETAILS=$(<"$RESULT_FILE")
|
RESULT_DETAILS=$(<"$RESULT_FILE")
|
||||||
upload-ci-artifact "$RESULT_FILE"
|
upload-ci-artifact "$RESULT_FILE"
|
||||||
|
|
Loading…
Reference in New Issue