Skip to content

Report bandwidth during volume push and pull - #152

Merged
yunzou-baseten merged 1 commit into
mainfrom
yzou/volume-bandwidth
Oct 14, 2026
Merged

yunzou-baseten merged 1 commit into
mainfrom
yzou/volume-bandwidth

Conversation

@yunzou-baseten

@yunzou-baseten yunzou-baseten commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🚀 What

Show live bandwidth in volume push/pull progress and average bandwidth in the completion summary. JSON results include average_bytes_per_second.
example output

 download: 3/4 files, 912.0 MiB/1.0 GiB, 12.9 MiB/s
  download: 3/4 files, 944.0 MiB/1.0 GiB, 13.6 MiB/s
  download: 3/4 files, 976.0 MiB/1.0 GiB, 16.1 MiB/s
  download: 3/4 files, 1008.0 MiB/1.0 GiB, 14.9 MiB/s
  download: 4/4 files, 1.0 GiB/1.0 GiB, 16.8 MiB/s
  publish...
✨ Volume version was successfully downloaded ✨

Ref:         bdn:cli-e2e/bandwidth-20261013-155249-9760@9c8f9225bbb7
Digest:      b3:9c8f9225bbb7aeeaf4615fd6e8470e6e80621492ab733ccff0ec228c6254e97c
Destination: /tmp/volume-bandwidth.QtObYa/download
Written:     4 files, 1.0 GiB
Bandwidth: 15.1 MiB/s
Total time:  1m8.889s

💻 How

Update the SDK dependency to use transferred-payload accounting. Calculate live rates between progress samples and refresh stalled transfers to 0 B/s.

Calculate completion averages over the upload/download phase. Reused content does not inflate bandwidth; compressed downloads and retries follow the SDK's payload accounting. Existing total-time reporting remains.

🔬 Testing

Passed command-level push/pull tests with race detection.

Coverage includes live rates, stalls without further callbacks, text/JSON summaries, reused content, empty files, and zero-duration transfers.

@yunzou-baseten
yunzou-baseten marked this pull request as ready for review October 14, 2026 02:00
Copilot AI balanced review requested due to automatic review settings October 14, 2026 02:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The implementation is consistent with the stated requirements and has comprehensive command-level coverage.

0 open findings

What changed in this PR

Adds live and average bandwidth reporting to volume push/pull operations.

Changes:

  • Calculates payload transfer rates and handles stalled transfers.
  • Adds bandwidth to text and JSON output.
  • Updates the volume SDK and expands test coverage.
File Description
internal/​cmd/​command.volume_transfer.go Implements rate tracking and reporting.
internal/​cmd/​command.volume_test.go Tests live, stalled, reused, and edge-case rates.
cmd/​command.volume.go Adds JSON bandwidth fields.
go.mod Updates the volume SDK dependency.
go.sum Records updated dependency checksums.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@yunzou-baseten
yunzou-baseten merged commit 1a3b465 into main Oct 14, 2026
4 checks passed
@yunzou-baseten
yunzou-baseten deleted the yzou/volume-bandwidth branch October 14, 2026 21:18
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