Skip to content

feat: criterion benchmarks for scheduling solver + codegen (#137)#143

Merged
avrabe merged 2 commits intomainfrom
fix/137-criterion-benchmarks
Apr 25, 2026
Merged

feat: criterion benchmarks for scheduling solver + codegen (#137)#143
avrabe merged 2 commits intomainfrom
fix/137-criterion-benchmarks

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 23, 2026

Summary

  • Criterion benchmark suites for spar-solver (small/medium/large/worst-case) and spar-codegen
  • New CI: bench-smoke (PR compile gate) + bench-nightly.yml (cron, saves baseline)
  • Rivet traceability in artifacts/verification.yaml

Bench groups

spar-solver/benches/solver_benchmarks.rs

Group Tasks Notes
solver_small 8 warmup 3s, measurement 5s
solver_medium 64 representative
solver_large 256 sample_size(10) to bound runtime
solver_worst_case mixed periods near U≈0.95 priority-inversion stress

spar-codegen/benches/codegen_benchmarks.rs — emit-to-string for 64 tasks.

CI strategy

PR gate is compile-only (--no-run) — fast and catches regressions in bench code itself. Nightly collects timing baselines and uploads target/criterion/ as artifact. No regression-fail gate yet — gathering data first.

Test plan

  • bench-smoke CI job passes
  • cargo build --workspace --benches clean locally for reviewer
  • Existing CI (Format / Clippy / Test) green

🤖 Generated with Claude Code

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

avrabe added a commit that referenced this pull request Apr 23, 2026
cargo-vet flagged 31 transitive dev-dependencies pulled in by
criterion 0.5 (clap, plotters, wasm-bindgen, ciborium, etc.) as
unvetted. Added as safe-to-run exemptions — these crates are dev-
only via benches/ and never ship in the production artifact.

The 'safe-to-run' criteria reflects that: the code may execute on
the developer machine but will never enter a deployed binary. This
matches how the existing 'bit-set', 'bit-vec' dev-dep exemptions
are classified.

Resolves the Supply Chain (cargo-vet) CI failure on #143.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
avrabe added a commit that referenced this pull request Apr 24, 2026
cargo-vet flagged 31 transitive dev-dependencies pulled in by
criterion 0.5 (clap, plotters, wasm-bindgen, ciborium, etc.) as
unvetted. Added as safe-to-run exemptions — these crates are dev-
only via benches/ and never ship in the production artifact.

The 'safe-to-run' criteria reflects that: the code may execute on
the developer machine but will never enter a deployed binary. This
matches how the existing 'bit-set', 'bit-vec' dev-dep exemptions
are classified.

Resolves the Supply Chain (cargo-vet) CI failure on #143.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avrabe avrabe force-pushed the fix/137-criterion-benchmarks branch from 733ebfe to e4e326f Compare April 24, 2026 04:15
avrabe added a commit that referenced this pull request Apr 24, 2026
cargo-vet flagged 31 transitive dev-dependencies pulled in by
criterion 0.5 (clap, plotters, wasm-bindgen, ciborium, etc.) as
unvetted. Added as safe-to-run exemptions — these crates are dev-
only via benches/ and never ship in the production artifact.

The 'safe-to-run' criteria reflects that: the code may execute on
the developer machine but will never enter a deployed binary. This
matches how the existing 'bit-set', 'bit-vec' dev-dep exemptions
are classified.

Resolves the Supply Chain (cargo-vet) CI failure on #143.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avrabe avrabe force-pushed the fix/137-criterion-benchmarks branch from e4e326f to ed6788a Compare April 24, 2026 04:26
Adds `benches/` to spar-solver and spar-codegen with criterion harnesses
plus CI plumbing to gate compilation and collect nightly baselines.

spar-solver groups:
- small (<=8 tasks, RM-feasible utilization)
- medium (<=64 tasks, representative avionics workload)
- large (<=256 tasks, sample_size=10 to keep runtime sane)
- worst_case (utilization ~0.95 schedulability boundary)

spar-codegen group: schedule emission for 64-task workload.

CI:
- `bench-smoke` in ci.yml: `cargo bench --no-run` on PRs (compile gate)
- `bench-nightly.yml`: cron daily 03:30 UTC, saves baseline, uploads target/criterion/

Traceability in `artifacts/verification.yaml`: bench entries linked to
existing REQ-SOLVER-* and REQ-CODEGEN-* requirements.

Closes #137.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avrabe avrabe force-pushed the fix/137-criterion-benchmarks branch from ed6788a to e4468a2 Compare April 24, 2026 21:02
avrabe added a commit that referenced this pull request Apr 24, 2026
cargo-vet flagged 31 transitive dev-dependencies pulled in by
criterion 0.5 (clap, plotters, wasm-bindgen, ciborium, etc.) as
unvetted. Added as safe-to-run exemptions — these crates are dev-
only via benches/ and never ship in the production artifact.

The 'safe-to-run' criteria reflects that: the code may execute on
the developer machine but will never enter a deployed binary. This
matches how the existing 'bit-set', 'bit-vec' dev-dep exemptions
are classified.

Resolves the Supply Chain (cargo-vet) CI failure on #143.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
cargo-vet flagged 31 transitive dev-dependencies pulled in by
criterion 0.5 (clap, plotters, wasm-bindgen, ciborium, etc.) as
unvetted. Added as safe-to-run exemptions — these crates are dev-
only via benches/ and never ship in the production artifact.

The 'safe-to-run' criteria reflects that: the code may execute on
the developer machine but will never enter a deployed binary. This
matches how the existing 'bit-set', 'bit-vec' dev-dep exemptions
are classified.

Resolves the Supply Chain (cargo-vet) CI failure on #143.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@avrabe avrabe force-pushed the fix/137-criterion-benchmarks branch from e4468a2 to 170760f Compare April 24, 2026 21:04
@avrabe avrabe merged commit 5268531 into main Apr 25, 2026
14 checks passed
@avrabe avrabe deleted the fix/137-criterion-benchmarks branch April 25, 2026 04:33
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