Uh oh!
There was an error while loading. Please reload this page.
feat(library-selection): #218 add bench-fastled-examples Phase 7 warm-cache harness - #219
Conversation
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ 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. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR implements a cold vs. warm cache benchmark harness for FastLED example sketches. It adds a new workspace crate that discovers example ChangesFastLED Examples Benchmark Implementation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/bench-205.yml:
- Around line 74-80: The workflow currently checks out FastLED using
"actions/checkout@v6" with ref: master which is mutable; replace the mutable ref
with a pinned immutable ref (a commit SHA or annotated tag) by changing the
checkout step that references repository: FastLED/FastLED and path:
external/fastled to use ref: <FASTLED_COMMIT_SHA> (or a specific tag) so the
benchmark uses a reproducible FastLED snapshot; ensure the chosen SHA is the
full commit hash for immutability.
In `@bench/fastled-examples/src/main.rs`:
- Around line 194-202: The warm-cache result from timed(resolve_cached(...)) is
being recorded but not enforced: after obtaining (warm, warm_ms) from
resolve_cached, check warm.from_cache and fail the function (return an Err or
propagate an error) when it's false to enforce the AC#5 contract; keep filling
Row as before (example/name, cold_ms, warm_ms, selected from
warm.selection.required_libraries, hit from warm.from_cache) but add a guard
that returns a clear error referencing the example name when warm.from_cache is
not true so warm cache misses do not silently pass.
- Around line 116-145: The loop over EXAMPLES currently swallows errors from
measure_example (in the Err arm) by printing "skip ..." and continuing; change
this so a failed example causes the run to fail: in the Err(err) branch inside
the loop (where measure_example is matched) replace the current
print-and-continue behavior with a failing exit/return (e.g., print the error to
stderr and call std::process::exit(1) or propagate an Err from main) so that any
Err from measure_example aborts the program instead of allowing the benchmark to
pass with missing data.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ac15b167-4a79-466c-b629-97fa10a7a680
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
.github/workflows/bench-205.ymlCargo.tomlbench/README.mdbench/fastled-examples/Cargo.tomlbench/fastled-examples/README.mdbench/fastled-examples/src/README.mdbench/fastled-examples/src/main.rs
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
6e513a1 to
bf10d92Compare…-cache harness Adds a real-FastLED-matrix bench under `bench/fastled-examples/`, complementing the synthetic per-crate `resolve_warm` from #216. For each of a curated subset of FastLED examples (Blink, Pacifica, Animartrix, Audio, BlurBenchmark, Chromancer), runs `resolve_cached` cold + warm against a fresh `KvStore` and reports timings. Asserts `from_cache=true` on the warm pass so silent re-misses surface immediately. Local numbers (Windows release, FastLED master, 6 examples × synthetic 6-lib Teensyduino-class framework): | example | cold (ms) | warm (ms) | speedup | |---------------|----------:|----------:|--------:| | Blink | 923.58 | 11.36 | 81.3x | | Pacifica | 915.98 | 12.64 | 72.4x | | Animartrix | 970.14 | 11.76 | 82.5x | | Audio | 830.51 | 11.74 | 70.7x | | BlurBenchmark | 827.46 | 10.48 | 79.0x | | Chromancer | 844.13 | 10.89 | 77.5x | Warm path comfortably clears AC#5 (≤ +50 ms over current fbuild) at ~11 ms per example. The asymmetry reflects the cost of walking FastLED src/ (~1000 files) cold vs. a `KvStore::get` + bincode decode warm. CI lane added as `workflow_dispatch`-only (needs FastLED checkout step). No threshold gate yet — capture a stable cross-runner baseline first. Closes#218. Refs #205 Phase 7. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bf10d92 to
42ba403CompareUh oh!
There was an error while loading. Please reload this page.
Summary
Adds a real-FastLED-matrix bench under
bench/fastled-examples/(new workspace-member cratefbuild-bench-fastled-examples), complementing the synthetic per-crateresolve_warmfrom #216. For a curated subset of FastLED examples (Blink, Pacifica, Animartrix, Audio, BlurBenchmark, Chromancer), runsresolve_cachedcold + warm against a freshKvStoreand reports timings. Assertsfrom_cache=trueon warm.CI lane added in
bench-205.ymlasworkflow_dispatch-only — it needs a FastLED checkout step. No automatic threshold gate yet (capture cross-runner baseline first).Local numbers
Windows / Ryzen workstation, release build, FastLED master:
Warm path comfortably clears AC#5 (≤ +50 ms over current fbuild) at ~11 ms per example.
Test plan
uv run soldr cargo build -p fbuild-bench-fastled-examplescleanuv run soldr cargo run --release -p fbuild-bench-fastled-examplesproduces the table aboveuv run soldr cargo clippy -p fbuild-bench-fastled-examples --all-targets -- -D warningscleanfastled-examples) runs green viaworkflow_dispatchCloses#218. Refs #205 Phase 7 (AC#5).
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation