cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: redirect time

From: Dirk Manske <dm_at_nettraffic.de>
Date: Fri, 17 May 2002 19:43:41 +0200

On Friday 17 May 2002 19:12, T. Bharath wrote:
> Daniel
>
> With regards to the CURLINFO_REDIRECT_TIME
> the documentation states that it contains the total redirection time
> for all the redirections (assuming 3 redirections before the final
> transfer,this should hold the execution time for all the three
> redirections)
>
> But looking at the code in 7.9.7 in progress.c where the redirection
> time is
> calculated the code is
>
> data->progress.t_redirect =
> (double)Curl_tvdiff(Curl_tvnow(),
> data->progress.t_startsingle)/1000.0;
>
> This basically resets what ever it held before
>
> Should it be
> data->progress.t_redirect +=
> (double)Curl_tvdiff(Curl_tvnow(),
> data->progress.t_startsingle)/1000.0;
>
> Am I correct or have i not understood the doc
> Your clarification would be greatly appreciated

(I've brought Ingo's CURLINFO_REDIRECT_TIME patch to
libcurl, so the answer comes from me).

Yes, you are right. But maybe this way is better:
Add a new timestemp in data->progress, which is
set in Curl_perform before and not in the do-while-loop
and calculate the difference from this timestempt and
not from t_startstingle, which is reseted in the loop.
This way is a very little bit more exactly. But who
cares some nanoseconds...

Bye,
Dirk

_______________________________________________________________

Hundreds of nodes, one monster rendering program.
Now that’s a super model! Visit http://clustering.foundries.sf.net/
Received on 2002-05-17