Skip to content

Instantly share code, notes, and snippets.

@jxm262
Created March 24, 2017 13:51
Show Gist options
  • Save jxm262/24ead0a17641c9b967e3c9d5d84dfb00 to your computer and use it in GitHub Desktop.
Save jxm262/24ead0a17641c9b967e3c9d5d84dfb00 to your computer and use it in GitHub Desktop.
Format curl requests
//todo put this entire thing in bash script somewhere eventually
//http://stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl
//put in curl-format.txt
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n
//usage
curl -w "@curl-format.txt" -o /dev/null -s "http://wordpress.com/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment