Skip to content

Instantly share code, notes, and snippets.

@emtii
Last active March 7, 2017 10:03
Show Gist options
  • Save emtii/1932563cdbf748fec42453b6779cf7c6 to your computer and use it in GitHub Desktop.
Save emtii/1932563cdbf748fec42453b6779cf7c6 to your computer and use it in GitHub Desktop.
Simple HTTP transaction timing breakdown with cURL
1. create file "requestpattern.txt" with the following content:
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
2. get results by cURL with the following call:
curl -w "@requestpattern.txt" -o /dev/null -s "$API_URL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment