Skip to content

Add transfer speed calculation to checksum progress output#10

Merged
messa merged 4 commits intomainfrom
claude/add-checksum-speed-display-xMPuW
Jan 26, 2026
Merged

Add transfer speed calculation to checksum progress output#10
messa merged 4 commits intomainfrom
claude/add-checksum-speed-display-xMPuW

Conversation

@messa
Copy link
Copy Markdown
Owner

@messa messa commented Jan 26, 2026

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

  • Track the last reported position (show_progress_last_output_pos) to calculate bytes transferred since the last progress update
  • Calculate elapsed time and transfer speed (MB/s) between progress reports
  • Display the calculated speed in the progress output with 1 decimal place precision
  • Updated version from 0.0.2 to 0.0.3

Implementation Details

  • Speed is calculated as: (bytes_since_last / (1024 * 1024)) / elapsed_seconds
  • Handles edge case where elapsed time is 0 to avoid division errors
  • Speed calculation only occurs when progress is actually reported (every 60 seconds or 5% progress increment)
  • The speed represents the instantaneous transfer rate since the last progress report, providing users with real-time feedback on operation performance

Show average transfer speed in MB/s since the last progress update
(or since start for the first update).
Copilot AI review requested due to automatic review settings January 26, 2026 15:55
@messa messa self-assigned this Jan 26, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

messa and others added 3 commits January 26, 2026 18:25
- Add missing time_ns import
- Fix typo: use elapsed_s instead of undefined elapsed variable
@messa messa merged commit 39f3a3f into main Jan 26, 2026
35 checks passed
@messa messa deleted the claude/add-checksum-speed-display-xMPuW branch January 26, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants