cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl timings change?

From: Ryan Braud <rbraud_at_gmail.com>
Date: Wed, 14 May 2014 13:26:37 -0700

Hi, I recently noticed a change in the way the timings for each step of a
transfer are reported by libcurl. Comparing 7.35.0 against 7.36.0, I see
different behavior when a redirect is involved. For example, here's what I
get with 7.35:

~/curl/src/.libs$ LD_LIBRARY_PATH=../../lib/.libs ./curl -L -w
"@curl-format" -o /dev/null -s http://www.capitalone.com

time_namelookup: 0.069
time_connect: 0.072
time_appconnect: 0.096
time_pretransfer: 0.096
time_redirect: 0.055
time_starttransfer: 0.547
                            ----------
time_total: 0.615

But in 7.36:

~/curl/src/.libs$ LD_LIBRARY_PATH=../../lib/.libs ./curl -L -w
"@curl-format" -o /dev/null -s http://www.capitalone.com

time_namelookup: 0.127
time_connect: 0.131
time_appconnect: 0.156
time_pretransfer: 0.156
time_redirect: 0.082
time_starttransfer: 0.727
                             ----------
time_total: 0.739

Before 7.36, the redirect time was not counted in the other steps, but now
it seems like it is. I have looked at packet captures for both cases to
verify this behavior. I tried to find some note of this change, but I
didn't see anything in the release notes. I also didn't find anything very
conclusive in the section on "times" here:
http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html

Was this change intentional, or is it a bug? I also tried updating to the
latest commit in git, and the behavior is still the same as in 7.36. Old,
old versions of libcurl (like 7.19, 7.22) also show the 7.35 behavior,
which is what I have grown used to.

For reference, the contents of the "curl-format" file are below:
\n
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
                            ----------\n
time_total: %{time_total}\n
\n

Any insight into this matter would be greatly appreciated.

Thanks,
Ryan

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-05-14