Last active
September 10, 2018 17:36
-
-
Save leordev/b4bb0c331228a8e2a374526e803924fa to your computer and use it in GitHub Desktop.
Get blocks test
This file contains hidden or 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
ts=$(date +%s%N) | |
block=120 | |
counter=0 | |
while [ $counter -lt $1 ] | |
do | |
curl -w "@curl-format.txt" -s --request POST --url http://localhost:8888/v1/chain/get_block --data '{"block_num_or_id":"'"$block"'"}' | |
counter=$((counter+1)) | |
block=$((block+1)) | |
done | |
tt=$((($(date +%s%N) - $ts)/1000000)) ; echo "Time taken: $tt milliseconds" |
This file contains hidden or 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
time_namelookup: %{time_namelookup} | |
time_connect: %{time_connect} | |
time_appconnect: %{time_appconnect} | |
time_pretransfer: %{time_pretransfer} | |
time_redirect: %{time_redirect} | |
time_starttransfer: %{time_starttransfer} | |
---------- | |
time_total: %{time_total} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment