Commit | Line | Data |
---|---|---|
57302e90 MP |
1 | From rsync-admin@lists.samba.org Thu Mar 14 01:33:43 2002 |
2 | Return-Path: <rsync-admin@lists.samba.org> | |
3 | Delivered-To: mbp@samba.org | |
4 | Received: from va.samba.org (localhost [127.0.0.1]) | |
5 | by lists.samba.org (Postfix) with ESMTP | |
6 | id 25DCA4481; Thu, 14 Mar 2002 01:33:41 -0800 (PST) | |
7 | Delivered-To: rsync@samba.org | |
8 | Received: from cskk.homeip.net (c17877.carlnfd1.nsw.optusnet.com.au [210.49.140.231]) | |
9 | by lists.samba.org (Postfix) with ESMTP | |
10 | id 49D8544F8; Thu, 14 Mar 2002 01:31:54 -0800 (PST) | |
11 | Received: (from cameron@localhost) | |
12 | by cskk.homeip.net (8.11.6/8.11.6) id g2E9WGM22435; | |
13 | Thu, 14 Mar 2002 20:32:16 +1100 | |
14 | From: Cameron Simpson <cs@zip.com.au> | |
15 | To: rsync@samba.org | |
16 | Cc: mbp@samba.org | |
17 | Subject: PATCH: better progress reporting | |
18 | Message-ID: <20020314093215.GA18634@amadeus.home> | |
19 | Reply-To: cs@zip.com.au | |
20 | Mime-Version: 1.0 | |
21 | Content-Type: text/plain; charset=us-ascii | |
22 | Content-Disposition: inline | |
23 | User-Agent: Mutt/1.3.27i | |
24 | Sender: rsync-admin@lists.samba.org | |
25 | Errors-To: rsync-admin@lists.samba.org | |
26 | X-BeenThere: rsync@lists.samba.org | |
27 | X-Mailman-Version: 2.0.8 | |
28 | Precedence: bulk | |
29 | List-Help: <mailto:rsync-request@lists.samba.org?subject=help> | |
30 | List-Post: <mailto:rsync@lists.samba.org> | |
31 | List-Subscribe: <http://lists.samba.org/mailman/listinfo/rsync>, | |
32 | <mailto:rsync-request@lists.samba.org?subject=subscribe> | |
33 | List-Id: rsync user list <rsync.lists.samba.org> | |
34 | List-Unsubscribe: <http://lists.samba.org/mailman/listinfo/rsync>, | |
35 | <mailto:rsync-request@lists.samba.org?subject=unsubscribe> | |
36 | List-Archive: <http://lists.samba.org/pipermail/rsync/> | |
37 | Date: Thu, 14 Mar 2002 20:32:16 +1100 | |
38 | Status: RO | |
39 | Content-Length: 2389 | |
40 | Lines: 64 | |
41 | ||
42 | I've been looking at the --progress reporting, which is somewhat | |
43 | improved these days. But look at this output of this evening rawhide | |
44 | mirror update: | |
45 | ||
46 | [...] | |
47 | perl-DB_File-1.75-27.i386.rpm | |
48 | 73430 100% 519.63kB/s 0:00:00 | |
49 | perl-DB_File-1.75-28.99.3.i386.rpm | |
50 | 61783 100% 533.94kB/s 0:00:00 | |
51 | [...] | |
52 | ||
53 | Now, while it's good to have the ETA ticking down as something is fetched, | |
54 | it's irritating to have this history there on the screen afterwards with | |
55 | those unhelpful zeroes. | |
56 | ||
57 | Thus the appended patch to util.c in the current CVS head, which for the | |
58 | final progress report, puts to elapsed time for that file in the report | |
59 | instead of the time remaining. | |
60 | ||
61 | Applied (clean) to 2.5.4, it says this: | |
62 | ||
63 | ++ /home/cameron/tmp/rsy/rsync-2.5.4/rsync -rlHt -z -v -P --delete --include-from=.mirror-rsync '--exclude=xemacs*' '--exclude=kernel-source*' '--exclude=postgresql*' mirror.aarnet.edu.au::redhat/rawhide/i386/RedHat/RPMS/. ./redhat/rawhide/i386/RedHat/RPMS/. | |
64 | ||
65 | receiving file list ... | |
66 | 2429 files to consider | |
67 | 2305 files to consider | |
68 | ./ | |
69 | timeconfig-3.2.5-1.i386.rpm | |
70 | 158253 100% 160.48kB/s 0:00:00 | |
71 | timidity++-2.10.4-2.i386.rpm | |
72 | 9309389 100% 397.71kB/s 0:00:22 | |
73 | tix-8.2.0b1-67.i386.rpm | |
74 | 456809 100% 437.78kB/s 0:00:01 | |
75 | tk-8.3.3-67.i386.rpm | |
76 | 1371196 100% 433.77kB/s 0:00:03 | |
77 | ||
78 | Martin, can this go in for 2.5.5 please? | |
79 | Any nay sayers? | |
80 | ||
81 | Cameron Simpson, DoD#743 cs@zip.com.au http://www.zip.com.au/~cs/ | |
82 | ||
83 | Index: util.c | |
84 | =================================================================== | |
85 | RCS file: /cvsroot/rsync/util.c,v | |
86 | retrieving revision 1.107 | |
87 | diff -u -w -r1.107 util.c | |
88 | --- util.c 23 Feb 2002 00:05:06 -0000 1.107 | |
89 | +++ util.c 14 Mar 2002 09:27:16 -0000 | |
90 | @@ -866,7 +866,9 @@ | |
91 | unsigned long diff = msdiff(&start_time, now); | |
92 | double rate = diff ? (double) (ofs-start_ofs) * 1000.0 / diff / 1024.0 : 0; | |
93 | const char *units; | |
94 | - double remain = rate ? (double) (size-ofs) / rate / 1000.0: 0.0; | |
95 | + double remain = is_last | |
96 | + ? (double) diff / 1000.0 | |
97 | + : rate ? (double) (size-ofs) / rate / 1000.0 : 0.0; | |
98 | int remain_h, remain_m, remain_s; | |
99 | ||
100 | if (rate > 1024*1024) { | |
101 | ||
102 | ||
103 | -- | |
104 | To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync | |
105 | Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html | |
106 |