Skip to content

feat(event): add rotating admission diagnostic criterion bench - #1876

Merged
lavkushry merged 1 commit into
mainfrom
feat/event-rotating-bench
Jul 14, 2026
Merged

feat(event): add rotating admission diagnostic criterion bench#1876
lavkushry merged 1 commit into
mainfrom
feat/event-rotating-bench

Conversation

@lavkushry

Copy link
Copy Markdown
Owner

Summary

Week-4 follow-on after #1875 (in-place pool rebind): diagnostic criterion benches for ADR-0010 rotating admission.

  • New lib/event/benches/rotating.rs:
    • claim/commit with rotation (descriptor_capacity=1)
    • PageQuotaExhausted typed refusal
    • multi-epoch same-thread round trip (pool rebind path)
  • Wire into lib/event/Cargo.toml and CI Compile diagnostic event benchmarks (--bench rotating --no-run)
  • ROADMAP Week-4 progress notes the bench is diagnostic only (not qualified)

Test plan

  • cargo bench -p aegis-event --bench rotating --no-run
  • cargo fmt --all -- --check
  • CI Event primitives job compiles rotating bench

Related

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.
Copilot AI review requested due to automatic review settings July 14, 2026 16:49
@ecc-tools

ecc-tools Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@lavkushry, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: da768419-4ccd-476f-b62c-98dd24fa95d9

📥 Commits

Reviewing files that changed from the base of the PR and between 96fedb1 and 84b9be6.

📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • ROADMAP.md
  • lib/event/Cargo.toml
  • lib/event/benches/rotating.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/event-rotating-bench

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lavkushry
lavkushry merged commit eafadb5 into main Jul 14, 2026
33 of 34 checks passed
@lavkushry
lavkushry deleted the feat/event-rotating-bench branch July 14, 2026 16:50

@gemini-code-assist gemini-code-assist Bot 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.

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.

Comment on lines +78 to +86
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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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)

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.

1 participant