Skip to content

Instantly share code, notes, and snippets.

@fidiego
Last active April 20, 2016 16:43
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 fidiego/58d7b2a481800fc40945e12dd54cb40e to your computer and use it in GitHub Desktop.
Save fidiego/58d7b2a481800fc40945e12dd54cb40e to your computer and use it in GitHub Desktop.
curltime: bash script for pretty printing time spent curling. Totatally based off of this SO answer: http://stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl
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
#!/bin/bash
echo ""
echo "Curl Timing"
echo ""
curl -w "@/Users/freddiego/.curl-format.txt" -o /dev/null --silent "${1}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment