Created
December 2, 2014 12:20
-
-
Save cam8001/f8a84b16391ff08f4a65 to your computer and use it in GitHub Desktop.
response_time.sh
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/gawk" | |
URL="$1" | |
result=`$CURL -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total} $URL` | |
echo "Host: $URL" | |
echo "Time_Connect Time_startTransfer Time_total | |
$(echo $result | $GAWK -F: '{ print $1" "$2" "$3}') | |
" | column -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Measure web page response time from shell.