[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] wrong total_download_time reported when using -m and -nv
From: |
Andrew N. Below |
Subject: |
[Bug-wget] wrong total_download_time reported when using -m and -nv |
Date: |
Thu, 8 Oct 2009 02:10:17 +0400 (MSD) |
User-agent: |
Alpine 1.10 (LNX 962 2008-03-14) |
Hi.
When I run wget with -m (mirror) and -nv (no verbose)
switches, download time is always 0s (1.12, 1.11.4 and maybe
earlier versions affected):
2009-10-08 01:51:24 URL: ftp://defan.zenon.net/test/www [180] -> ".listing"
[1]
2009-10-08 01:51:24 URL: ftp://defan.zenon.net/test/www/www [186] ->
"www/.listing" [1]
2009-10-08 01:51:33 URL: ftp://defan.zenon.net/test/www/tears.mpg [91210028]
-> "www/tears.mpg" [1]
FINISHED --2009-10-08 01:51:33--
Downloaded: 3 files, 87M in 0s (1.70 GB/s)
Fix (source from version 1.12):
--- src/retr.c.orig 2009-09-04 20:31:54.000000000 +0400
+++ src/retr.c 2009-10-08 01:52:05.000000000 +0400
@@ -250,7 +250,7 @@
/* A timer is needed for tracking progress, for throttling, and for
tracking elapsed time. If either of these are requested, start
the timer. */
- if (progress || opt.limit_rate || elapsed)
+ if (opt.limit_rate || elapsed)
{
timer = ptimer_new ();
last_successful_read_tm = 0;
@@ -301,7 +301,7 @@
else if (ret <= 0)
break; /* EOF or read error */
- if (progress || opt.limit_rate)
+ if (elapsed || opt.limit_rate)
{
ptimer_measure (timer);
if (ret > 0)
Results of the same command:
2009-10-08 01:55:29 URL: ftp://defan.zenon.net/test/www [180] -> ".listing"
[1]
2009-10-08 01:55:29 URL: ftp://defan.zenon.net/test/www/www [186] ->
"www/.listing" [1]
2009-10-08 01:55:39 URL: ftp://defan.zenon.net/test/www/tears.mpg [91210028]
-> "www/tears.mpg" [1]
FINISHED --2009-10-08 01:55:39--
Downloaded: 3 files, 87M in 9.3s (9.33 MB/s)
I am not sure about correctness of this patch, but it seems
to be working.
--
Andrew N. Below
Zenon N.S.P., http://www.zenon.net
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-wget] wrong total_download_time reported when using -m and -nv,
Andrew N. Below <=