Skip to content

Instantly share code, notes, and snippets.

@weeyin83
Last active January 24, 2023 20:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weeyin83/c697468c5986cb3385990fa1c4c2d72b to your computer and use it in GitHub Desktop.
Save weeyin83/c697468c5986cb3385990fa1c4c2d72b to your computer and use it in GitHub Desktop.
for i in {1..50}; do echo -n "Run # $i :: ";
curl -w 'Return code: %{http_code}; Bytes Received: %{size_download};
Response Time: %{time_total}\n' https://www.insertyoururl.com -m 2 -o /dev/null -s;
done|tee /dev/tty|awk '{ sum+= $NF; n++ } END { if (n > 0) print "Average Response time =",sum / n; }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment