Diagnostics: capture a frame by time, and a marker when its dump is complete #1075

Open
github-bot wants to merge 1 commit from github-bot/gh-1075 into main AGit
Owner

@⁠SpaghettiMaster545 on GitHub · 2026-11-25 18:36 UTC · original
SpaghettiMaster545:pr/capture-by-time → main · +170 −15 · 2 files · 1 commits · open

Two diagnostics-build additions to the frame capture, so that unattended test runs are shorter and never stop in the middle of a dump.

VICTORY_CAPTURE_SECONDS=<s>

  • Captures the frame begun after the first present at or after <s> seconds since the process started.
  • That frame is captured exactly like a frame listed in VICTORY_CAPTURE_FRAMES, with its targets too when VICTORY_DUMP_TARGETS is set, and its files keep the real frame number. It is picked at the present before it, so nothing of it is recorded before the pick.
  • VICTORY_CAPTURE_FRAMES works as before.

Why: the menus run at 30 fps and the world at 4–6, so a frame number deep enough to be in the steady world is reached minutes after the world is steady. On an RTX 5070 Ti the world was steady from about 150–180 s, but frame 2250 only came at 320–440 s. Dumping at 240 s instead cut a warm test run from 310–380 s of game time to about 250 s.

Dump-complete marker

  • When a listed frame's capture is finished, the runtime logs a line and then writes dumped-<n>.txt as the last file, after the picture and every target are saved.
  • The target dump also logs how many targets the frame wrote and how many were saved.
  • A test script can now stop the run when that file appears. Before, it had to wait until files stopped coming, and a slow frame's dump has gaps of several seconds.

Tested

  • Windows 11, NVIDIA GeForce RTX 5070 Ti, driver 621.40.
  • The new capture tests in capture.rs pass on this branch (4 tests).
  • cargo clippy reports nothing in the changed files. main already fails -D warnings on four existing victory-gpu lints, which #982 fixes.
  • The same change has been used for every game test run on our integration branch since this afternoon, with VICTORY_CAPTURE_SECONDS=240: the dumps were complete, and runs stopped about 1 s after dumped-<n>.txt.

Only crates/victory-gpu/src/capture.rs and queue.rs change, and only diagnostics builds read the switch. Release builds behave as before.

**@⁠SpaghettiMaster545** on GitHub · 2026-11-25 18:36 UTC · [original](https://github.com/fxceless/victory-fork/pull/1075) `SpaghettiMaster545:pr/capture-by-time` → `main` · +170 −15 · 2 files · 1 commits · open Two diagnostics-build additions to the frame capture, so that unattended test runs are shorter and never stop in the middle of a dump. **`VICTORY_CAPTURE_SECONDS=<s>`** - Captures the frame begun after the first present at or after `<s>` seconds since the process started. - That frame is captured exactly like a frame listed in `VICTORY_CAPTURE_FRAMES`, with its targets too when `VICTORY_DUMP_TARGETS` is set, and its files keep the real frame number. It is picked at the present before it, so nothing of it is recorded before the pick. - `VICTORY_CAPTURE_FRAMES` works as before. Why: the menus run at 30 fps and the world at 4–6, so a frame number deep enough to be in the steady world is reached minutes after the world is steady. On an RTX 5070 Ti the world was steady from about 150–180 s, but frame 2250 only came at 320–440 s. Dumping at 240 s instead cut a warm test run from 310–380 s of game time to about 250 s. **Dump-complete marker** - When a listed frame's capture is finished, the runtime logs a line and then writes `dumped-<n>.txt` as the last file, after the picture and every target are saved. - The target dump also logs how many targets the frame wrote and how many were saved. - A test script can now stop the run when that file appears. Before, it had to wait until files stopped coming, and a slow frame's dump has gaps of several seconds. **Tested** - Windows 11, NVIDIA GeForce RTX 5070 Ti, driver 621.40. - The new capture tests in `capture.rs` pass on this branch (4 tests). - `cargo clippy` reports nothing in the changed files. `main` already fails `-D warnings` on four existing victory-gpu lints, which #982 fixes. - The same change has been used for every game test run on our integration branch since this afternoon, with `VICTORY_CAPTURE_SECONDS=240`: the dumps were complete, and runs stopped about 1 s after `dumped-<n>.txt`. Only `crates/victory-gpu/src/capture.rs` and `queue.rs` change, and only diagnostics builds read the switch. Release builds behave as before.
VICTORY_CAPTURE_SECONDS=<s>: the frame begun after the first present at or
after <s> seconds since the process started is captured as a frame listed in
VICTORY_CAPTURE_FRAMES is (its targets too with VICTORY_DUMP_TARGETS), under
its own number. It is picked at the present before it, before anything of it
is recorded. A test run can wait for a time in the steady world instead of a
frame number: the menus run at 30 frames a second and the world at 4-6, so a
frame number deep enough in the world is minutes after it is steady.

A listed frame's capture now ends with a log line and dumped-<n>.txt,
written after its picture and targets are saved, so a test run can stop when
the dump is complete instead of when its files stop coming (a slow frame's
dump has gaps). The target dump logs how many targets the frame wrote and how
many were saved.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:57:06 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1075/head:github-bot/gh-1075'
git switch 'github-bot/gh-1075'

Merge

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