Measure release-build present intervals to diagnose menu frame pacing #2645

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

@⁠maxence468 on GitHub · 2026-11-25 17:29 UTC · original
maxence468:gpu/present-intervals → main · +46 −4 · 1 files · 1 commits · open

The README tracks pacing drift on one menu screen in release builds. Average FPS can hide alternating short and long intervals. This samples the wall-clock interval between host DXGI Present returns and reports the sample count, median, p95 and maximum at the existing five-second log cadence. It reuses the sample buffer across reports and preserves the interval spanning two reports.

To collect a comparison, hold on a stable menu screen for 30 seconds in release, then repeat on the affected screen. Compare the host present intervals lines. At 30 fps the nominal interval is 33.33 ms. These timings describe application submissions and do not measure monitor scanout.

Added a unit test for empty, single-sample and uneven windows. Checked the percentile rank against the nearest-rank definition for sample counts 1 through 1000 and ran git diff --check. Rust and game data were unavailable locally. The change instruments the issue and leaves the pacing algorithm intact.

**@⁠maxence468** on GitHub · 2026-11-25 17:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/2645) `maxence468:gpu/present-intervals` → `main` · +46 −4 · 1 files · 1 commits · open The README tracks pacing drift on one menu screen in release builds. Average FPS can hide alternating short and long intervals. This samples the wall-clock interval between host DXGI Present returns and reports the sample count, median, p95 and maximum at the existing five-second log cadence. It reuses the sample buffer across reports and preserves the interval spanning two reports. To collect a comparison, hold on a stable menu screen for 30 seconds in release, then repeat on the affected screen. Compare the host present intervals lines. At 30 fps the nominal interval is 33.33 ms. These timings describe application submissions and do not measure monitor scanout. Added a unit test for empty, single-sample and uneven windows. Checked the percentile rank against the nearest-rank definition for sample counts 1 through 1000 and ran git diff --check. Rust and game data were unavailable locally. The change instruments the issue and leaves the pacing algorithm intact.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:11:06 +00:00
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 17:53 UTC · original

Reviewed: interval sampling on Present returns with median/p95/max is the right metric for the pacing drift. Two minor notes: present_intervals_us grows unbounded over a session (fine for a diagnostic run, worth a cap if it ever prints per-refresh); n - 1 - n/20 gives p95 = max for n < 20, acceptable during warmup. CI green.

**@⁠kotekompotek** on GitHub · 2026-11-25 17:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/2645#issuecomment-7170143003) Reviewed: interval sampling on Present returns with median/p95/max is the right metric for the pacing drift. Two minor notes: `present_intervals_us` grows unbounded over a session (fine for a diagnostic run, worth a cap if it ever prints per-refresh); `n - 1 - n/20` gives p95 = max for n < 20, acceptable during warmup. CI green.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 22:16 UTC · original

Automated triage for the maintainers.

This PR no longer merges cleanly into main (f3578e3). The conflict is in crates/victory-gpu/src/host.rs. It will be reviewed once it is rebased onto current main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 22:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/2645#issuecomment-7176154676) <!-- victory-triage v1 head=f247480afb8328bfeac21fe747ad2c49e50abba7 verdict=needs-rebase at=2026-11-25T22:17:00Z --> Automated triage for the maintainers. This PR no longer merges cleanly into `main` (f3578e3). The conflict is in `crates/victory-gpu/src/host.rs`. It will be reviewed once it is rebased onto current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Kajanos on GitHub · 2026-11-26 00:20 UTC · original

Tested on Windows 11 Home build 26300, RTX 5080, driver 621.40, rustc 1.98.1, interactive desktop session. PR head f247480, tested on its own base 13f91ca. It does not merge onto current main 63bcca4 (conflict in crates/victory-gpu/src/host.rs, which #2110 and #1997 have since changed), so it was not tested merged.

  • cargo test --locked -p victory-gpu: 194 passed, 2 failed. The same two tests also fail on 13f91ca without this PR (descriptor::host::tests::dynamic_slots_are_held_until_released, memory::tests::lists_share_a_table_and_copies_keep_their_views, both from the view heap being below HEAP_VIEWS, which main has since fixed). No new failures.
  • The new present_interval_tests::summarizes_sparse_and_uneven_frames passes in debug and --release.

Not run: the retail title (no dump, so no real present-interval readings), clippy, other crates, the PR merged onto current main.

AI-assisted (Claude Code)

**@⁠Kajanos** on GitHub · 2026-11-26 00:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/2645#issuecomment-7178647857) Tested on Windows 11 Home build 26300, RTX 5080, driver 621.40, rustc 1.98.1, interactive desktop session. PR head `f247480`, tested on its own base `13f91ca`. It does not merge onto current `main` `63bcca4` (conflict in `crates/victory-gpu/src/host.rs`, which #2110 and #1997 have since changed), so it was not tested merged. - `cargo test --locked -p victory-gpu`: 194 passed, 2 failed. The same two tests also fail on `13f91ca` without this PR (`descriptor::host::tests::dynamic_slots_are_held_until_released`, `memory::tests::lists_share_a_table_and_copies_keep_their_views`, both from the view heap being below `HEAP_VIEWS`, which `main` has since fixed). No new failures. - The new `present_interval_tests::summarizes_sparse_and_uneven_frames` passes in debug and `--release`. Not run: the retail title (no dump, so no real present-interval readings), clippy, other crates, the PR merged onto current `main`. AI-assisted (Claude Code)
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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