bench: dependency-free sim micro-benchmarks + CI bench job (P4)
benches/sim_bench.rs (harness=false, zero deps): fixed-iteration ns/op timing for hpmcu_tick, cru_poll, modbus_read_holding, rga_improcess, membus_poke_peek. Human timings to stdout, one JSON trend line per bench to stderr for CI capture. New CI `bench` job smoke-runs them. Regression-vs-history gating is future work. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wB8KB3MMQztRDXCMCkPrf
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
a6b60c2484
commit
6fcfb80e5a
@@ -68,6 +68,19 @@ jobs:
|
||||
[ "$ran" = 1 ] || { echo "no driver MC/DC harnesses found"; exit 1; }
|
||||
exit $fail
|
||||
|
||||
bench:
|
||||
# Smoke-run the sim micro-benchmarks and emit the ns/op trend JSON. Regression
|
||||
# gating against stored history is future work (no flare-edge pattern to copy).
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: run sim benchmarks
|
||||
working-directory: sim
|
||||
run: |
|
||||
cargo bench --locked --bench sim_bench 1> bench.txt 2> bench.json
|
||||
echo "== timings =="; cat bench.txt
|
||||
echo "== trend json =="; grep '"bench"' bench.json
|
||||
|
||||
badges:
|
||||
needs: [test]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/bringup'
|
||||
|
||||
Reference in New Issue
Block a user