diff options
| author | owenjbendon-creator <281052257+owenjbendon-creator@users.noreply.github.com> | 2026-11-28 22:30:19 +0000 |
|---|---|---|
| committer | owenjbendon-creator <281052257+owenjbendon-creator@users.noreply.github.com> | 2026-11-28 22:50:37 +0000 |
| commit | 9f7587e1938504e7589c5b012a6eb9ebab712571 (patch) | |
| tree | 61ca069930eee544d17061a416a8f32577aeb274 /runtime/test/queue_proxy_test.cpp | |
| parent | adfb3821a23612263c1c5b195453ed01c4c114db (diff) | |
tools: frame rate of a D3D12-runtime run by draws a frame, and two runs side by side (TOOLS-D3D12-RUN-FPS)
tools/d3d12_run_fps.py reads the frame line the D3D12 runtime logs every few
seconds (fps, ms a frame, preparing, copies, waiting on the GPU, copying back,
draws a frame) and prints numbers only: the samples in the world (the first
bucket's lower bound, 1000 draws a frame by default, leaves out menus and
loading screens), the frame rate (median, slowest tenth, fastest tenth), the
medians of where a frame goes, and the median frame rate per bucket of draws
a frame. --compare puts a second run beside the first bucket by bucket and
gives the change only where both runs have enough samples.
Why: two runs of the game never show the same scenes for the same time, so
their plain medians do not compare. Measured here on two real runs of one
save (numbers only): plain medians 15.6 and 16.2 fps, but by bucket the second
was 51%, 29%, 5% and 21% faster at 3-5k, 5-7k, 7-9k and 9k+ draws a frame: it
had spent its time in busier scenes (median 7,676 draws against 5,132).
It never prints a log line, a program name, an address or the path of a log;
the log stays on the machine that made it. Standard library only. Reads UTF-8
and UTF-16 logs (a PowerShell redirection writes UTF-16) and strips terminal
colour codes; a truncated last line is skipped. The pattern takes only what
the runtime's format string writes (bounded lengths, nothing in front of the
first number), so no other text in a log reads as a frame line.
Test: python -I tests/test_d3d12_run_fps.py (16 tests on synthetic lines in
the shape of the runtime's format string; no game files, no GPU). On main it
fails at import: the tool does not exist there.
Checked: python -I tests/test_d3d12_run_fps.py; python -I
tests/test_text_write_line_endings.py; python -I scripts/check_no_game_data.py
on the three files; eight deliberate breakages of the tool each fail a test.
A second, fresh session reviewed the first version; its findings are fixed.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/queue_proxy_test.cpp')
0 files changed, 0 insertions, 0 deletions