feat(event): add rotating admission diagnostic criterion bench - #1876
Conversation
Week-4 instrumentation slice: criterion benches for ADR-0010 rotating admission (rotation claim/commit, PageQuotaExhausted refusal, multi-epoch pool rebind). Compile-checked in CI with other aegis-event diagnostics; not a qualification result. ROADMAP progress note updated.
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
|
Warning Review limit reached
Next review available in: 15 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a new diagnostic criterion benchmark suite (rotating.rs) for ADR-0010 rotating admission, covering rotation claim/commit, quota refusal, and multi-epoch pool rebind, along with corresponding updates to the roadmap and Cargo configuration. The feedback suggests optimizing the quota exhaustion benchmark by removing assertion overhead (assert! and matches!) from the measured closure to ensure more accurate microbenchmark results.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| let result = producer.try_admit(black_box(&PAYLOAD), 1, 0); | ||
| assert!(matches!( | ||
| result, | ||
| Err(TryRotatingAdmitError::PageQuotaExhausted { | ||
| live_epochs: 2, | ||
| pool: 2 | ||
| }) | ||
| )); | ||
| let _ = black_box(result); |
There was a problem hiding this comment.
In microbenchmarks, it is best practice to minimize overhead inside the measured closure. The assert! and matches! macro calls introduce unnecessary branching and assertion overhead to the hot path being measured. Since correctness is already thoroughly verified in the unit test suite, we can omit the assertion here and return the Result directly. Criterion's iter_batched automatically black-boxes the returned value to prevent compiler optimizations.
producer.try_admit(black_box(&PAYLOAD), 1, 0)
Summary
Week-4 follow-on after #1875 (in-place pool rebind): diagnostic criterion benches for ADR-0010 rotating admission.
lib/event/benches/rotating.rs:lib/event/Cargo.tomland CICompile diagnostic event benchmarks(--bench rotating --no-run)Test plan
cargo bench -p aegis-event --bench rotating --no-runcargo fmt --all -- --checkRelated