What does "When a redirect is followed, the time from each request is added together." for CURLINFO? #21859
Replies: 2 comments
|
You understood it right. A transfer with several requests counts adds the durations from individual request starts spend on namelookup/connect/appconnect together. Note however that NAMELOOKUP, CONNECT and APPCONNECT are happening often in parallel and the all count from the start of the request. Meaning one should not add them together. Example: would give CURLINFO_NAMELOOKUP_TIME_T as 1 second, CURLINFO_CONNECT_TIME_T as 1.5 seconds and CURLINFO_APPCONNECT_TIME_T as 2 seconds. |
|
Thank you! I'm not quite sure what "in parallel" means? Namelookup should run first, then connect, and only then appconnect (TLS Handshake). So, appconnect contains the time elapsed from the start of the curl_easy_perform call to the completion of the TLS Handshake. Right? What parallelism are we talking about? UPDATE, UPDATE2
Should I also subtract CURLINFO_QUEUE_TIME_T? I assume so, but only for the CURLINFO_NAMELOOKUP_TIME_T value. Could someone please tell me how to calculate these values correctly? Are these formulas correct (with or without redirects)? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
For some CURLINFO_* options, the documentation states the following:
"When a redirect is followed, the time from each request is added together."
My question is what does "request" mean for the following CURLINFO_* options:
I assume that for CURLINFO_NAMELOOKUP_TIME_T "request" means the time spent solely on the DNS request-response from the first request, including all DNS request-responses during all redirects. It's the sum of them.
I assume that for CURLINFO_CONNECT_TIME_T, "request" means the time spent solely on the socket connect() call (TCP example) and for all subsequent connect() calls during redirects. It's the sum of them.
I assume that for CURLINFO_APPCONNECT_TIME_T "request" means the time spent solely on TLS Handshake, including all TLS Handshakes for subsequent redirects. It's the sum of them.
Did I understand everything correctly, or does the phrase "When a redirect is followed, the time from each request is added together." mean something different for the options listed above?
All reactions