cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: header bytes not being reset on each perform

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 25 Jan 2001 08:54:57 +0100 (MET)

On Wed, 24 Jan 2001, Rick Jones wrote:

> so, now that I have the questionof header bytes answered, there also
> appears to be a problem (perhaps mine, but i'm not sure) with the total
> time reported by getinfo.

The question of time has always been interesting! ;-)

> i've modified the test program to do all the cleanup and init, and stuck
> it into a loop. i retrieve the same 16MB file across a Gigabit link ten
> times in a row. i display the libcurl's thoughts as to the download
> bytes, time and speed, as well as my own measure of the total time
> (real_time) and get this
>
> $./curl_test2
> dnld_size 16777216 dnld_time 0.161800 real_time 0.234660 dnld_speed
> 70959511.74
> dnld_size 16777216 dnld_time 0.001345 real_time 0.232628 dnld_speed
> 943494.42
> dnld_size 16777216 dnld_time 0.001078 real_time 0.232403 dnld_speed
> 3885899.81
> dnld_size 16777216 dnld_time 0.001066 real_time 0.232534 dnld_speed
> 3929643.53

Hm, it sure shows some major differences. I had a quick look in the code
(progress.c:221) and noticed that the 'timespent' is only set in the progress
meter function. It'll make the last progress meter update to set the total
time.

If this is correct or not, we can discuss. I figure 'total time' should be
pretty much the time you measure. If we should have a timer for what is
currenly measured, we should probably have a different name for it.

Still, I there's a *huge* time differences your output diplays. I think that
is because of a bug in progress.c: could you please try to move the
'timespent' assign to above the check that the progress-stuff is only made
once-per-second?

I believe that will make libcurl's time measures a lot closer to yours.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-01-25