Skip to content

Instantly share code, notes, and snippets.

@philcryer
Created February 4, 2016 16:45
Show Gist options
  • Save philcryer/abbb686902b5c237b05a to your computer and use it in GitHub Desktop.
Save philcryer/abbb686902b5c237b05a to your computer and use it in GitHub Desktop.
A curl one liner to test a site's response time - outputs various metrics - just include the target URL after the command.
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 ${1}
@philcryer
Copy link
Author

Sample output:

$./www-time http://cnn.com                                                                          

Lookup time:    0.522
Connect time:   0.532
AppCon time:    0.000
Redirect time:  0.000
PreXfer time:   0.532
StartXfer time: 0.608

Total time:     0.810

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