Created
March 16, 2015 05:55
-
-
Save metrofx/001072a6ec3dcc6940ba to your computer and use it in GitHub Desktop.
Measure web page load speed using curl
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" | |
URL="$1" | |
result=`$CURL -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total} $URL` | |
echo "Host: $URL" | |
echo "Time_Connect Time_start_Transfer 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