SC-10: progress reporting, transfer stats, verbose output - #12
Merged
Conversation
--progress via goroutine+buffered-channel reporter, non-blocking sends so a slow/absent consumer never stalls a transfer. Progress shown for the disk-write phase (chunked writes over 256KiB), not network transfer - a disclosed scope boundary, since ApplyDelta's delta frames arrive atomically per file with no observable partial-transfer point in the current architecture. Output format matches real rsync's man-page examples line-for-line. --stats end-of-sync summary matching real rsync's field names/ structure, with the speedup ratio formula verified against rsync's actual main.c source, not just man-page prose. -v confirmed already correct from SC-11, no reimplementation needed. Threaded through all transports (local, SSH, daemon GET/PUT) reusing SC-11's exact dryRun/itemize pattern. Three bugs found in self-review: - Reporting() broadening leaked verbose-style lines when only --stats/--progress was requested without -v/-i - formatDuration omitted the hours component at zero, contradicting the man page's own examples - A new empty file was miscounted as unchanged in stats, since bytes.Equal(nil, nil) == true - fixed with a separate transferred check distinct from contentChanged Clean on native Windows and cross-compiled Linux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--progress via goroutine+buffered-channel reporter, non-blocking sends so a slow/absent consumer never stalls a transfer. Progress shown for the disk-write phase (chunked writes over 256KiB), not network transfer
--stats end-of-sync summary matching real rsync's field names/ structure, with the speedup ratio formula verified against rsync's actual main.c source, not just man-page prose. -v confirmed already correct from SC-11, no reimplementation needed.
Threaded through all transports (local, SSH, daemon GET/PUT) reusing SC-11's exact dryRun/itemize pattern.
Three bugs found in self-review:
Clean on native Windows and cross-compiled Linux.