Skip to content

test(bandwidth): convergence tests for --bwlimit feedback loop - #4104

Merged
oferchen merged 1 commit into
masterfrom
test/bandwidth-feedback-convergence-2098
May 15, 2026
Merged

oferchen merged 1 commit into
masterfrom
test/bandwidth-feedback-convergence-2098

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Adds four targeted feedback-loop convergence tests for the --bwlimit rate limiter under crates/bandwidth/src/limiter/tests/feedback_loop_2098.rs.
  • Covers steady-state at 2x oversubscription, burst recovery within ~2s, target change ramp without overshoot, and tiny 1 KB/s convergence.
  • Mirrors upstream io.c sleep_for_bwlimit semantics; assertions operate on recorded requested-sleep durations so the suite runs deterministically in microseconds of wall-clock time.

Closes #2098.

Test plan

  • fmt+clippy on CI
  • nextest (stable) on CI
  • Windows / macOS / Linux musl on CI

Adds four targeted feedback-loop convergence tests for the bandwidth
limiter (#2098):

- Steady-state convergence under 2x oversubscription, measured across a
  >= 1s sliding window of requested sleep.
- Burst recovery: a single 4x instantaneous burst is dampened and the
  limiter returns to target within ~2s.
- Target change ramp (0.5 MB/s -> 2 MB/s) must converge to the new rate
  without per-window overshoot.
- Tiny 1 KB/s target convergence: pacing budget tracks expected
  transfer time within +-5%.

Tests use the recorded-sleep harness so they execute deterministically
in microseconds of wall-clock time.
@github-actions github-actions Bot added the test label May 15, 2026
@oferchen
oferchen merged commit 347fc1d into master May 15, 2026
38 of 39 checks passed
@oferchen
oferchen deleted the test/bandwidth-feedback-convergence-2098 branch May 16, 2026 19:50
oferchen added a commit that referenced this pull request May 18, 2026
Adds four targeted feedback-loop convergence tests for the bandwidth
limiter (#2098):

- Steady-state convergence under 2x oversubscription, measured across a
  >= 1s sliding window of requested sleep.
- Burst recovery: a single 4x instantaneous burst is dampened and the
  limiter returns to target within ~2s.
- Target change ramp (0.5 MB/s -> 2 MB/s) must converge to the new rate
  without per-window overshoot.
- Tiny 1 KB/s target convergence: pacing budget tracks expected
  transfer time within +-5%.

Tests use the recorded-sleep harness so they execute deterministically
in microseconds of wall-clock time.
oferchen added a commit that referenced this pull request May 18, 2026
Adds four targeted feedback-loop convergence tests for the bandwidth
limiter (#2098):

- Steady-state convergence under 2x oversubscription, measured across a
  >= 1s sliding window of requested sleep.
- Burst recovery: a single 4x instantaneous burst is dampened and the
  limiter returns to target within ~2s.
- Target change ramp (0.5 MB/s -> 2 MB/s) must converge to the new rate
  without per-window overshoot.
- Tiny 1 KB/s target convergence: pacing budget tracks expected
  transfer time within +-5%.

Tests use the recorded-sleep harness so they execute deterministically
in microseconds of wall-clock time.
oferchen added a commit that referenced this pull request Aug 24, 2026
Adds four targeted feedback-loop convergence tests for the bandwidth
limiter (#2098):

- Steady-state convergence under 2x oversubscription, measured across a
  >= 1s sliding window of requested sleep.
- Burst recovery: a single 4x instantaneous burst is dampened and the
  limiter returns to target within ~2s.
- Target change ramp (0.5 MB/s -> 2 MB/s) must converge to the new rate
  without per-window overshoot.
- Tiny 1 KB/s target convergence: pacing budget tracks expected
  transfer time within +-5%.

Tests use the recorded-sleep harness so they execute deterministically
in microseconds of wall-clock time.
oferchen added a commit that referenced this pull request Aug 24, 2026
Adds four targeted feedback-loop convergence tests for the bandwidth
limiter (#2098):

- Steady-state convergence under 2x oversubscription, measured across a
  >= 1s sliding window of requested sleep.
- Burst recovery: a single 4x instantaneous burst is dampened and the
  limiter returns to target within ~2s.
- Target change ramp (0.5 MB/s -> 2 MB/s) must converge to the new rate
  without per-window overshoot.
- Tiny 1 KB/s target convergence: pacing budget tracks expected
  transfer time within +-5%.

Tests use the recorded-sleep harness so they execute deterministically
in microseconds of wall-clock time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant