Repository navigation
Description
Context
crates/fbuild-library-select/benches/resolve_warm.rs (#216) measures the cache-hit path against the synthetic MiniFramework fixture (~3× speedup, ~1.7 ms warm). That's a per-crate sanity guard, not the AC#5 measurement: the issue's perf criterion calls for the warm path to add ≤ 50 ms over current fbuild on the FastLED examples matrix.
bench/fastled-examples/ was scaffolded as a placeholder in #211 with a README that says it waits on Phase 4 + a follow-up to land the harness. Phase 4 is in production now (#212 + #217), so this is unblocked.
Scope
-
Add a Rust binary under
bench/fastled-examples/(or cleaner: a workspace-member cratefbuild-bench-fastled-examples) that:- Discovers FastLED examples from a configurable path (env
FASTLED_DIRdefault~/dev/fastled). - Picks a representative subset (e.g. Blink, Pacifica, Animartrix, Audio, BlurBenchmark, Chromancer — 5–10 sketches that span the simple/complex spectrum).
- For each example, builds a synthetic project: the
.inoassrc/main.cpp, FastLED's ownsrc/as a project library, plus a Teensyduino-class framework library set (start withMiniFramework-extended; can grow to a real Teensyduino tree if needed). - Runs
fbuild_library_select::cache::resolve_cachedcold and warm against each (example, lib-set) pair. - Prints a table: example | cold (ms) | warm (ms) | hit-confirmed.
- Asserts every warm call returns
from_cache = true(catches silent re-misses). - Optional: emit
report.jsonfor future PR-comment diffing.
- Discovers FastLED examples from a configurable path (env
-
CI wiring in
.github/workflows/bench-205.yml:- Add a
workflow_dispatch-only lane (no automatic PR trigger — needs~/dev/fastledcheckout step). - The lane checks out FastLED at a pinned ref, runs the harness, uploads the report as an artifact.
- Add a
-
README updates:
bench/fastled-examples/README.md— replace the "waits on Phase 4" framing with actual usage instructions.bench/README.md— list the new harness.
Out of scope
- Per-board ELF-size acceptance gates — those live in
acceptance-205.ymlandtests/teensylc_acceptance.rsetc. - Driving the full
fbuild buildpipeline — this bench measures only the resolver, not the compile/link chain. - Threshold-based CI gating — first capture a baseline, then a follow-up adds the
≤ +50 msgate.
Acceptance
uv run soldr cargo run -p fbuild-bench-fastled-examples(or equivalent) runs to completion locally with FASTLED_DIR pointing at~/dev/fastled.- Report shows distinct cold vs. warm timings per example.
- All warm calls confirm
from_cache = true. clippy --workspace --all-targets -D warningsclean.
Refs: #205 Phase 7 (AC#5).
Activity
feat(library-selection): #218 add bench-fastled-examples Phase 7 warm…
feat(library-selection): #218 add bench-fastled-examples Phase 7 warm…