bench.ps1: the frame lines' newer texts, and a shared read of the log the game writes #3925

Closed
github-bot wants to merge 2 commits from github-bot/gh-3925 into main AGit
Owner

@⁠Cooperos on GitHub · 2026-11-30 11:45 UTC · original
Cooperos:bench-frame-line-formats → main · +49 −9 · 1 files · 2 commits · closed without merging

What it changes

The bench could not read a single 5-second frame line, so every run ended
in "the world did not start within 900 s" with an empty summary - the
world's gate reads its draws from those lines.

Three things drifted from the texts the script matches:

  • the frame line's dropped text: the script expected "dropped N without a
    host pipeline (M being made)", main's line says "dropped N draws or
    dispatches (M being made) and K indirect". The expression now takes
    either;
  • the frame-times line: it moved to victory_gpu::frame_times and now
    gives the window's median, p95, p99 and longest in ms, where the older
    victory_gpu::framelog line carried a per-frame list in tenths of a
    millisecond. The p99/p99.9 now come from the line's own percentiles -
    the worst 5 s line of the window, close to the window's true tail for
    being ~150 frames a line;
  • the summary read the run's victory.log with a plain ReadLines while
    the game was writing it, which threw "the file is being used by another
    process" when the read raced the writer. It reads with FileShare
    ReadWrite, Delete now.

How it was tested

  • The regular expressions against main's (41adb551) real log lines: the
    frame line and the frame-times line both match, groups right.
  • A run the old script threw away ("the world did not start within
    900 s", empty table) summarises with this change: world after 39 s,
    35 frame lines, median 23.1 fps (2,223 draws), p99 101.8 ms.
  • A bench series of six runs on this script (RTX 3070 Ti 8 GB, driver
    610.88, Series S, main 41adb551): every run started, measured and
    summarised.

Checked for overlap

Searched the open pull requests for bench.ps1 changes: none found

**@⁠Cooperos** on GitHub · 2026-11-30 11:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3925) `Cooperos:bench-frame-line-formats` → `main` · +49 −9 · 1 files · 2 commits · closed without merging ## What it changes The bench could not read a single 5-second frame line, so every run ended in "the world did not start within 900 s" with an empty summary - the world's gate reads its draws from those lines. Three things drifted from the texts the script matches: - the frame line's dropped text: the script expected "dropped N without a host pipeline (M being made)", main's line says "dropped N draws or dispatches (M being made) and K indirect". The expression now takes either; - the frame-times line: it moved to `victory_gpu::frame_times` and now gives the window's median, p95, p99 and longest in ms, where the older `victory_gpu::framelog` line carried a per-frame list in tenths of a millisecond. The p99/p99.9 now come from the line's own percentiles - the worst 5 s line of the window, close to the window's true tail for being ~150 frames a line; - the summary read the run's victory.log with a plain `ReadLines` while the game was writing it, which threw "the file is being used by another process" when the read raced the writer. It reads with `FileShare` ReadWrite, Delete now. ## How it was tested - The regular expressions against main's (`41adb551`) real log lines: the frame line and the frame-times line both match, groups right. - A run the old script threw away ("the world did not start within 900 s", empty table) summarises with this change: world after 39 s, 35 frame lines, median 23.1 fps (2,223 draws), p99 101.8 ms. - A bench series of six runs on this script (RTX 3070 Ti 8 GB, driver 610.88, Series S, main `41adb551`): every run started, measured and summarised. ## Checked for overlap Searched the open pull requests for bench.ps1 changes: none found
The 5-second frame line's dropped text changed some commits ago (now
'dropped N draws or dispatches (M being made) and K indirect'), and the
frame-times line moved to victory_gpu::frame_times with the window's
median, p95, p99 and longest in place of the per-frame list. The bench's
regular expressions still matched the older texts, so no frame line
matched at all: the world never 'started' (its gate reads the draws of
the frame lines), every run ended in 'the world did not start within
900 s', and the summary was empty.

The summary also read the run's victory.log with a plain ReadLines while
the game was writing it, which threw 'the file is being used by another
process' when the read raced the writer.

- the frame line's regular expression takes either dropped text;
- the frame-times line is read from victory_gpu::frame_times, and the
  p99/p99.9 come from its own percentiles (the worst 5 s line of the
  window) where there is no per-frame list to percentile over;
- the log is read with FileShare ReadWrite, Delete.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 11:46:10 +00:00
Author
Owner

@⁠Pierrespeick on GitHub · 2026-11-30 15:04 UTC · original

I checked the frame-line regex at 960eca32 against a previous RTX 4060 Series S session. It matched all 28 FPS summary lines, including all 18 with at least 4,000 draws per frame.

I also ran the PR's unmodified bench.ps1 -From on Windows PowerShell with 32 synthetic timing windows of 250 frames each. Across the 8,000 frames, 7,996 took 20 ms, three took 80 ms, and one took 650 ms. All four slow frames were in the same window.

Output Pooled frame times Current summary.json
p99 20 ms 80 ms
p99.9 20 ms 650 ms

The longest frame is worth reporting in its own right. Lines 409 and 411 take the largest window p99 and the largest window maximum, respectively. Feeding those into the existing low-FPS fields also makes -Compare report 12.5 and 1.5 FPS for this fixture, where both reciprocals of the pooled percentiles are 50 FPS.

Could the summary expose worst_window_p99_ms and longest_frame_ms when only window summaries are available, and leave the pooled percentiles and derived lows null? The exact pooled percentiles can still be reported when individual frame intervals are available. The input already includes the frame count for each window, which could also give the summaries their own coverage count.

**@⁠Pierrespeick** on GitHub · 2026-11-30 15:04 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3925#issuecomment-7282399007) I checked the frame-line regex at `960eca32` against a previous RTX 4060 Series S session. It matched all 28 FPS summary lines, including all 18 with at least 4,000 draws per frame. I also ran the PR's unmodified `bench.ps1 -From` on Windows PowerShell with 32 synthetic timing windows of 250 frames each. Across the 8,000 frames, 7,996 took 20 ms, three took 80 ms, and one took 650 ms. All four slow frames were in the same window. | Output | Pooled frame times | Current summary.json | |---|---:|---:| | p99 | 20 ms | 80 ms | | p99.9 | 20 ms | 650 ms | The longest frame is worth reporting in its own right. Lines 409 and 411 take the largest window p99 and the largest window maximum, respectively. Feeding those into the existing low-FPS fields also makes `-Compare` report 12.5 and 1.5 FPS for this fixture, where both reciprocals of the pooled percentiles are 50 FPS. Could the summary expose `worst_window_p99_ms` and `longest_frame_ms` when only window summaries are available, and leave the pooled percentiles and derived lows null? The exact pooled percentiles can still be reported when individual frame intervals are available. The input already includes the frame count for each window, which could also give the summaries their own coverage count.
A review's fixture (8,000 frames of 20 ms and one of 650 ms, no per-frame
list) showed the worst window's p99 standing in for the window set's read
as p99 80 ms, p99.9 650 ms and a 1 % low of 12.5 fps, where the pooled
truth is 20 ms and 50 fps. The windows' own worsts now go to their own
summary fields (worst_window_p99_ms, longest_frame_ms), the pooled
percentiles and the lows derived from them stay empty, and the summary
says so. Where the log carries every frame's length the exact pooled
percentiles are reported as before.
Author
Owner

@⁠Cooperos on GitHub · 2026-11-30 15:23 UTC · original

@⁠Pierrespeick, thanks!

Agreed on all counts - the fixture is exactly the case the
stand-in got wrong. Pushed b0d1deed: when only the window summaries are
in the log, the pooled p99/p99.9 and the lows derived from them are left
empty, and the summary reports the windows' own worsts as
worst_window_p99_ms and longest_frame_ms instead.

**@⁠Cooperos** on GitHub · 2026-11-30 15:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3925#issuecomment-7282928096) @⁠Pierrespeick, thanks! Agreed on all counts - the fixture is exactly the case the stand-in got wrong. Pushed `b0d1deed`: when only the window summaries are in the log, the pooled p99/p99.9 and the lows derived from them are left empty, and the summary reports the windows' own worsts as `worst_window_p99_ms` and `longest_frame_ms` instead.
Author
Owner

@⁠Zeyphers on GitHub · 2026-11-30 20:20 UTC · original

Tested on Windows 11, RTX 2080 Super 8 GB, Ryzen 7 5800X, main 84bd61e2 with this PR applied. Without it the bench never detected the world and kept sending Enter in-game (character jumping in place). With it the world gate fired after 54–56 s in 10 runs and every run summarised normally (Series S, DLSS Quality). The new patterns matched 123 frame lines and 582 frame-times lines in a main log. Works as described, thanks.

**@⁠Zeyphers** on GitHub · 2026-11-30 20:20 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3925#issuecomment-7290750144) Tested on Windows 11, RTX 2080 Super 8 GB, Ryzen 7 5800X, main `84bd61e2` with this PR applied. Without it the bench never detected the world and kept sending Enter in-game (character jumping in place). With it the world gate fired after 54–56 s in 10 runs and every run summarised normally (Series S, DLSS Quality). The new patterns matched 123 frame lines and 582 frame-times lines in a main log. Works as described, thanks.
Author
Owner

@⁠ByQuartz on GitHub · 2026-12-01 00:48 UTC · original

Tested on Windows 11, RTX 2080 8 GB (driver 621.40), Ryzen 5 3600X, 32 GB RAM, main 7d93ee07 with this PR's scripts/bench.ps1 (b0d1deed), Series S (from the F1 file), DLSS performance, standing, -Warmup 60 -Seconds 120. The world gate fired after 88 s, the window had 23 frame lines (median 15.7 fps, 6,284 draws, preparing 50.4 ms), and the run summarised and closed cleanly.

Two things I noticed in the summary:

  • The frame_times line comes once a second on this build (228 lines in the run's log), not every 5 s as the script's comments say. At ~15 fps a window has about 15 frames, so each window's p99 is its longest frame: worst_window_p99_ms and longest_frame_ms were both 136.4 ms here. The line also carries N over 50 ms, N over 100 ms; summing those over the window would give exact counts for the whole window.
  • summary.json has dlss_upscalings_per_frame: 1, but summary.md has no DLSS line. That line is printed only inside if ($p99), and $p99 is always empty with the new frame-times line.
**@⁠ByQuartz** on GitHub · 2026-12-01 00:48 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3925#issuecomment-7296759815) Tested on Windows 11, RTX 2080 8 GB (driver 621.40), Ryzen 5 3600X, 32 GB RAM, main `7d93ee07` with this PR's `scripts/bench.ps1` (`b0d1deed`), Series S (from the F1 file), DLSS performance, standing, `-Warmup 60 -Seconds 120`. The world gate fired after 88 s, the window had 23 frame lines (median 15.7 fps, 6,284 draws, preparing 50.4 ms), and the run summarised and closed cleanly. Two things I noticed in the summary: - The `frame_times` line comes **once a second** on this build (228 lines in the run's log), not every 5 s as the script's comments say. At ~15 fps a window has about 15 frames, so each window's p99 is its longest frame: `worst_window_p99_ms` and `longest_frame_ms` were both 136.4 ms here. The line also carries `N over 50 ms, N over 100 ms`; summing those over the window would give exact counts for the whole window. - `summary.json` has `dlss_upscalings_per_frame: 1`, but `summary.md` has no DLSS line. That line is printed only inside `if ($p99)`, and `$p99` is always empty with the new frame-times line.
github-bot closed this pull request 2026-12-01 18:50:59 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:47 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:47 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3925#issuecomment-7321562180) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

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!3925
No description provided.