Skip to content

Instantly share code, notes, and snippets.

@alexaandrov
Last active March 1, 2021 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexaandrov/bf0b14295ac65c95da6a2bbe2a3530ea to your computer and use it in GitHub Desktop.
Save alexaandrov/bf0b14295ac65c95da6a2bbe2a3530ea to your computer and use it in GitHub Desktop.
Response Time Site Utility
#/bin/sh
uri=$1
repeat=1
if [[ ! -z $2 ]]; then
repeat=$2
fi
while [ $repeat -gt 0 ]; do
echo ""
echo "=========================================="
echo "Response time $uri"
curl -s -w '\nLookup time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nAppCon time:\t%{time_appconnect}\nRedirect time:\t%{time_redirect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n' -o /dev/null $uri
echo "=========================================="
repeat=$(($repeat - 1))
done
@alexaandrov
Copy link
Author

alexaandrov commented May 14, 2020

Install

wget -O rt.sh https://gist.githubusercontent.com/alexaandrov/bf0b14295ac65c95da6a2bbe2a3530ea/raw/10007ee4af3f73029a48dfcb165cba11db4fdf22/rt.sh && chmod +x rt.sh

Usage

./rt.sh https://github.com 30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment