Skip to content

Instantly share code, notes, and snippets.

@pankpan
Last active November 2, 2021 07:16
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 pankpan/52fece25f33e49443df940a5f9ae2044 to your computer and use it in GitHub Desktop.
Save pankpan/52fece25f33e49443df940a5f9ae2044 to your computer and use it in GitHub Desktop.
Timing With Curl
#!/bin/sh
# ref. https://susam.in/maze/timing-with-curl.html
if [ -z $1 ] ; then
echo "`basename $0` {url}"
else
curl -L -w "time_namelookup: %{time_namelookup}
time_connect: %{time_connect}
time_appconnect: %{time_appconnect}
time_pretransfer: %{time_pretransfer}
time_redirect: %{time_redirect}
time_starttransfer: %{time_starttransfer}
time_total: %{time_total}
" "$1"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment