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

Open
maxence468 wants to merge 1 commit from upstream-pr/2645 into main
maxence468 commented 2026-11-25 17:29:52 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by maxence468 on 2026-11-25T17:29:52Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6610033819 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2645). Originally posted by [maxence468](https://github.com/maxence468) on 2026-11-25T17:29:52Z. --- 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.
kotekompotek commented 2026-11-25 18:02:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T17:53:29Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170143003 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2645#issuecomment-7170143003). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T17:53:29Z. --- 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.
Marvisak commented 2026-11-25 23:06:04 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:16:25Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176154676 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2645#issuecomment-7176154676). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:16:25Z. --- <!-- 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)_
Kajanos commented 2026-11-26 01:04:00 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Kajanos on 2026-11-26T00:20:09Z.


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)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7178647857 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2645#issuecomment-7178647857). Originally posted by [Kajanos](https://github.com/Kajanos) on 2026-11-26T00:20:09Z. --- 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 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/2645:upstream-pr/2645'
git switch 'upstream-pr/2645'

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/2645'
git switch 'upstream-pr/2645'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2645'
git switch 'upstream-pr/2645'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2645'
git switch 'main'
git merge --squash 'upstream-pr/2645'
git switch 'main'
git merge --ff-only 'upstream-pr/2645'
git switch 'main'
git merge 'upstream-pr/2645'
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
Marvisak/VIctory!2643
No description provided.