Repository navigation
tools: d3d12_ab_compare reads an A/B of the D3D12 runtime (D3D12-AB-COMPARE) - #2783
Conversation
…OMPARE) docs/measuring_fps.md tells how to read an A/B (neighbouring pairs, the effect with its standard error, ABBA after a throwaway run), but the scripts it named were never in the repository, and testers' two-run verdicts turned out to be noise. `abba` takes runs in the order they ran (folders of scripts/game-gate.ps1 or logs), one value a run (its world median frame time: frames within a run are not independent), pairs neighbouring runs and gives the mean difference with its standard error and a 95 % t interval, the median of the differences and how many agree in sign. It needs at least 4 pairs, as many with A first as with B first, so a linear drift cancels; with 3 runs a side it fits the side and a linear trend instead. It says "B faster" or "B slower" only when the interval leaves 0 out and all pairs but one agree. Gate runs that did not PASS are left out with their pair. `phases` does the same inside one LEONIDA_AB run, per switch, for the median frame time and the `A/B counters` line, leaving out pairs of blocks whose draws a frame differ by more than a tenth. `plan` prints a balanced order. Numbers only, never log text.
|
Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16,
AI-assisted: Claude Code |
test_docs_repo_paths failed: docs/measuring_fps.md named scripts/game-gate.ps1, which only ProjectLeonida#2782 adds. Name the game gate's run folders instead, here and in the tool's docstring.
|
Thanks for the Mac run. On Windows at c05f434: |
|
Re-checked by OreoFR on the new head AI-assisted: Claude Code |
tests/test_tool_stdout_encoding.py (on main since this branch started) wants every tool's __main__ block to do it: under -I a redirected stdout is strict in the console's code page.
|
CI |
|
Re-checked by OreoFR on the new head AI-assisted: Claude Code |
|
Verified by MoonEyes (another person than the author) on head AI-assisted (Claude Code). |
|
Merging. Head AI-assisted (Claude Code). |
Claimed in the coordination issue as: D3D12-AB-COMPARE (#2570 (comment))
Depends on: #2782 for gate run folders (
summary.json). Logs work without it. #2779 adds theA/B countersline thatphasesreads when present.What and why
docs/measuring_fps.mdtells how to read an A/B: neighbouring pairs, the effect with its standard error, and ABBA after a throwaway run. But the scripts it named (ab_pair.py,ab_eff.py) were never in the repository, so everyone computed it by hand. Testers' verdicts from two runs a side turned out to be noise (enlighted on the bridge).tools/d3d12_ab_compare.py(standard library, reusingtools/d3d12_run_fps.py's reader):abba A:<run> B:<run> B:<run> A:<run> ...takes the runs in the order they ran: a gate folder, whosesummary.jsongives the world median of the presents and leaves out runs that did not PASS, or a log, whose frame lines at 1,000 draws a frame or more count as the world.phases <log>does the same inside oneLEONIDA_ABrun, per switch: blocks of 2^s phases off and on, one difference per pair of blocks. It covers the median frame time and every counter of theA/B countersline (d3d12: LEONIDA_AB tells the frame lines' counters by arm (D3D12-AB-COUNTERS) #2779). It leaves out a pair whose draws a frame differ by more than a tenth (a change of scene, not of the switch);--keep-draw-jumpskeeps it.plan --pairs 4 [--switch]prints a balanced order: two warm-ups, then a discarded run that ends on the first measured side, then ABBA.--json. Numbers only: never a log line, a path or an argument's text.docs/measuring_fps.mdsections 2 and 3 now point to it instead of to the missing scripts.Tested
On Windows 11:
tests/test_d3d12_ab_compare.py, 13 tests, all passing, on synthetic numbers and logs:phaseswith counters, and a scene change left out;planorders;The file runs in the standard-library CI loop.
test_d3d12_run_fps.py,test_docs_design_rows.py,test_ci_registration.py,check_no_game_data.pyandgit diff --checkare clean.GPUs tested: n/a (a standard-library tool; checked on Windows 11 Pro 10.0.26300).
AI-assisted: yes
Checklist
mainand merges cleanly.docs/design.md, with how it was confirmed. (Not applicable.)