Load Time in One Line
A one-liner to get the load time for a page might be...
curl -w "%{time_total}\n" -o /dev/null -s workroom-productions.com
Unpack this into four parts – the first to produce information, two more to stop information, and the web address:
-w "%{time_total}\n": This uses-w(or--write-out) to pick out the total time taken to complete the request from the information about the transfer.-o /dev/null: This option throws away whatcurlhas retrieved by redirecting the output to the bottomless pit/dev/null.-s: Silent mode, which stops the progress meter from being output to the terminal.- From here, of course. I've not specified page, nor scheme( i.e.
https)
This one-liner needs you to know that curl captures this information. To my knowledge it's the only common tool which does. But curl isn't the only way to get a page – wget can, and lynx can, and you can use time to measure how long it takes. Indeed you could use time to measure how long the curl takes....
Here's a useful stackoverflow answer
Comments
Sign in or become a Workroom Productions member to read and leave comments.