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

Closed
bentsignal wants to merge 1 commit from upstream-pr/341 into main
bentsignal commented 2026-11-27 21:13:03 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by bentsignal on 2026-11-27T21:13:03Z.


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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5533167133 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/341). Originally posted by [bentsignal](https://github.com/bentsignal) on 2026-11-27T21:13:03Z. --- ## 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)
trustno1-coder commented 2026-11-28 02:49:39 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-28T02:49:39Z.


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!

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7232618908 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/341#issuecomment-7232618908). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-28T02:49:39Z. --- 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

Sign in to join this conversation.
No reviewers
No labels
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.

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