Skip to content

Instantly share code, notes, and snippets.

@cam8001
Created December 2, 2014 12:20
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 cam8001/f8a84b16391ff08f4a65 to your computer and use it in GitHub Desktop.
Save cam8001/f8a84b16391ff08f4a65 to your computer and use it in GitHub Desktop.
response_time.sh
#!/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
@cam8001
Copy link
Author

cam8001 commented Dec 2, 2014

Measure web page response time from shell.

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