Created
November 17, 2011 18:37
-
-
Save mattrubin/1374030 to your computer and use it in GitHub Desktop.
Measures the response time of a web page
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 | |
CURL="/usr/bin/curl" | |
GAWK="/usr/bin/awk" | |
echo -n "Please pass the url you want to measure: " | |
read url | |
echo " Time_Connect Time_startTransfer Time_total " | |
while [ true ] | |
do | |
URL="$url" | |
result=`$CURL -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total} $URL` | |
echo $result | $GAWK -F: '{ print $1" "$2" "$3}' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment