Add transfer speed calculation to checksum progress output#10
Merged
Conversation
Show average transfer speed in MB/s since the last progress update (or since start for the first update).
There was a problem hiding this comment.
Pull request overview
This PR enhances the checksum operation's progress reporting by adding real-time transfer speed calculation and display. The implementation tracks bytes transferred between progress updates and calculates the instantaneous transfer rate in MB/s.
Changes:
- Added tracking of last output position to enable speed calculation between progress reports
- Implemented speed calculation (MB/s) with proper handling of division-by-zero edge case
- Updated progress output format to include transfer speed with 1 decimal precision
- Bumped version from 0.0.2 to 0.0.3
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| uv.lock | Updated revision and version to 0.0.3 to reflect the new release |
| blockcopy.py | Added speed calculation logic to checksum progress reporting, including tracking of last output position, elapsed time calculation, and updated output formatting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add missing time_ns import - Fix typo: use elapsed_s instead of undefined elapsed variable
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.
Summary
Enhanced the progress reporting for the checksum operation to display the current transfer speed in MB/s alongside the existing progress percentage.
Key Changes
show_progress_last_output_pos) to calculate bytes transferred since the last progress updateImplementation Details
(bytes_since_last / (1024 * 1024)) / elapsed_seconds