- rprintf(FINFO, "total size is %s speedup is %.2f%s\n",
- human_num(stats.total_size),
- (double)stats.total_size / (total_written+total_read),
+ rprintf(FINFO, "total size is %s speedup is ",
+ human_num(stats.total_size));
+ /* With --dry-run or with --only-write-batch (unless we're a
+ * client receiver), the byte count doesn't include actual file
+ * data, so the speedup is meaningless and we don't print it. */
+ if (write_batch < 0 ? (!am_server && !am_sender) : !dry_run)
+ rprintf(FINFO, "%.2f",
+ (double)stats.total_size / (total_written+total_read));
+ else
+ rprintf(FINFO, "unknown");
+ rprintf(FINFO, "%s\n",