Frame meter: per-frame times every 5 s (median, p95, p99, longest, frames over 50/100 ms) #272

Open
a-to-z wants to merge 1 commit from upstream-pr/272 into main
a-to-z commented 2026-11-26 13:58:40 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by a-to-z on 2026-11-26T13:58:40Z.


Why

The frame-rate line gives an average per second, which hides hitches: a second with one 900 ms frame and 29 fast ones reads as "18 fps". The README already quotes p95 frame times, but nothing in the log reported them, so steadiness could not be read from a normal run.

What

Diagnostics builds only (#[cfg(feature = "diagnostics")]); release builds are unchanged.

  • Meter keeps the time between presents for each frame.
  • With the meter's lines of every 5 s, on the meter thread (meter_lines, not the presenting thread), one more line:
frame times over the last 5 s: 104 frames, median 44.7 ms, p95 75.3, p99 129.0, longest 201.4; 21 over 50 ms, 4 over 100 ms

The cost on the presenting thread is one Instant::now() and a Vec push a frame; the sort of ~150 values runs on the meter thread every 5 s.

What it showed (RX 9070 XT, 32 GB, -Safe, renderer patches 1, 2, 5, 6, 7)

Correlated with a per-second sample of Windows' \Memory\Pages Input/sec, over a 240 s window in the world: the 5 s blocks with heavy paging (over 2,000 pages a second read from disk) held 72 of the 101 frames over 100 ms, at a median frame of 61.6 ms against 49.5 ms in the others. On a 32 GB PC, the hitches are mostly paging; averages did not show it.

Testing

  • cargo build --locked --profile diag -p victory --features diagnostics, cargo build --locked --release -p victory
  • cargo test -p victory-gpu --lib (381 passed)
  • cargo clippy -p victory-gpu --features diagnostics: no new warnings (the one in watch.rs is on main)
  • Several 8-10 minute runs on the hardware above: the line every 5 s, no change in frame rate.

🤖 Generated with Claude Code

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6628232016 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/272). Originally posted by [a-to-z](https://github.com/a-to-z) on 2026-11-26T13:58:40Z. --- ## Why The frame-rate line gives an average per second, which hides hitches: a second with one 900 ms frame and 29 fast ones reads as "18 fps". The README already quotes p95 frame times, but nothing in the log reported them, so steadiness could not be read from a normal run. ## What Diagnostics builds only (`#[cfg(feature = "diagnostics")]`); release builds are unchanged. - `Meter` keeps the time between presents for each frame. - With the meter's lines of every 5 s, on the meter thread (`meter_lines`, not the presenting thread), one more line: ``` frame times over the last 5 s: 104 frames, median 44.7 ms, p95 75.3, p99 129.0, longest 201.4; 21 over 50 ms, 4 over 100 ms ``` The cost on the presenting thread is one `Instant::now()` and a `Vec` push a frame; the sort of ~150 values runs on the meter thread every 5 s. ## What it showed (RX 9070 XT, 32 GB, `-Safe`, renderer patches 1, 2, 5, 6, 7) Correlated with a per-second sample of Windows' `\Memory\Pages Input/sec`, over a 240 s window in the world: the 5 s blocks with heavy paging (over 2,000 pages a second read from disk) held 72 of the 101 frames over 100 ms, at a median frame of 61.6 ms against 49.5 ms in the others. On a 32 GB PC, the hitches are mostly paging; averages did not show it. ## Testing - `cargo build --locked --profile diag -p victory --features diagnostics`, `cargo build --locked --release -p victory` - `cargo test -p victory-gpu --lib` (381 passed) - `cargo clippy -p victory-gpu --features diagnostics`: no new warnings (the one in `watch.rs` is on `main`) - Several 8-10 minute runs on the hardware above: the line every 5 s, no change in frame rate. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/272:upstream-pr/272'
git switch 'upstream-pr/272'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/272'
git switch 'upstream-pr/272'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/272'
git switch 'upstream-pr/272'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/272'
git switch 'main'
git merge --squash 'upstream-pr/272'
git switch 'main'
git merge --ff-only 'upstream-pr/272'
git switch 'main'
git merge 'upstream-pr/272'
git push origin 'main'
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
avatarmanz/VIctory-7900XTX!272
No description provided.