Skip to content

Commit

Permalink
Measure load test time more accurately
Browse files Browse the repository at this point in the history
  • Loading branch information
dsocolobsky committed Dec 6, 2024
1 parent 43689a8 commit fc0c167
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/scripts/flamegraph_watcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@
# then polls the account balance until the expected balance has been reached
# and then kills the process. It also measures the elapsed time of the test and
# outputs it to Github Action's outputs.
SECONDS=0

iterations=1000
value=10000000
value=1
account=0x33c6b73432B3aeA0C1725E415CC40D04908B85fd
end_val=$((172 * $iterations * $value))

ethrex_l2 test load --path /home/runner/work/ethrex/ethrex/test_data/private_keys.txt -i $iterations -v --value $value --to $account

output=$(cast balance $account --rpc-url=http://localhost:1729 2>&1)
while [[ $output -eq 0 ]]; do
sleep 5
output=$(cast balance $account --rpc-url=http://localhost:1729 2>&1)
done
SECONDS=0 # Server is online since balance started, so start measuring time
while [[ $output -le $end_val ]]; do
sleep 5
output=$(cast balance $account --rpc-url=http://localhost:1729 2>&1)
Expand Down

0 comments on commit fc0c167

Please sign in to comment.