Frame-times line: frames over 16.7, 20 and 25 ms, and pairs of frames in a row over 33.4 ms #3999

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

@⁠kMagic142 on GitHub · 2026-11-30 14:07 UTC · original
kMagic142:pr-frame-dips → main · +43 −2 · 1 files · 1 commits · open

What it changes

frame_times_line (target victory_gpu::frame_times, once a second) logs the median, p95, p99 and longest time between presents, and how many frames took over 50 ms and over 100 ms. Near 60 fps those last two counts stay at 0, and the percentiles cover only one second's ~60 frames. So the line does not say how often a 60-a-second pace was missed.

It now also counts the following, from the same intervals and before they are sorted (dips):

  • the frames over 16.7, 20 and 25 ms;
  • the pairs of frames in a row that together took over 33.4 ms, two refreshes at 60 Hz. A short frame next to a long one cannot make up for such a pair. A pace that swings between short and long frames misses in every pair: 12 and 24 ms in turn averages 18, and 15 and 19 ms in turn misses even though no frame passes 20 ms. Each frame is in a pair with the one before it and with the one after it. A pair that crosses from one line to the next is not counted.

The new counts go at the end of the line. Here is one second of a run near 60 fps, in this PR's wording:

frame times: 64 frames, median 15.4 ms, p95 19.8, p99 20.8, longest 21.7; 0 over 50 ms, 0 over 100 ms; 21 over 16.7 ms, 3 over 20 ms, 0 over 25 ms, 16 pairs in a row over 33.4 ms

scripts/play-rig.ps1 and scripts/watch-rig.ps1 read only the start of this line (frame times: N frames, median X ms). scripts/bench.ps1 reads the diagnostics framelog line, not this one. None of them change. Only the log line changes; nothing on screen does.

How it was tested

  • GPU and profile: RTX 5090, Core Ultra 9 285K; Series X, 1440p, DLSS Quality, no frame generation.
  • Before: the line ends at N over 100 ms. In the steady cutscene near 60 fps, both the over-50 and the over-100 counts are 0 in most seconds.
  • After: we have had the same four counts on our own builds' line for a day of runs. Those builds are v2026.11.28.03 with other changes of ours, and the wording differs slightly from this PR's. The example above is one second of the opening's cutscenes there.
  • Not run on main: this branch itself was not run in the game. The unit test dips_tests covers an even pace, two swinging paces, a long frame between short ones, a lone frame and an empty second.
  • For shader changes, the wave sizes tested: not a shader change.
  • cargo test passed for the crates it touches: Yes. cargo xwin check -p victory --target x86_64-pc-windows-msvc passes on main (41adb551) with this branch applied, and dips_tests::the_misses_of_a_60_a_second_pace_are_counted passes (1 passed, 0 failed).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches (frame times, percentiles, 1% low, pacing). Related:
    • #3920 adds a rolling 1% low (the p99 of the last 100 presents) to the F3 panel and the FPS line, and leaves frame_times_line as it is. This PR only adds counts to the end of the log line. The two change nearby lines of host.rs but each applies to main on top of the other without conflict (checked with git apply).
    • #3851 (VICTORY_FRAME_PACE, which evens out long/short frame pairs) and #2201 (VICTORY_PACE) change the pace itself. #3851 moves the call to frame_times_line to another thread, with the same signature. Both apply on top of this branch. The pair count is one way to see what they do near 60 fps.
**@⁠kMagic142** on GitHub · 2026-11-30 14:07 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3999) `kMagic142:pr-frame-dips` → `main` · +43 −2 · 1 files · 1 commits · open ## What it changes `frame_times_line` (target `victory_gpu::frame_times`, once a second) logs the median, p95, p99 and longest time between presents, and how many frames took over 50 ms and over 100 ms. Near 60 fps those last two counts stay at 0, and the percentiles cover only one second's ~60 frames. So the line does not say how often a 60-a-second pace was missed. It now also counts the following, from the same intervals and before they are sorted (`dips`): - the frames over 16.7, 20 and 25 ms; - the pairs of frames in a row that together took over 33.4 ms, two refreshes at 60 Hz. A short frame next to a long one cannot make up for such a pair. A pace that swings between short and long frames misses in every pair: 12 and 24 ms in turn averages 18, and 15 and 19 ms in turn misses even though no frame passes 20 ms. Each frame is in a pair with the one before it and with the one after it. A pair that crosses from one line to the next is not counted. The new counts go at the end of the line. Here is one second of a run near 60 fps, in this PR's wording: ``` frame times: 64 frames, median 15.4 ms, p95 19.8, p99 20.8, longest 21.7; 0 over 50 ms, 0 over 100 ms; 21 over 16.7 ms, 3 over 20 ms, 0 over 25 ms, 16 pairs in a row over 33.4 ms ``` `scripts/play-rig.ps1` and `scripts/watch-rig.ps1` read only the start of this line (`frame times: N frames, median X ms`). `scripts/bench.ps1` reads the diagnostics `framelog` line, not this one. None of them change. Only the log line changes; nothing on screen does. ## How it was tested - GPU and profile: RTX 5090, Core Ultra 9 285K; Series X, 1440p, DLSS Quality, no frame generation. - Before: the line ends at `N over 100 ms`. In the steady cutscene near 60 fps, both the over-50 and the over-100 counts are 0 in most seconds. - After: we have had the same four counts on our own builds' line for a day of runs. Those builds are `v2026.11.28.03` with other changes of ours, and the wording differs slightly from this PR's. The example above is one second of the opening's cutscenes there. - Not run on main: this branch itself was not run in the game. The unit test `dips_tests` covers an even pace, two swinging paces, a long frame between short ones, a lone frame and an empty second. - For shader changes, the wave sizes tested: not a shader change. - `cargo test` passed for the crates it touches: Yes. `cargo xwin check -p victory --target x86_64-pc-windows-msvc` passes on main (41adb551) with this branch applied, and `dips_tests::the_misses_of_a_60_a_second_pace_are_counted` passes (1 passed, 0 failed). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches (frame times, percentiles, 1% low, pacing). Related: - #3920 adds a rolling 1% low (the p99 of the last 100 presents) to the F3 panel and the FPS line, and leaves `frame_times_line` as it is. This PR only adds counts to the end of the log line. The two change nearby lines of `host.rs` but each applies to main on top of the other without conflict (checked with `git apply`). - #3851 (`VICTORY_FRAME_PACE`, which evens out long/short frame pairs) and #2201 (`VICTORY_PACE`) change the pace itself. #3851 moves the call to `frame_times_line` to another thread, with the same signature. Both apply on top of this branch. The pair count is one way to see what they do near 60 fps.
Near 60 frames a second the line's counts over 50 and 100 ms stay at zero
and its percentiles are of one second's frames, so it does not say how
often a 60-a-second pace was missed. It now also counts, per line, the
frames over 16.7, 20 and 25 ms and the pairs of frames in a row that
together took over 33.4 ms (two refreshes at 60 Hz): a pace that swings
between short and long frames misses in every such pair even when no
frame passes 20 ms. Counted before the intervals are sorted; appended to
the end of the line, so readers of its start (play-rig.ps1,
watch-rig.ps1) are unaffected.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 14:08:30 +00:00
Author
Owner

@⁠dyshay on GitHub · 2026-11-30 14:53 UTC · original

Merged for testing into our integration branch dyshay/VIctory-NVIDIA janus-prs. Builds and the targeted CPU tests pass; a run on an RTX 4090 (Series S, hardware RT) is queued and I'll post the result here.

**@⁠dyshay** on GitHub · 2026-11-30 14:53 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3999#issuecomment-7282098769) Merged for testing into our integration branch [dyshay/VIctory-NVIDIA `janus-prs`](https://github.com/dyshay/VIctory-NVIDIA/tree/janus-prs). Builds and the targeted CPU tests pass; a run on an RTX 4090 (Series S, hardware RT) is queued and I'll post the result here.
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/3999/head:github-bot/gh-3999'
git switch 'github-bot/gh-3999'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3999'
git switch 'github-bot/gh-3999'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3999'
git switch 'github-bot/gh-3999'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3999'
git switch 'main'
git merge --squash 'github-bot/gh-3999'
git switch 'main'
git merge --ff-only 'github-bot/gh-3999'
git switch 'main'
git merge 'github-bot/gh-3999'
git push origin 'main'
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!3999
No description provided.