cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: header bytes not being reset on each perform

From: Rick Jones <raj_at_cup.hp.com>
Date: Thu, 25 Jan 2001 10:21:10 -0800

Daniel Stenberg wrote:
>
> 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.

Based on the description, I would have expected total time to be as I
measured as well :) If I want intermediate results, I'd probably get
them by supplying my own write routine.

> 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?

that would be consistent with the numbers being much closer when I
enable dummynet to clip the bandwidth to a value that results ina
multi-second transfer time.

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

I'd love to, thought I am using the precompiled binaries from TWW. I
have been having build issues related to all these things depending on
stuff like working gnu tools :) Libcurl was the first place this bit me
though. Other things (openssh) seemingly built without incident. Still,
the BE on my system is rather ad hoc. I need to get it cleaned-up a bit.

rick

-- 
ftp://ftp.cup.hp.com/dist/networking/misc/rachel/
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to email, OR post, but please do NOT do BOTH...
my email address is raj in the cup.hp.com domain...
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-01-25