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

Closed
Cooperos wants to merge 2 commits from upstream-pr/3925 into main
Cooperos commented 2026-11-30 11:45:12 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Cooperos on 2026-11-30T11:45:12Z.


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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5564606677 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3925). Originally posted by [Cooperos](https://github.com/Cooperos) on 2026-11-30T11:45:12Z. --- ## 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
Pierrespeick commented 2026-11-30 15:04:54 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Pierrespeick on 2026-11-30T15:04:54Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7282399007 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3925#issuecomment-7282399007). Originally posted by [Pierrespeick](https://github.com/Pierrespeick) on 2026-11-30T15:04:54Z. --- 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.
Cooperos commented 2026-11-30 15:23:52 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Cooperos on 2026-11-30T15:23:52Z.


@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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7282928096 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3925#issuecomment-7282928096). Originally posted by [Cooperos](https://github.com/Cooperos) on 2026-11-30T15:23:52Z. --- @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.
Zeyphers commented 2026-11-30 20:20:06 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Zeyphers on 2026-11-30T20:20:06Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7290750144 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3925#issuecomment-7290750144). Originally posted by [Zeyphers](https://github.com/Zeyphers) on 2026-11-30T20:20:06Z. --- 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.
ByQuartz commented 2026-12-01 00:48:25 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ByQuartz on 2026-12-01T00:48:25Z.


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.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7296759815 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3925#issuecomment-7296759815). Originally posted by [ByQuartz](https://github.com/ByQuartz) on 2026-12-01T00:48:25Z. --- 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.
trustno1-coder commented 2026-12-01 18:47:48 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:47:48Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321562180 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3925#issuecomment-7321562180). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:47:48Z. --- 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

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
trustno1-coder/VIctory-NVIDIA!3925
No description provided.