Skip to content

#205 follow-up: Phase 7 warm-cache resolve bench (resolve_warm) #215

Description

@zackees

Context

crates/fbuild-library-select/benches/resolve_cold.rs measures the cold path of resolve(...) (P-02: ≤ 200 ms cold for a typical project). Phase 4 (PR #212) shipped resolve_cached(...) with a KvStore-backed memo. There is no companion warm bench yet, so the AC#5 / P-01 goal ("warm library-selection ≤ current fbuild + 50 ms") has no measurement.

bench/fastled-examples/ is reserved for the real-FastLED matrix once ~/dev/fastled is wired in; that is a separate, larger follow-up. This issue covers the per-crate criterion bench that runs against the existing MiniFramework and exercises the cache-hit path — same fixture as resolve_cold, but pre-populated KvStore and asserts the second call returns a cache hit.

Scope

  1. Add crates/fbuild-library-select/benches/resolve_warm.rs:
    • Reuse MiniFramework from fbuild-test-support (same as resolve_cold).
    • Call resolve_cached once outside the timed loop to populate the cache.
    • Bench measures only the second resolve_cached invocation (the hit path).
  2. Add the [[bench]] entry to crates/fbuild-library-select/Cargo.toml.
  3. Wire it into .github/workflows/bench-205.yml matrix as a new lane with a target threshold (e.g. P-01-mini: ≤ 5 ms warm against MiniFramework — actual threshold can be tuned after first run).
  4. Update crates/fbuild-library-select/benches/README.md describing both benches.

Out of scope

  • The bench/fastled-examples/ real-matrix harness (gated on access to a checked-out FastLED tree).
  • Wiring orchestrators to use resolve_cached (separate follow-up — required before any non-synthetic warm bench can mean anything).

Acceptance

  • uv run soldr cargo bench -p fbuild-library-select --bench resolve_warm runs to completion locally.
  • Bench reports a warm-path number distinctly faster than cold.
  • CI workflow runs both benches and surfaces the numbers as artifacts.

Refs: #205 Phase 7 (P-01 mini-bench).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions