Skip to content

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

Open
avrabe wants to merge 1 commit intomainfrom
fix/137-criterion-benchmarks
Open

feat: criterion benchmarks for scheduling solver + codegen (#137)#143
avrabe wants to merge 1 commit 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

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>
@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!

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