On a dry run, rsync displays a speedup value calculated from the total size of the source file data and the amount of data sent over the connection, but this value is meaningless and grossly misleading because the file data is not sent over the connection. Example:
[EMAIL PROTECTED] test]$ rsync -avi -n ~/eclipse/releases/eclipse-SDK-3.3-linux-gtk.tar.gz . sending incremental file list >f+++++++++ eclipse-SDK-3.3-linux-gtk.tar.gz sent 74 bytes received 15 bytes 178.00 bytes/sec total size is 144352015 speedup is 1621932.75 I think rsync should omit the speedup on a dry run. The attached patch makes it do so. Matt
Don't display a meaningless speedup on a dry run. --- old/main.c +++ new/main.c @@ -272,9 +272,13 @@ static void output_summary(void) "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)); - rprintf(FINFO, "total size is %s speedup is %.2f\n", - human_num(stats.total_size), - (double)stats.total_size / (total_written+total_read)); + rprintf(FINFO, "total size is %s", + human_num(stats.total_size)); + /* Speedup is meaningless on a dry run. */ + if (!dry_run) + rprintf(FINFO, " speedup is %.2f", + (double)stats.total_size / (total_written+total_read)); + rprintf(FINFO, "\n"); } fflush(stdout);
-- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
