Time To First Byte with curl

My team has been using the excellent lori plugin in tandem with Firebug to determine our time to first byte (TTFB) when testing our websites. Yesterday, we ran into a situation that made it impossible to do this in a browser. Never fear…curl to the rescue!


curl -o /dev/null -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" http://your.url.here

This will get you the time to connect, the time to first byte for your site, and the total time to pull down the code.

If you like, use the -s switch to remove the progress bar.

Props go to Merlin, for being the wizard he is while we worked this out.

Reblog this post [with Zemanta]

Tags: , ,

2 Responses to “Time To First Byte with curl”

  1. Capture Time To First Byte using curl | PinoyTux Weblog Says:

    [...] From: http://www.unquietdesperation.com/2009/03/19/time-to-first-byte-with-curl/ [...]

  2. amenhotep Says:

    Dude, awesome!

Leave a Reply