Time To First Byte with curl
Thursday, March 19th, 2009My 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]](http://img.zemanta.com/reblog_c.png?x-id=c2d324c6-bc64-44c3-b116-ea15d849e443)


