Skip to content

Instantly share code, notes, and snippets.

@csereno
Created May 11, 2018 14:38
Show Gist options
  • Save csereno/bfd20008fb5fc7ee682e0f3596ad28c7 to your computer and use it in GitHub Desktop.
Save csereno/bfd20008fb5fc7ee682e0f3596ad28c7 to your computer and use it in GitHub Desktop.
Bash function that runs curl and formats output with various parameters to identify where delays are occurring. Include in your .bashrc file
#FUNCTIONS
function ctime() {
curl -x proxy.address.com:80 -so /dev/null -w "\
namelookup: %{time_namelookup}s\n\
connect: %{time_connect}s\n\
appconnect: %{time_appconnect}s\n\
pretransfer: %{time_pretransfer}s\n\
redirect: %{time_redirect}s\n\
starttransfer: %{time_starttransfer}s\n\
-------------------------\n\
total: %{time_total}s\n" "$@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment