Frame meter: log the frame times' spread (median, p95, p99, longest, frames over 50/100 ms) #341

Closed
github-bot wants to merge 1 commit from github-bot/gh-341 into main AGit
Owner

@⁠bentsignal on GitHub · 2026-11-27 21:13 UTC · original
bentsignal:frame-times-line → main · +35 −0 · 1 files · 1 commits · closed without merging

What this adds

The frame-rate line is an average, and it hides stutter. "30 fps" can be even 33 ms frames, or a mix of 20 and 80 ms ones. This adds one line, made each time the frame meter makes its line:

frame times: 31 frames, median 30.3 ms, p95 38.9, p99 66.7, longest 66.7; 1 over 50 ms, 0 over 100 ms

The values are the intervals between presents since the last line: the median, p95, p99, the longest, and how many were over 50 and 100 ms.

  • It runs in every build. The cost is one Instant::now() and a push a present, and one sort of ~30 floats a second.
  • It has its own target, victory_gpu::frame_times. VICTORY_LOG='warn,victory_gpu::frame_times=info' keeps only it, so a stutter can be checked without the other lines.

Why

On an RTX 5070 Ti the frame-rate line said a steady ~31 fps in the prologue's cell. This line showed about 0.7 frames a second over 50 ms (worst ~100 ms), every 1.5 s. A timeline then put those frames on the sweep behind flights (separate PR, "Sweeps behind flights every 15 s while memory is not pressed").

Tests

  • cargo clippy -p victory-gpu --all-targets: no new warnings.
  • Used in about forty runs on our fork.

This change and its testing were done with an AI assistant (Claude Code), and the results were checked on my machine.

🤖 Generated with Claude Code

**@⁠bentsignal** on GitHub · 2026-11-27 21:13 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/341) `bentsignal:frame-times-line` → `main` · +35 −0 · 1 files · 1 commits · closed without merging ## What this adds The frame-rate line is an average, and it hides stutter. "30 fps" can be even 33 ms frames, or a mix of 20 and 80 ms ones. This adds one line, made each time the frame meter makes its line: ``` frame times: 31 frames, median 30.3 ms, p95 38.9, p99 66.7, longest 66.7; 1 over 50 ms, 0 over 100 ms ``` The values are the intervals between presents since the last line: the median, p95, p99, the longest, and how many were over 50 and 100 ms. - It runs in every build. The cost is one `Instant::now()` and a push a present, and one sort of ~30 floats a second. - It has its own target, `victory_gpu::frame_times`. `VICTORY_LOG='warn,victory_gpu::frame_times=info'` keeps only it, so a stutter can be checked without the other lines. ## Why On an RTX 5070 Ti the frame-rate line said a steady ~31 fps in the prologue's cell. This line showed about 0.7 frames a second over 50 ms (worst ~100 ms), every 1.5 s. A timeline then put those frames on the sweep behind flights (separate PR, "Sweeps behind flights every 15 s while memory is not pressed"). ## Tests - `cargo clippy -p victory-gpu --all-targets`: no new warnings. - Used in about forty runs on our fork. This change and its testing were done with an AI assistant (Claude Code), and the results were checked on my machine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The frame-rate line is an average and hides stutter: 30 fps can be even 33 ms
frames or 20 and 80 ms ones. One line each time the frame-rate line is made, in
every build, under its own target (victory_gpu::frame_times), so that
VICTORY_LOG='warn,victory_gpu::frame_times=info' keeps it alone. It found a
hitch every 1.5 s on an RTX 5070 Ti (median 30.7 ms, p99 60, worst ~100) that
the frame-rate line did not show.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 21:17:42 +00:00
github-bot closed this pull request 2026-11-28 02:54:35 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-28 02:49 UTC · original

Merged into main (8fc2254) and shipped in v2026.11.27.10. The commit keeps you as its author, so it counts toward the contributors list. GitHub shows this as closed rather than merged only because the commits were applied on top of the newest main (new commit IDs). Thank you!

**@⁠trustno1-coder** on GitHub · 2026-11-28 02:49 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/341#issuecomment-7232618908) Merged into main (8fc2254) and shipped in [v2026.11.27.10](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.27.10). The commit keeps you as its author, so it counts toward the contributors list. GitHub shows this as closed rather than merged only because the commits were applied on top of the newest main (new commit IDs). Thank you!

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!341
No description provided.