cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLINFO_REDIRECT_TIME is really fixed?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 21 Oct 2002 15:41:13 +0200 (MET DST)

On Mon, 21 Oct 2002 xx_serena_xx_at_virgilio.it wrote:

> the values returned by curl_easy_getinfo(..,CURLINFO_REDIRECT_TIME,..) have
> someting wrong.

> As example, here are some values (times in second) i've obtained in 4 different
> executions of my test:
> |#test:
> option used | 1 2 3 4
> ____________________________|_____________________________________
> CURLINFO_NAMELOOKUP_TIME | 0.01 0.01 0.01 0.01
> CURLINFO_CONNECT_TIME | 0.01 0.01 0.01 0.01
> CURLINFO_STARTTRANSFER_TIME | 0.052 0.072 0.02 0.058
> CURLINFO_REDIRECT_TIME | 1.007 1.006 1.002 1.006
> CURLINFO_TOTAL_TIME | 1.175 1.217 1.371 1.368
>
> As you can see, the REDIRECT_TIME introduces 1 second (this appened for
> every execution done).

I don't agree with you. Look at the names of those timers you've read. Look
at the timer you got just before the REDIRECT time: STARTTRANSFER_TIME. At
what point do you think that time stamp is set? I'd say that is before any
transfer.

The REDIRECT_TIME is set after having read enough amount of data (all
headers). I can't but to believe that reading the headers takes about 1
second in your test cases.

The timers can never add time to other timers, they're all just time stamps
recorded at various stages in the process.

> Measuring the same times with a tool manually developed for taking
> intermediate times, i've confirmed that this values are wrong.

How much wrong? How do you time this to tell?

> I've not time to find the reasons of this added second in the source code,
> but i've thought it was right to send this message to you.

Sure, it's never wrong to mail us about suspected problems.

> Make me know if there's some error by my side of it's not true the
> CURLINFO_REDIRECT_TIME in lubcurl 7.9.8 was fixed.

It was fixed. Just go try an older version and you'll get a very different
time.

I never ever guarantee anyone that there are no bugs remaining. There may
very well be a bug lurking in this area still. With your help we might be
able to track it down and fix this.

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-21