MCPcopy Create free account
hub / github.com/RsyncProject/rsync / output_summary

Function output_summary

main.c:425–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425static void output_summary(void)
426{
427 if (INFO_GTE(STATS, 2)) {
428 rprintf(FCLIENT, "\n");
429 output_itemized_counts("Number of files", &stats.num_files);
430 if (protocol_version >= 29)
431 output_itemized_counts("Number of created files", &stats.created_files);
432 if (protocol_version >= 31)
433 output_itemized_counts("Number of deleted files", &stats.deleted_files);
434 rprintf(FINFO,"Number of regular files transferred: %s\n",
435 comma_num(stats.xferred_files));
436 rprintf(FINFO,"Total file size: %s bytes\n",
437 human_num(stats.total_size));
438 rprintf(FINFO,"Total transferred file size: %s bytes\n",
439 human_num(stats.total_transferred_size));
440 rprintf(FINFO,"Literal data: %s bytes\n",
441 human_num(stats.literal_data));
442 rprintf(FINFO,"Matched data: %s bytes\n",
443 human_num(stats.matched_data));
444 rprintf(FINFO,"File list size: %s\n",
445 human_num(stats.flist_size));
446 if (stats.flist_buildtime) {
447 rprintf(FINFO,
448 "File list generation time: %s seconds\n",
449 comma_dnum((double)stats.flist_buildtime / 1000, 3));
450 rprintf(FINFO,
451 "File list transfer time: %s seconds\n",
452 comma_dnum((double)stats.flist_xfertime / 1000, 3));
453 }
454 rprintf(FINFO,"Total bytes sent: %s\n",
455 human_num(total_written));
456 rprintf(FINFO,"Total bytes received: %s\n",
457 human_num(total_read));
458 }
459
460 if (INFO_GTE(STATS, 1)) {
461 rprintf(FCLIENT, "\n");
462 rprintf(FINFO,
463 "sent %s bytes received %s bytes %s bytes/sec\n",
464 human_num(total_written), human_num(total_read),
465 bytes_per_sec_human_dnum());
466 rprintf(FINFO, "total size is %s speedup is %s%s\n",
467 human_num(stats.total_size),
468 comma_dnum((double)stats.total_size / (total_written+total_read), 2),
469 write_batch < 0 ? " (BATCH ONLY)" : dry_run ? " (DRY RUN)" : "");
470 }
471
472 fflush(stdout);
473 fflush(stderr);
474}
475
476
477/**

Callers 2

client_runFunction · 0.85
sigusr2_handlerFunction · 0.85

Calls 6

output_itemized_countsFunction · 0.85
comma_numFunction · 0.85
human_numFunction · 0.85
comma_dnumFunction · 0.85
bytes_per_sec_human_dnumFunction · 0.85
rprintfFunction · 0.70

Tested by

no test coverage detected