Last active
June 24, 2024 07:08
-
-
Save ian0371/9cac2b38ed0137dd38864e14a9b9dbef to your computer and use it in GitHub Desktop.
debug trace RPS measurement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
i=156607361 | |
EN=http://localhost:8551/ | |
while true; do | |
i=$((i + 128)) | |
start=$(printf '0x%x' "$i") | |
end=$(printf '0x%x' "$((i + 127))") | |
start_time=$(date +%s%N) # Capture start time in nanoseconds | |
cast rpc debug_traceBlockByNumberRange "$start" "$end" '{"tracer":"fastCallTracer"}' -r $EN > /dev/null | |
end_time=$(date +%s%N) # Capture end time in nanoseconds | |
elapsed_time=$(( (end_time - start_time) / 1000000 )) # Convert nanoseconds to milliseconds | |
echo "$i ($start): ${elapsed_time}ms" | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment