-
Notifications
You must be signed in to change notification settings - Fork 1
feat(benches): PR-12 — snapshot hash microbench (Closes #43) #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@flyingrobots has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 9 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
Summary by CodeRabbit
Summary by CodeRabbit
WalkthroughAdds two new Criterion benchmark suites (snapshot hashing and scheduler drain), registers them in the rmg-benches Cargo manifest, pins blake3 as a dev-dependency, and updates several documentation files with bench rationale and merge-sync notes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Bench as Criterion harness
participant Engine as Engine
participant Graph as GraphStore
note right of Bench #DDEEFF: snapshot_hash flow
Bench->>+Graph: build chain nodes (n)
Bench->>+Engine: attach Graph, create Engine
Bench->>Engine: Engine::snapshot(root)
Engine-->>-Bench: hash of reachable subgraph
note right of Bench #F6F0E1: record throughput & black_box result
sequenceDiagram
autonumber
participant Bench as Criterion harness
participant Engine as Engine
participant Scheduler as Scheduler/RuleApplier
note right of Bench #E8F6E1: scheduler_drain flow
Bench->>+Engine: build engine with N entities
Bench->>Engine: begin transaction
loop per-entity
Bench->>Scheduler: apply no-op rule to entity
Scheduler-->>Bench: ApplicationResult (Applied)
end
Bench->>Engine: commit transaction
Engine-->>-Bench: commit result
note right of Bench #F6F0E1: throughput = number of rule applications
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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 |
…ore, blake3 dev-dep, and bench entries)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/echo-total.md (1)
1-10: Rollup corrupted — regenerate immediately.The docs/echo-total.md file is truncated, missing ~4500 lines including ISSUES_MATRIX.md and ROADMAP.md sections. Diff confirms large content deletion starting at line 771.
Regenerate locally:
scripts/gen-echo-total.sh git add docs/echo-total.md git commit -m "docs: refresh echo-total rollup for PR-113"The gen-echo-total.sh script is well-formed and deterministic; running it will restore all missing sections.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
crates/rmg-benches/Cargo.toml(1 hunks)crates/rmg-benches/benches/scheduler_drain.rs(1 hunks)crates/rmg-benches/benches/snapshot_hash.rs(1 hunks)docs/decision-log.md(1 hunks)docs/echo-total.md(5 hunks)docs/execution-plan.md(1 hunks)docs/math-validation-plan.md(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
crates/rmg-benches/benches/scheduler_drain.rs (2)
crates/rmg-core/src/ident.rs (2)
make_node_id(35-40)make_type_id(27-32)crates/rmg-core/src/demo/motion.rs (1)
build_motion_demo_engine(110-127)
crates/rmg-benches/benches/snapshot_hash.rs (1)
crates/rmg-core/src/ident.rs (3)
make_edge_id(51-56)make_node_id(35-40)make_type_id(27-32)
🪛 GitHub Actions: Docs Rollup Check
docs/echo-total.md
[error] 1-1: docs/echo-total.md is out of date. Run 'make echo-total' (or scripts/gen-echo-total.sh) and commit the result.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Tests (musl)
- GitHub Check: Security Audit
🔇 Additional comments (7)
crates/rmg-benches/Cargo.toml (1)
18-24: Benches metadata looks correct (harness=false).Entries for
snapshot_hashandscheduler_drainalign with the new files and Criterion’s macros.docs/execution-plan.md (1)
36-46: Docs accurately mirror benches + metadata changes.Matches Cargo and bench files; no nits.
docs/math-validation-plan.md (1)
45-51: Minor edits LGTM.Tooling/tolerances/tasks updates read clean; nothing to fix.
Also applies to: 55-55, 63-70, 74-77
crates/rmg-benches/benches/snapshot_hash.rs (1)
46-61: Benchmark scaffolding is sound.
- Builds once per size; iterations measure
Engine::snapshot()only.- Throughput accounts for root (+1). Good.
crates/rmg-benches/benches/scheduler_drain.rs (2)
9-36: No-op rule scaffold is fine for isolating scheduler drain.Deterministic rule id, empty
left, defaultFootprint, andAbortpolicy are appropriate for a pure scheduler microbench.
61-74: No issues found —iter_batchedcorrectly excludes setup time from measurement.The code is correctly using
iter_batched(...)withBatchSize::PerIteration. Criterion'siter_batchedmeasures only the routine closure, not the setup closure, sobuild_engine_with_entities(n)is properly excluded from timing while the transaction rules and commit are measured. No changes needed.docs/decision-log.md (1)
194-203: Decision entries mirror code changes.cargo-deny modernization and PR-12 merge notes are consistent with this PR.
|
@coderabbitai review pls |
🧩 Analysis chain🏁 Script executed: Length of output: 5364 @flyingrobots: Understood. Initiating GOD-TIER NIGHTMARE pedantic review. Hold onto your keyboard. 🔥 crates/rmg-benches/benches/snapshot_hash.rsCRITICAL Issues:
SEVERE Issues:
MODERATE Issues:
💀 crates/rmg-benches/benches/scheduler_drain.rsCRITICAL Issues:
SEVERE Issues:
MODERATE Issues:
⚡ crates/rmg-benches/Cargo.tomlSEVERE Issues:
MODERATE Issues:
🌐 GENERAL / CROSS-CUTTING ISSUES:
🎯 DEMANDS:
This is a benches-only PR, so the blast radius is limited, but benchmarks are permanent performance documentation. They must be impeccable. Currently, they're riddled with maintainability landmines and documentation debt. I'll now trigger the full automated review to catch anything I missed in my manual pass. ✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
♻️ Duplicate comments (1)
docs/echo-total.md (1)
782-809: Rollup content also mixesblake3=1.8.2 and 1.8.Normalize the version reference here to match Cargo.toml and the decision log after you fix them.
Also applies to: 263-293
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
crates/rmg-benches/Cargo.toml(1 hunks)crates/rmg-benches/benches/scheduler_drain.rs(1 hunks)crates/rmg-benches/benches/snapshot_hash.rs(1 hunks)docs/decision-log.md(1 hunks)docs/echo-total.md(5 hunks)docs/execution-plan.md(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
crates/rmg-benches/benches/snapshot_hash.rs (1)
crates/rmg-core/src/ident.rs (3)
make_edge_id(51-56)make_node_id(35-40)make_type_id(27-32)
crates/rmg-benches/benches/scheduler_drain.rs (2)
crates/rmg-core/src/ident.rs (2)
make_node_id(35-40)make_type_id(27-32)crates/rmg-core/src/demo/motion.rs (1)
build_motion_demo_engine(110-127)
🪛 GitHub Actions: Docs Rollup Check
docs/echo-total.md
[error] 1-1: docs/echo-total.md is out of date. Run 'make echo-total' (or scripts/gen-echo-total.sh) and commit the result.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Tests (musl)
- GitHub Check: Security Audit
🔇 Additional comments (3)
crates/rmg-benches/benches/snapshot_hash.rs (1)
50-57: Edge ID clarity LGTM; no redundant hashing.Using
<from>-to-<to>labels and hoistedlink_tykeeps IDs readable and avoids per-iter recompute.Also applies to: 63-67
crates/rmg-benches/benches/scheduler_drain.rs (1)
25-51: Rule construction is deterministic and minimal — good.Stable rule id, empty left graph, and default footprint are appropriate for isolating scheduler overhead.
docs/echo-total.md (1)
1-8: Verify rollup regeneration locally — sandbox environment blocked verification.The regeneration script uses process substitution (
/dev/fd/63) which the sandbox environment doesn't support. I cannot verify whether the rollup is actually stale or confirm the regeneration resolves the CI failure.Required manual verification:
scripts/gen-echo-total.sh && git diff docs/echo-total.mdExecute locally to:
- Regenerate
docs/echo-total.mddeterministically- Confirm the rollup output changed (or verify it's already current)
- Verify no version pin inconsistencies remain in the regenerated file
- Commit if changes exist and CI passes
Adds a snapshot hashing benchmark that measures Engine::snapshot() on a reachable chain graph.
What
Why
Scope
Base