bugGNU Wget - Bugs: bug #21359, Wget reports wrong duration?

 
 

bug #21359: Wget reports wrong duration?

Submitted by:  Micah Cowan <micahcowan>
Submitted on:  Wed 17 Oct 2007 08:21:20 PM UTC  
 
Category: Program LogicSeverity: 3 - Normal
Priority: 2Status: Fixed
Privacy: PublicAssigned to: Giuseppe Scrivano <gscrivano>
Originator Name: Open/Closed: Closed
Release: NoneOperating System: GNU/Linux
Reproducibility: NoneFixed Release: None
Planned Release: 1.13Regression: None
Work Required: 0 - HoursPatch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 24 Oct 2010 08:00:15 PM UTC, comment #5:

Jessica, thanks again to have contributed to GNU wget. I have mentioned this change in the NEWS file.

I have just pushed your patch with the commit #2439.

Giuseppe Scrivano <gscrivano>
Project AdministratorIn charge of this item.
Sun 24 Oct 2010 06:20:37 PM UTC, comment #4:

Thank you for the review, Giuseppe. I've attached a revised patch that addresses your feedback.

(file #21794)

Jessica McKellar <jesstess>
Sun 24 Oct 2010 04:23:49 PM UTC, comment #3:

I have few comments on the patch:

can you please use the ptimers facilities instead of time(2)?

+ strncpy(wall_time, secs_to_human_time (difftime (end_time, start_time)), 32);
+ strncpy(download_time, secs_to_human_time (total_download_time), 32);

can you please allocate the string dinamically using `xstrdup' here instead of `strncpy'? In this way we will not care about `secs_to_human_time' implementation details (where a 32 bytes static buffer is used).

Also, please leave a space between the function name and '('.

Thank you very much for the patch! I'll include it in the upcoming release of wget.

Giuseppe Scrivano <gscrivano>
Project AdministratorIn charge of this item.
Sun 24 Oct 2010 02:48:47 PM UTC, comment #2:

can you please provide a ChangeLog entry?

Giuseppe Scrivano <gscrivano>
Project AdministratorIn charge of this item.
Sat 23 Oct 2010 05:35:51 PM UTC, comment #1:

This was confusing to me when I encountered it as well. This behavior still exists in Wget 1.12.

Running

time wget -r http://freenode.net

will give a quick (~20 second) demonstration of issue.

The time reported in the "Downloaded:" summary is the time spent actually downloading (see total_download_time getting incremented in http_loop and getftp), while the difference between the starting and FINISHED time stamps reflect the total wall clock time for the wget run.

I'm not sure if you consider this source of confusion a real bug or not, but in case you do, I've attached a patch against wget-1.12 that prints a total elapsed wall clock time in addition to the time spent downloading. It only changes the summary for recursive queries, which are the ones that print the elapsed download time. The output looks like this:

--2010-10-23 13:27:18-- http://freenode.net/
...
FINISHED --2010-10-23 13:27:41--
Total wall clock time: 23s
Downloaded: 119 files, 1.1M in 6.6s (166 KB/s)

The patched wget passes the test suite included in the tarball. The man page doesn't mention the summary at the end of recursive downloads, so I didn't see anything to change there.

(file #21769)

Jessica McKellar <jesstess>
Wed 17 Oct 2007 08:21:20 PM UTC, original submission:

IRC conversation:

Micah Cowan <micahcowan>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #21794:  bug21359.patch2 added by jesstess (2KiB - application/octet-stream)
file #21769:  bug21359.patch added by jesstess (1KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gscrivano (Posted a comment)
  • -unavailable- added by jesstess (Updated the item)
  • -unavailable- added by micahcowan (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 24 Oct 2010 08:00:15 PM UTCgscrivanoStatusNeeds Investigation=>Fixed
      Assigned toNone=>gscrivano
      Open/ClosedOpen=>Closed
      Planned Release1.15=>1.13
    Sun 24 Oct 2010 06:20:37 PM UTCjesstessAttached File-=>Added bug21359.patch2, #21794
    Sat 23 Oct 2010 05:35:51 PM UTCjesstessAttached File-=>Added bug21359.patch, #21769
    Mon 14 Apr 2008 11:54:14 AM UTCmicahcowanStatusNeeds Discussion=>Needs Investigation
    Sun 27 Jan 2008 09:31:04 AM UTCmicahcowanPriority7 - High=>2
      Planned Release1.12=>1.15
    Wed 17 Oct 2007 08:22:12 PM UTCmicahcowanPriority5 - Normal=>7 - High

    Back to the top


    Powered by Savane 3.1-cleanup1