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

Open
github-bot wants to merge 1 commit from github-bot/gh-272 into main AGit
Owner

@⁠a-to-z on GitHub · 2026-11-26 13:58 UTC · original
a-to-z:diag/frame-time-percentiles → main · +42 −0 · 1 files · 1 commits · open

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

**@⁠a-to-z** on GitHub · 2026-11-26 13:58 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/272) `a-to-z:diag/frame-time-percentiles` → `main` · +42 −0 · 1 files · 1 commits · open ## 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)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 14:00:53 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/272/head:github-bot/gh-272'
git switch 'github-bot/gh-272'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-272'
git switch 'github-bot/gh-272'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-272'
git switch 'github-bot/gh-272'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-272'
git switch 'main'
git merge --squash 'github-bot/gh-272'
git switch 'main'
git merge --ff-only 'github-bot/gh-272'
git switch 'main'
git merge 'github-bot/gh-272'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.