Feature: Transfer statistics output (--stats) #176

Closed
opened 2026-07-30 18:31:43 +02:00 by TapTap · 0 comments
Owner

Corresponding rsync flags/behavior:

  • --stats — print a summary at the end of the transfer showing files transferred, bytes, speedup, etc.
  • -v, --verbose — already present as debug logging
  • --progress — already present as throughput display

Current FastSync behavior:
FastSync has --progress (MB/s during transfer) and --dry-run (lists files that would transfer), but there is no end-of-run statistics report comparable to rsync's --stats.

Proposed changes:

  • CLI flag: --stats
  • Config field: bool show_stats
  • Implementation:
    • Track: total files, files transferred, files skipped (incremental), bytes sent on wire, bytes saved by compression/delta, errors, transfer time
    • Print a formatted summary to stderr after STATUS_OK is received
    • Example output:
      Number of files: 123
      Number of files transferred: 45
      Total file size: 10.5 MB
      Total transferred file size: 2.1 MB (on wire)
      Literal data: 8.4 MB
      Matched data: 6.3 MB
      File list generation time: 0.05s
      File list transfer time: 0.02s
      Total bytes sent: 2.2 MB
      Total bytes received: 1.2 KB
      
  • Protocol: no wire changes; stats can be computed client-side from scanner/manifest data

Priority: low
Rationale: Nice-to-have observability. Helps users tune compression/delta settings and verify behavior.

Acceptance criteria:

  • --stats prints a human-readable summary after a successful transfer
  • Summary includes transferred vs skipped counts and on-wire bytes
  • Works in both single-threaded and multithreaded modes
  • Integration test validates key fields appear in output
**Corresponding rsync flags/behavior:** - `--stats` — print a summary at the end of the transfer showing files transferred, bytes, speedup, etc. - `-v`, `--verbose` — already present as debug logging - `--progress` — already present as throughput display **Current FastSync behavior:** FastSync has `--progress` (MB/s during transfer) and `--dry-run` (lists files that would transfer), but there is no end-of-run statistics report comparable to rsync's `--stats`. **Proposed changes:** - CLI flag: `--stats` - Config field: `bool show_stats` - Implementation: - Track: total files, files transferred, files skipped (incremental), bytes sent on wire, bytes saved by compression/delta, errors, transfer time - Print a formatted summary to stderr after `STATUS_OK` is received - Example output: ``` Number of files: 123 Number of files transferred: 45 Total file size: 10.5 MB Total transferred file size: 2.1 MB (on wire) Literal data: 8.4 MB Matched data: 6.3 MB File list generation time: 0.05s File list transfer time: 0.02s Total bytes sent: 2.2 MB Total bytes received: 1.2 KB ``` - Protocol: no wire changes; stats can be computed client-side from scanner/manifest data **Priority:** low **Rationale:** Nice-to-have observability. Helps users tune compression/delta settings and verify behavior. **Acceptance criteria:** - [ ] `--stats` prints a human-readable summary after a successful transfer - [ ] Summary includes transferred vs skipped counts and on-wire bytes - [ ] Works in both single-threaded and multithreaded modes - [ ] Integration test validates key fields appear in output
TapTap added the enhancementneeds-triage labels 2026-07-30 18:31:43 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#176