Skip to content

Instantly share code, notes, and snippets.

@leordev
Last active September 10, 2018 17:36
Show Gist options
  • Save leordev/b4bb0c331228a8e2a374526e803924fa to your computer and use it in GitHub Desktop.
Save leordev/b4bb0c331228a8e2a374526e803924fa to your computer and use it in GitHub Desktop.
Get blocks test
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"
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