Testing: compare Windows benchmark runs with memory and time limits #2186

Open
Razdva122 wants to merge 3 commits from upstream-pr/2188 into main
Razdva122 commented 2026-11-25 07:20:45 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Razdva122 on 2026-11-25T07:20:45Z.


Implements the comparable Windows benchmark report proposed by @bittertea0323 in issue 819 (currently unavailable on GitHub). The coordination board tracks this independent implementation as NEW-84. Coordination thread

$first = cargo xtask bench --title 'D:\titles\test.exe' --console series-s --label baseline
cargo xtask bench --title 'D:\titles\test.exe' --console series-s --exe 'D:\candidate\victory.exe' --baseline $first

One Markdown file records translation and texture failure counts, frame-rate and draw peaks, sampled peak working set, crash RVA when available, the stop reason and a three-second timeline. The reports default to the user's local data directory and can be compared by passing a previous report. The defaults are 180 seconds, an 8 GiB process working-set ceiling and a 3 GiB floor for available system memory. These are sampled limits. If free memory is already below the floor before launch, the report records the available memory and marks all six title metrics as unobserved. The default executable is the release build in Cargo’s target directory, including when CARGO_TARGET_DIR is set.

The runner is a Rust subcommand alongside cargo xtask policy. The existing workspace test command runs the self-tests with synthetic inputs. On Windows the test binary launches a child that emits diagnostic lines and a known exit code. It checks stderr drainage, crash RVA, time and working-set cutoffs, and the low-free-memory check before launch. Separate parser assertions cover report aggregation and comparison to a previous Markdown report. These checks need no title assets. Representative performance figures require two local title runs.

The four benchmark self-tests took 1.02 s on Windows at 48f115c. After compiling the test executable, the standalone Cargo command took 1.235 s end to end. The PR adds no CI workflow step. Windows timing · Workspace CI

AI-assisted with Codex.

Closes #819. Coordination record for NEW-84

<!-- greyfinch-sync:Marvisak/VIctory:issue:5486981344 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2188). Originally posted by [Razdva122](https://github.com/Razdva122) on 2026-11-25T07:20:45Z. --- Implements the comparable Windows benchmark report proposed by @bittertea0323 in issue 819 (currently unavailable on GitHub). The coordination board tracks this independent implementation as NEW-84. [Coordination thread](https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7155559919) ```powershell $first = cargo xtask bench --title 'D:\titles\test.exe' --console series-s --label baseline cargo xtask bench --title 'D:\titles\test.exe' --console series-s --exe 'D:\candidate\victory.exe' --baseline $first ``` One Markdown file records translation and texture failure counts, frame-rate and draw peaks, sampled peak working set, crash RVA when available, the stop reason and a three-second timeline. The reports default to the user's local data directory and can be compared by passing a previous report. The defaults are 180 seconds, an 8 GiB process working-set ceiling and a 3 GiB floor for available system memory. These are sampled limits. If free memory is already below the floor before launch, the report records the available memory and marks all six title metrics as unobserved. The default executable is the release build in Cargo’s target directory, including when CARGO_TARGET_DIR is set. The runner is a Rust subcommand alongside `cargo xtask policy`. The existing workspace test command runs the self-tests with synthetic inputs. On Windows the test binary launches a child that emits diagnostic lines and a known exit code. It checks stderr drainage, crash RVA, time and working-set cutoffs, and the low-free-memory check before launch. Separate parser assertions cover report aggregation and comparison to a previous Markdown report. These checks need no title assets. Representative performance figures require two local title runs. The four benchmark self-tests took 1.02 s on Windows at `48f115c`. After compiling the test executable, the standalone Cargo command took 1.235 s end to end. The PR adds no CI workflow step. [Windows timing](https://github.com/Razdva122/VIctory/actions/runs/46117015738/job/140892995593) · [Workspace CI](https://github.com/Marvisak/VIctory/actions/runs/46117020621/job/140893010259) AI-assisted with Codex. Closes #819. [Coordination record for NEW-84](https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7235337397)
catminou4 commented 2026-11-25 08:02:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T08:02:58Z.

Review: COMMENTED


Static review only: docs/tools change — no crate code.

Benchmark comparison docs (memory + time) — methodology documentation; useful for the perf PR stream (#2150's 13.5% claim would benefit).

<!-- greyfinch-sync:Marvisak/VIctory:review:6053835459 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2188#pullrequestreview-6053835459). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T08:02:58Z. **Review:** COMMENTED --- Static review only: docs/tools change — no crate code. Benchmark comparison docs (memory + time) — methodology documentation; useful for the perf PR stream (#2150's 13.5% claim would benefit).
Marvisak commented 2026-11-25 13:02:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T12:39:15Z.


Automated triage for the maintainers.

Needs work: needs the maintainer's decision. This adds a step to the CI workflow (.github/workflows/ci.yml runs tests/bench.ps1), plus a 275-line PowerShell script (scripts/victory-bench.ps1) that launches victory.exe and compares benchmark runs under memory and time limits, and a README section. Changes to CI workflows and scripts that run the program are for the maintainer to accept.

If the maintainer wants a benchmark harness:

  • CI has no title data, so it is unclear what the new CI step measures there beyond the script's own self-test. Please say what it runs on a runner without the title, and how long it adds.
  • A tool like this would sit better as an xtask command in Rust next to cargo xtask policy than as a PowerShell script, so it builds and is checked like the rest of the repo.

Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7162670957 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2188#issuecomment-7162670957). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T12:39:15Z. --- <!-- victory-triage v1 head=03e854856be341dc0ac195f3c80da2c5c46a764f verdict=needs-work at=2026-11-25T13:54:00Z --> Automated triage for the maintainers. **Needs work: needs the maintainer's decision.** This adds a step to the CI workflow (`.github/workflows/ci.yml` runs `tests/bench.ps1`), plus a 275-line PowerShell script (`scripts/victory-bench.ps1`) that launches `victory.exe` and compares benchmark runs under memory and time limits, and a README section. Changes to CI workflows and scripts that run the program are for the maintainer to accept. If the maintainer wants a benchmark harness: - CI has no title data, so it is unclear what the new CI step measures there beyond the script's own self-test. Please say what it runs on a runner without the title, and how long it adds. - A tool like this would sit better as an `xtask` command in Rust next to `cargo xtask policy` than as a PowerShell script, so it builds and is checked like the rest of the repo. --- _Generated by [Claude Code](https://claude.ai/code)_
Razdva122 commented 2026-11-28 06:37:33 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Razdva122 on 2026-11-28T06:37:33Z.


@Marvisak, could you re-review the benchmark tool at 48f115c and let us know whether the Rust xtask addresses the earlier review? It now runs as cargo xtask bench, and the existing workspace test command exercises it without game data or a new CI step. The four benchmark self-tests took 1.02 s on Windows. This head also finds the release executable under a custom Cargo target directory and reports title metrics as unobserved if the memory guard prevents launch. Timing and test cases · Workspace CI

<!-- greyfinch-sync:Marvisak/VIctory:comment:7235415877 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2188#issuecomment-7235415877). Originally posted by [Razdva122](https://github.com/Razdva122) on 2026-11-28T06:37:33Z. --- @Marvisak, could you re-review the benchmark tool at `48f115c` and let us know whether the Rust xtask addresses the earlier review? It now runs as `cargo xtask bench`, and the existing workspace test command exercises it without game data or a new CI step. The four benchmark self-tests took 1.02 s on Windows. This head also finds the release executable under a custom Cargo target directory and reports title metrics as unobserved if the memory guard prevents launch. [Timing and test cases](https://github.com/Razdva122/VIctory/actions/runs/46117015738/job/140892995593) · [Workspace CI](https://github.com/Marvisak/VIctory/actions/runs/46117020621/job/140893010259)
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/2188:upstream-pr/2188'
git switch 'upstream-pr/2188'

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