docs: add a performance log template and protocol

A place to record each change's scene, config and before/after numbers so
runs stay comparable and failed ideas are not retried, with the protocol
(warm-up, repeats, A/B, image diff) and where the metrics come from.

Signed-off-by: cerealfordinner <cerealfordinner@users.noreply.github.com>
This commit is contained in:
cerealfordinner
2026-12-04 18:34:18 -05:00
parent b581f7e0a8
commit db9aceef9d

47
docs/perf-log.md Normal file
View File

@ -0,0 +1,47 @@
# Performance log
[Back to README](../README.md)
Record every performance change here so runs stay comparable and failed ideas
are not retried. One entry per change; keep the numbers, not just the verdict.
## Protocol
1. Fix the environment: same Mesa, kernel, Wine, vkd3d-proton, GPU, GPU power
profile, output size, preset, RT/FG state and save.
2. Warm up 60-120 s so paging and caches settle, then measure.
3. Do one cold-cache run for compile stutter, discard it, and use warm runs for
steady-state numbers.
4. Repeat at least 5 runs per config; report mean, standard deviation and range.
5. Change one thing at a time and alternate A/B runs to control for thermals.
6. On any RT change, capture reference screenshots and diff against the baseline
(FSR and frame generation off) before calling it a win.
## Entry template
```
Date/commit:
Hardware: GPU, CPU, RAM, kernel, Mesa, Wine, vkd3d-proton
Scene / profile / resolution / preset:
Env flags:
Runs: N, cache state
fps mean +- sd | p95 | p99 | 1% low | frames >100ms
GPU busy | VRAM | GTT | AS memory | thrash count | fallback shaders
Image diff vs baseline: pass/fail (link to captures)
Notes / verdict:
```
## Where the numbers come from
- `tools/session-fps.sh [log] [min-draws]` summarizes in-world `stats: frame`
samples (average, median, min, max, preparation and copy time).
- `tools/bench-comprehensive.sh` runs the preset configs in one pass.
- The residency log gives the last paging pass duration and the count of pages
demoted after a CPU access within two seconds of promotion; treat that second
number as the thrash metric.
- `VICTORY_RT_STAMPS=1` and `VICTORY_PAGE_SAMPLE=1` (diagnostics build) add
dispatch timings and BVH page samples; see [Diagnostics](DIAGNOSTICS.md).
## Log
<!-- Append newest entries at the top. -->