Skip to content

bench: compare --pair, noise/change rules, gate, and policy/locks sweep keys - #859

Merged
transfix merged 2 commits into
masterfrom
bench/state-exec-pair-gate
Oct 29, 2026
Merged

transfix merged 2 commits into
masterfrom
bench/state-exec-pair-gate

Conversation

@transfix

Copy link
Copy Markdown
Owner

This is B0 of the state_exec locks plan: the bench changes the lock phases' gates depend on (design docs/STATE_EXEC_LOCKS.md section 11.2; gaps G-2 and G-3). Nothing in libcvc itself changes.

tools/bench/state_exec_bench.py

  • Implicit defaults. key_of leaves 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:B compares the base's points at A with the candidate's at B, matched without KEY. The two files may be the same run.
  • compare --max-noise P marks a point noisier than P% as INCONCLUSIVE. That exits 2, which means "repeat the run on a quieter machine"; it is never a pass.
  • compare --fail-on-change fails on a change in either direction. It is for steps_total, where --fail-on-worse would 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.
  • Exit status: 1 when anything fails; otherwise 2 when any point is inconclusive; otherwise 0.

state_exec_bench

  • sched.single.*, flood.small and msg.* take two new sweep keys:
    • policy: rr, priority or priority_rr;
    • locks: none for now. L1 adds private and L3 adds shared; until then such a point is skipped with "needs the lock manager".
  • A default run measures the same points as before, with the two params at their defaults.

Tests

  • tools/bench/test_state_exec_bench.py (stdlib only, 19 cases) covers implicit defaults, pairing, the noise rule (one disturbed rep gives INCONCLUSIVE, exit 2), the change rule (a steps_total drop fails) and gate (--min and --max together pin a value).
  • CTest runs it as state_exec_bench_tool_test when 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_smoke covers the new construction path on both schedulers.

Status: a draft while the local build and smoke run finish.

…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
transfix marked this pull request as ready for review October 29, 2026 02:37
@transfix
transfix merged commit 81e494a into master Oct 29, 2026
24 checks passed
transfix added a commit that referenced this pull request Oct 29, 2026
master now has C0 (#858) and B0 (#859), squashed, so this branch takes
their final versions: master's ci.yml (one sanitizers job) with L0's two
entries in its lists (state_exec_locks_test, and
test_pycvc_state_exec_locks.py), and master's sanitizer files.
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).
@transfix
transfix deleted the bench/state-exec-pair-gate branch October 29, 2026 20:51
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