Skip to content

Instantly share code, notes, and snippets.

@simsketch
Last active January 6, 2017 20:37
Show Gist options
  • Save simsketch/0ca2ad63d4c47460bf26055b7ad13903 to your computer and use it in GitHub Desktop.
Save simsketch/0ca2ad63d4c47460bf26055b7ad13903 to your computer and use it in GitHub Desktop.
URL ping alias for bash

alias reqtime="curl -w '\n[HTTP %{http_version}/%{http_code}] %{content_type}\nDownloaded %{size_download}B at %{speed_download} bps (headers: %{size_header}B, request: %{size_request}B)\nUploaded %{size_upload}B at %{speed_upload} bps\n\n 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\ntime_starttransfer: %{time_starttransfer}s\n ---------------------\n time_total: %{time_total}s\n\n' -o /dev/null -s"

//just put that in your bash/zsh/whatevershell profile //and then do reqtime 'url goes here' to debug the various times a bit

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