Repository navigation
bench: compare --pair, noise/change rules, gate, and policy/locks sweep keys - #859
Merged
Merged
Conversation
…s, gate, and policy/locks sweep keys The state_exec lock phases decide their gates with the bench, and the design's gates need things compare could not do: two points of one run against each other, absolute bounds, a noise rule that refuses to judge a disturbed run, and a rule under which a drop in steps_total fails. tools/bench/state_exec_bench.py: - key_of leaves out a param at its implicit default (policy=rr, locks=none), so records from binaries without those keys still match. - compare --pair KEY=A:B compares the base's points at A with the candidate's at B, matched without KEY (both may be one run). - compare --max-noise P: a point noisier than P% is INCONCLUSIVE (exit 2, "repeat in a quieter window", never a pass). - compare --fail-on-change: any change beyond the noise fails, in either direction, for steps_total. - gate RUN --scenario --metric (--max|--min) [--stat] [--where] [--max-noise]: absolute bounds on one run. state_exec_bench: sched.single.*, flood.small and msg.* take two sweep keys, policy (rr, priority, priority_rr) and locks (none; the lock phases add private and shared, and a build without them skips such a point). A default run measures the same points as before, plus the two params at their defaults. tools/bench/test_state_exec_bench.py tests the rules on synthetic records; CTest runs it as state_exec_bench_tool_test when a working Python 3 is found.
transfix
marked this pull request as ready for review
October 29, 2026 02:37
transfix
added a commit
that referenced
this pull request
Oct 29, 2026
The project version and the cvcpkg recipe family move to 3.7.3. Every recipe is at cvc_revision 1 already, so none restarts. 3.7.3 carries the dynamic plants' driver and chassis friction (#873): --plant dynamic and dynamic4w take nav's acceleration as the Jolt plant's driver does (a standstill hold, the grade fed forward, a trim on the measured acceleration) and their chassis boxes scrape walls at a body panel's friction, so on Austin at 864 s they bring 35 and 24 of 48 vehicles to the objective (3.7.2: 11 and 7). It also carries pycvc-gl's wasm deps with ImageMagick (#872), the steering modulation of D and G in cvc::ph (#851), the bench's compare and sweep keys (#859), and the sanitizer CI jobs for state_exec (#858).
transfix
added a commit
that referenced
this pull request
Oct 29, 2026
The project version and the cvcpkg recipe family move to 3.7.3. Every recipe is at cvc_revision 1 already, so none restarts. 3.7.3 carries the dynamic plants' driver and chassis friction (#873): --plant dynamic and dynamic4w take nav's acceleration as the Jolt plant's driver does (a standstill hold, the grade fed forward, a trim on the measured acceleration) and their chassis boxes scrape walls at a body panel's friction, so on Austin at 864 s they bring 35 and 24 of 48 vehicles to the objective (3.7.2: 11 and 7). It also carries pycvc-gl's wasm deps with ImageMagick (#872), the steering modulation of D and G in cvc::ph (#851), the bench's compare and sweep keys (#859), and the sanitizer CI jobs for state_exec (#858).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is B0 of the state_exec locks plan: the bench changes the lock phases' gates depend on (design
docs/STATE_EXEC_LOCKS.mdsection 11.2; gaps G-2 and G-3). Nothing in libcvc itself changes.tools/bench/state_exec_bench.pykey_ofleaves out a param that sits at its implicit default (policy=rr,locks=none). Records from binaries that predate those keys still match, including the frozen a7b966f baseline.compare --pair KEY=A:Bcompares the base's points atAwith the candidate's atB, matched withoutKEY. The two files may be the same run.compare --max-noise Pmarks a point noisier thanP% asINCONCLUSIVE. That exits 2, which means "repeat the run on a quieter machine"; it is never a pass.compare --fail-on-changefails on a change in either direction. It is forsteps_total, where--fail-on-worsewould pass a drop as "better".gate RUN --scenario … --metric … (--max|--min) [--stat] [--where] [--executor] [--max-noise]checks absolute bounds: the design's 60/120/500 ns gates, the 0-step and 0-allocation gates, and so on.state_exec_benchsched.single.*,flood.smallandmsg.*take two new sweep keys:policy:rr,priorityorpriority_rr;locks:nonefor now. L1 addsprivateand L3 addsshared; until then such a point is skipped with "needs the lock manager".Tests
tools/bench/test_state_exec_bench.py(stdlib only, 19 cases) covers implicit defaults, pairing, the noise rule (one disturbed rep givesINCONCLUSIVE, exit 2), the change rule (asteps_totaldrop fails) andgate(--minand--maxtogether pin a value).state_exec_bench_tool_testwhen a working Python 3 is found. The interpreter is run once before it is trusted, so Windows' app-execution alias stub is never picked.state_exec_bench_smokecovers the new construction path on both schedulers.Status: a draft while the local build and smoke run finish.