Skip to content

Instantly share code, notes, and snippets.

@zoosky
Forked from spiermar/curl-format
Last active August 20, 2018 11:30
Show Gist options
  • Save zoosky/33f3122519eb6139b9e9b172406c4a29 to your computer and use it in GitHub Desktop.
Save zoosky/33f3122519eb6139b9e9b172406c4a29 to your computer and use it in GitHub Desktop.
Measure response times with curl
\n
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
\n
@zoosky
Copy link
Author

zoosky commented Aug 20, 2018

Output

curl -w "@curl-format.txt" -o /dev/null -s "https://www.example.com/"
    time_namelookup:  0.014
       time_connect:  0.019
    time_appconnect:  0.326
   time_pretransfer:  0.326
      time_redirect:  0.000
 time_starttransfer:  0.425
                    ----------
         time_total:  0.425

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