bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Average rate of download calculation


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] Average rate of download calculation
Date: Fri, 11 Jun 2010 00:36:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Thanks for the patch!

> @@ -2256,6 +2258,7 @@ File %s already there; not retrieving.\n
>                    else
>                      logprintf (LOG_VERBOSE, _(", %s remaining"),
>                                 number_to_static_string (contlen));
> +                  hs->resumelen = contlen;
>                  }
>              }
>            else
> @@ -2848,7 +2851,7 @@ Remote file exists.\n\n"));
>                           hstat.local_file, count);
>              }
>            ++numurls;
> -          total_downloaded_bytes += hstat.len;
> +          total_downloaded_bytes += hstat.resumelen;


I am going to commit the patch using `hstat.rd_size' instead of the new
variable `hstat.resumelen'.  We will save a variable and `hstat.rd_size'
is a more reliable value.

There is another place in the same function where
`total_downloaded_bytes' is modified.


Cheers,
Giuseppe



Muthu Subramanian K <address@hidden> writes:

> Hi,
>
> Scenario:
> 1. Multiple http downloads
> 2. Resume download of some of the files (typically one)
> After the download completes the Average speed calculation takes the total
> length and total time
> for average speed calculation. This will fake-increase the actual average
> speed - because some of the
> files were only partially downloaded.
>
> Attached: The patch for the same (only http - haven't tried with ftp or
> other protocols).
>
>
> Thanks & Regards,
> Muthu Subramanian
>
>
> PS: Please CC a copy to me, since I have not joined this mailing list yet.
> Thank you.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]