Skip to content

Instantly share code, notes, and snippets.

@meysampg
Created December 15, 2023 22:55
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 meysampg/afb0123615fa9493e0324cf2d8764cc2 to your computer and use it in GitHub Desktop.
Save meysampg/afb0123615fa9493e0324cf2d8764cc2 to your computer and use it in GitHub Desktop.
Get request times with curl
meysam@freedom-zenbook:~
$ cat curl-format
time_namelookup: %{time_namelookup}s\n
time_connect: %{time_connect}s\n
time_appconnect: %{time_appconnect}s\n
time_pretransfer: %{time_pretransfer}s\n
time_redirect: %{time_redirect}s\n
time_starttransfer: %{time_starttransfer}s\n
----------\n
time_total: %{time_total}s\n\n
meysam@freedom-zenbook:~
$ curl -w @curl-format -s -o /dev/null https://google.com
time_namelookup: 0.058020s
time_connect: 0.227219s
time_appconnect: 0.429901s
time_pretransfer: 0.429982s
time_redirect: 0.000000s
time_starttransfer: 0.617204s
----------
time_total: 0.617274s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment