curl-users
Questions on cURL timing details
Date: Wed, 05 Aug 2015 09:32:54 +0200
Dear All,
As a newbie to cURL, despite reading the documentation, I am confused
about the timing details provided by cURL in a regular HTTP scenario.
Here are my questions.
1. time_starttransfer
http://curl.haxx.se/docs/manpage.html defines it as "The time, in
seconds, it took from the start until the first byte was just about to
be transferred." As I understand it, that means the end of the
processing of the request at the web server, and the departure of the
first byte of the reply from the server.
However, on
http://stackoverflow.com/questions/17638026/calculating-server-processing-time-with-curl,
one can derive that that time_starttransfer is "the time (...) until the
first byte arrived", at the client I guess.
Thus there would be half a round trip time (RTT) difference between the
two, since one is defined at the web server, and the other at the client.
Since cURL is running at the client, I would not expect it to get to
know when the web server is ready to send the first byte, so the arrival
of the first byte at the client would be the reference. Can anyone confirm?
2. time_connect
http://curl.haxx.se/docs/manpage.html defines it as "The time, in
seconds, it took from the start until the TCP connect to the remote host
(or proxy) was completed." As I understand it, it means the moment the
TCP SYN+ACK is received at the client originating the TCP connection to
the web server. This is not the end of the three-way-handshake, since
this would require a measurement at the web server when the third, final
TCP ACK arrives from the client. Can anyone confirm?
3. Timing relations
In the most general case, without redirection nor proxy, is it right to
expect that
time_namelookup <= time_connect <= time_pretransfer <=
time_starttransfer <= time_total
Thanks in advance for any insight.
Sorry to bother you if these questions have already been answered
elsewhere. Please point me to the reference document I was not smart
enough to find.
Best regards,
LS
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-08-05