tools/bench_nvn_game.py runs unchanged baseline and candidate runtimes against the same compiled game module.
Select an update by its own *_code.so path. Prepare the game and update before measuring, and stop builds first.
python3 tools/bench_nvn_game.py --game /local/game/updated_game_code.so \
--baseline /local/before/scarletnx --candidate /local/after/scarletnx \
--frames 600 --rounds 3 --timeout 300 --uncapped \
--user-data /local/scarletnx-data --keys /local/prod.keys \
--script /local/scene.snxtas --out .cache/game-comparison
--script accepts frame-based .snxtas events (frame:buttons:lx,ly,rx,ry), including button releases. Omitting it
gives neutral input. The harness copies the initial saves, settings, users and keys into private run folders, and
starts each run with fresh runtime and driver caches. External dump paths remain read-only shared inputs. Keep those
files unchanged. --uncapped applies fps_limit=0 and vsync=0 equally to both runtimes. Rendering settings stay
those of the source game. Keys remain private local files and their contents are never included in reports.
The report keeps commands, binary and module hashes, screenshots, logs and individual paired times. A crash, timeout,
missing or uniform screenshot, changed resolution, changed binary or incorrect frame count rejects the experiment.
The primary metric is total process wall time, including startup, preparation and the final screenshot. Runtimes that
emit unattended_ns also report the game's interval separately. That interval includes guest initialization, loading
and the final screenshot. Neither metric isolates NVN translation or GPU execution.
For uncapped games whose asynchronous presents overshoot the frame limit, replace --frames 600 with --seconds 30
and omit --script. This mode measures actual frame count divided by unattended_ns, compares candidate/baseline
throughput ratios, and retains process wall time separately. It requires the runtime timing marker and permits only
neutral input. Scripted scenes and external native measurements require the strict frame mode. Timed runs can finish
in different animation states and need the same scene review as frame-limited runs.
Inspect the screenshots and the reached scene before interpreting timings. A matching final image does not establish
correct rendering throughout a run. Loading screens, frame pacing, filesystem caches, clocks and nondeterministic
game behavior can hide or imitate changes. These results do not compare against native NVN. Optional --native input
requires explicit matching workload, scene, version, frame count, input hash and end-to-end timing metadata. It stays
labeled as an unverified external comparison on different hardware. A throughput increase of 600% would require a
7x speed ratio for the same workload.
python3 tests/bench_nvn_game_test.py
Made from docs/history/gpu-hotpath-bench.md at 69237645142c. GPL-3.0-or-later.