Question

I am looking for a stripped-down version of Chrome's interface to the W3C Resource Timing API.

I would like to programmatically measure the http request latency of a single object in a way that distinguishes between the DNS lookup, TCP connection, and time between sending the request and receiving the query. I'm looking for a browser-independent solution so that I can easily log the results in a database.

See for example, the network timeline view in the Chrome developer window (profile picture).

Related programs include httping and wbox, which measure http request latency but don't split up the response time into separate events.

Does there exist a simple program which fits my needs?

Note: I do not have access to the server

Was it helpful?

Solution

I ended up using cURL (version 7.19.0 and up).

curl --output /dev/null --silent --write-out "time_namelookup=%{time_namelookup}\ntime_connect=%{time_connect}\ntime_appconnect=%{time_appconnect}\ntime_pretransfer=%{time_pretransfer}\ntime_redirect=%{time_redirect}\ntime_starttransfer=%{time_starttransfer}\ntime_total=%{time_total}\n" --url http://curl.haxx.se/ds-curlicon.png

Explanation of the timers can be found on the man page and here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top