The Samba-Bugzilla – Attachment 11958 Details for
Bug 11382
elapsed time calculation does not account for time function possibly returning -1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch indicating unknown bytes/sec if time() returned -1
rsync-11382.diff (text/plain), 1.05 KB, created by
Brant Gurganus
on 2016-04-01 02:31:47 UTC
(
hide
)
Description:
patch indicating unknown bytes/sec if time() returned -1
Filename:
MIME Type:
Creator:
Brant Gurganus
Created:
2016-04-01 02:31:47 UTC
Size:
1.05 KB
patch
obsolete
>diff --git a/main.c b/main.c >index 4613c96..83d00aa 100644 >--- a/main.c >+++ b/main.c >@@ -339,10 +339,18 @@ static void output_summary(void) > > if (INFO_GTE(STATS, 1)) { > rprintf(FCLIENT, "\n"); >- rprintf(FINFO, >- "sent %s bytes received %s bytes %s bytes/sec\n", >- human_num(total_written), human_num(total_read), >- human_dnum((total_written + total_read)/(0.5 + (endtime - starttime)), 2)); >+ /** time() may have returned -1 so only indicate bytes/sec >+ * if it could be calculated */ >+ if ((starttime != -1) && (endtime != -1)) { >+ rprintf(FINFO, >+ "sent %s bytes received %s bytes %s bytes/sec\n", >+ human_num(total_written), human_num(total_read), >+ human_dnum((total_written + total_read)/(0.5 + (endtime - starttime)), 2)); >+ } else { >+ rprintf(FINFO, >+ "sent %s bytes received %s bytes unknown bytes/sec\n", >+ human_num(total_written), human_num(total_read)); >+ } > rprintf(FINFO, "total size is %s speedup is %s%s\n", > human_num(stats.total_size), > comma_dnum((double)stats.total_size / (total_written+total_read), 2),
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11382
: 11958