bench: benchmark your own settings, not only PortWatch's #361

Open
github-bot wants to merge 3 commits from github-bot/gh-361 into main AGit
Owner

@⁠Bushyon on GitHub · 2026-12-03 20:07 UTC · original
Bushyon:benchmark-custom-settings → main · +171 −42 · 7 files · 3 commits · open

The benchmark always put PortWatch's settings over the user's, so there was no way to measure a preset or your own run.conf.

  • In the F1 menu, Left/Right on Benchmark mode picks custom settings (now the first choice), PortWatch RT ON or PortWatch RT OFF; Start benchmark picks the length, and Enter runs it and restarts the game.
  • From the terminal: ./run.sh play VICTORY_BENCH=custom (or rt, nort). Custom keeps your preset, run.conf and command line.
  • A custom report says it is not PortWatch's comparison setup, gives the actual upscaler, ray tracing, frame generation and output size, and leaves the internal resolution to the user. Every report now ends with the run's settings: only ones run.conf.default or a preset names (and CONSOLE, KEEP_FREE), without paths, with a count of those left out.
  • Fix: PortWatch runs kept whatever the user's preset set (shadows, tree quality and so on). Those are now cleared for the run, so earlier PortWatch results taken with a preset active may differ.
  • All modes still skip the movies and show the full panel.

Measured on an RX 7800 XT 16 GB, Ryzen 9 7900, 31 GB RAM, Fedora 44, 5 minutes each (240 s measured):

custom: potato preset PortWatch RT ON
Output / FSR 4 2560x1440 / Performance 3840x2160 / Quality
Ray tracing off on
Average fps 39.2 18.6
1% low 22.0 9.1
Slowest / quickest second 29.6 / 42.3 9.7 / 21.5
Peak video memory 10.2 GB 12.7 GB
Frames 9416 4454

The two columns use different settings; they show both modes working, not a comparison. The custom run also had VICTORY_WARM=0 on its command line.

Tested: victory-core tests pass on this branch. Both runs were made on a local build that also had #348; they entered the world, closed after the time, wrote their reports and restarted. PortWatch RT OFF was not run.

Later changes: the settings list and the preset check were tested on their own. Benchmark mode (and the first run) now stops pressing Enter once the world is drawn (three seconds in a row of 1000 or more draws a frame, 65 s still the limit) instead of always pressing until 65 s. A 2 minute PortWatch RT ON run with the Enter change (a build of main with it, this branch's scripts) got into the world and wrote its report: 23.5 fps average, 13.1 fps 1% low over the last 60 s. victory-core tests pass and this branch builds with it.

AI-assisted.

**@⁠Bushyon** on GitHub · 2026-12-03 20:07 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/361) `Bushyon:benchmark-custom-settings` → `main` · +171 −42 · 7 files · 3 commits · open The benchmark always put PortWatch's settings over the user's, so there was no way to measure a preset or your own `run.conf`. - In the F1 menu, Left/Right on **Benchmark mode** picks **custom settings** (now the first choice), **PortWatch RT ON** or **PortWatch RT OFF**; **Start benchmark** picks the length, and Enter runs it and restarts the game. - From the terminal: `./run.sh play VICTORY_BENCH=custom` (or `rt`, `nort`). Custom keeps your preset, `run.conf` and command line. - A custom report says it is not PortWatch's comparison setup, gives the actual upscaler, ray tracing, frame generation and output size, and leaves the internal resolution to the user. Every report now ends with the run's settings: only ones `run.conf.default` or a preset names (and `CONSOLE`, `KEEP_FREE`), without paths, with a count of those left out. - Fix: PortWatch runs kept whatever the user's preset set (shadows, tree quality and so on). Those are now cleared for the run, so earlier PortWatch results taken with a preset active may differ. - All modes still skip the movies and show the full panel. Measured on an RX 7800 XT 16 GB, Ryzen 9 7900, 31 GB RAM, Fedora 44, 5 minutes each (240 s measured): | | custom: potato preset | PortWatch RT ON | |---|---|---| | Output / FSR 4 | 2560x1440 / Performance | 3840x2160 / Quality | | Ray tracing | off | on | | Average fps | 39.2 | 18.6 | | 1% low | 22.0 | 9.1 | | Slowest / quickest second | 29.6 / 42.3 | 9.7 / 21.5 | | Peak video memory | 10.2 GB | 12.7 GB | | Frames | 9416 | 4454 | The two columns use different settings; they show both modes working, not a comparison. The custom run also had `VICTORY_WARM=0` on its command line. Tested: `victory-core` tests pass on this branch. Both runs were made on a local build that also had #348; they entered the world, closed after the time, wrote their reports and restarted. PortWatch RT OFF was not run. Later changes: the settings list and the preset check were tested on their own. Benchmark mode (and the first run) now stops pressing Enter once the world is drawn (three seconds in a row of 1000 or more draws a frame, 65 s still the limit) instead of always pressing until 65 s. A 2 minute PortWatch RT ON run with the Enter change (a build of `main` with it, this branch's scripts) got into the world and wrote its report: 23.5 fps average, 13.1 fps 1% low over the last 60 s. `victory-core` tests pass and this branch builds with it. AI-assisted.
The benchmark always put PortWatch's settings over the user's.

- VICTORY_BENCH=custom keeps the preset, run.conf and the command line.
  The menu's "Benchmark mode" cycles custom settings, PortWatch RT ON
  and PortWatch RT OFF.
- The report says when the settings are not PortWatch's, with the actual
  upscaler, ray tracing, frame generation and output size, and every
  report lists the run's settings (no paths).
- PortWatch runs now also clear what the user's preset set: shadows,
  tree quality and the other preset rows carried into them.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 20:07:21 +00:00
Author
Owner

@⁠Luxuride on GitHub · 2026-12-04 12:10 UTC · original

Good idea, and the smallest self-contained change in its batch: it turns every user with a non-standard setup from "cannot contribute evidence" into "can". Three shell nits and one thing I would not ship as-is.

What I checked:

  • The Rust side is properly done: bench.rs's running() accepts custom, the menu's BENCH_MODES table replaced the bench_without_rt bool, the menu test was extended with Some("custom:5"), and docs/SETTINGS.md:143 documents the mode. No undocumented switch.
  • tools/bench-results.sh:38: output=${s[width]}x${s[height]} — if the screenshot has a width but no height parsed, the report gets 1920x and PortWatch ingests a nonsense resolution. ${s[height]:-?} like line 54 already does would be enough.
  • run.sh:137: unset VICTORY_PRESET $(grep -ho '^VICTORY_[A-Z0-9_]*' "$root"/presets/*.conf | sort -u) relies on unquoted word splitting of a glob-derived list. If presets/ ever loses its .conf files, grep sees a literal path, prints an error, and the unset silently degrades to VICTORY_PRESET only — the run then quietly keeps the user's settings while reporting a PortWatch run. Make it $(... || true)-safe and check the list is non-empty before unsetting.

The one I would change outright: tools/bench-results.sh:52-53 dumps env | grep '^VICTORY_' into a report meant to be pasted publicly, filtered only for menu/bench names and for values containing a slash. That is a heuristic standing in for a decision — a path without a slash, or a legitimate value with one, both get through the wrong way. An allow-list of the settings you actually want in a report is safer, and it is also the version that will not need revisiting the first time someone's report carries something they did not expect.

50 commits behind, merges clean.

**@⁠Luxuride** on GitHub · 2026-12-04 12:10 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/361#issuecomment-7411075243) Good idea, and the smallest self-contained change in its batch: it turns every user with a non-standard setup from "cannot contribute evidence" into "can". Three shell nits and one thing I would not ship as-is. What I checked: - The Rust side is properly done: `bench.rs`'s `running()` accepts `custom`, the menu's `BENCH_MODES` table replaced the `bench_without_rt` bool, the menu test was extended with `Some("custom:5")`, and `docs/SETTINGS.md:143` documents the mode. No undocumented switch. - `tools/bench-results.sh:38`: `output=${s[width]}x${s[height]}` — if the screenshot has a width but no height parsed, the report gets `1920x` and PortWatch ingests a nonsense resolution. `${s[height]:-?}` like line 54 already does would be enough. - `run.sh:137`: `unset VICTORY_PRESET $(grep -ho '^VICTORY_[A-Z0-9_]*' "$root"/presets/*.conf | sort -u)` relies on unquoted word splitting of a glob-derived list. If `presets/` ever loses its `.conf` files, `grep` sees a literal path, prints an error, and the unset silently degrades to `VICTORY_PRESET` only — the run then quietly keeps the user's settings while reporting a PortWatch run. Make it `$(... || true)`-safe and check the list is non-empty before unsetting. The one I would change outright: `tools/bench-results.sh:52-53` dumps `env | grep '^VICTORY_'` into a report meant to be pasted publicly, filtered only for menu/bench names and for values containing a slash. That is a heuristic standing in for a decision — a path without a slash, or a legitimate value with one, both get through the wrong way. An allow-list of the settings you actually want in a report is safer, and it is also the version that will not need revisiting the first time someone's report carries something they did not expect. 50 commits behind, merges clean.
The report is posted in public, so "All settings of this run" now lists
only names run.conf.default or a preset has (and CONSOLE, KEEP_FREE),
still without paths, and says how many were left out.

A PortWatch run stops if no preset settings are found, instead of keeping
the ones the user had. The screenshot size is used only with both sides.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Enter was pressed until 65 s whatever was on screen, well into play on a
quick start. It now stops after three seconds in a row of 1000 or more
draws a frame (start and loading screens draw a few dozen), with 65 s
still the limit. The first run, which presses it too, stops the same way.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Author
Owner

@⁠Bushyon on GitHub · 2026-12-04 14:25 UTC · original

fixed the three points, and benchmark now stops pressing enter once you're in the world

**@⁠Bushyon** on GitHub · 2026-12-04 14:25 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/361#issuecomment-7414311553) fixed the three points, and benchmark now stops pressing enter once you're in the world
This pull request has changes conflicting with the target branch.
  • README.md
  • crates/victory-core/src/bench.rs
  • run.sh
  • tools/bench-results.sh
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/361/head:github-bot/gh-361'
git switch 'github-bot/gh-361'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-361'
git switch 'github-bot/gh-361'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-361'
git switch 'github-bot/gh-361'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-361'
git switch 'main'
git merge --squash 'github-bot/gh-361'
git switch 'main'
git merge --ff-only 'github-bot/gh-361'
git switch 'main'
git merge 'github-bot/gh-361'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.