Scripts: screenshots and the game's memory paired with the log (watch-screen.ps1, shots_vs_log.py) #1339

Closed
github-bot wants to merge 1 commit from github-bot/gh-1339 into main AGit
Owner

@⁠Agam77055 on GitHub · 2026-11-28 17:40 UTC · original
Agam77055:pr/screen-log-tools → main · +271 −0 · 2 files · 1 commits · closed without merging

Two scripts for reports like #191 and #791: they line up what the screen showed and what the game's memory did with the log of the same moment, so a black picture or growing memory can be tied to the layer's numbers.

scripts/watch-screen.ps1

Run it in a second PowerShell window:

powershell -ExecutionPolicy Bypass -File scripts\watch-screen.ps1 [-Every 3] [-Scale 0.5]
  • Takes a screenshot of the game window every few seconds (3 s by default). Files are named by UTC time like the log's lines, in %LOCALAPPDATA%\victory\shots\<start time>\.

  • Waits for any victory*.exe window, so the diagnostics build works too, and stops when the game closes.

  • A background job writes memory.csv every 5 s with:

    • the game process's private bytes and working set;
    • the PC's free RAM, commit and commit limit;
    • the card's dedicated and shared memory the process holds (GPU Process Memory counters);
    • handles and threads.

    The counters take a few seconds to read, so they run in their own job and don't hold up the screenshots.

scripts/shots_vs_log.py

python scripts/shots_vs_log.py <play log> <shots folder> [--out report.md]

For each shot it gives:

  • the frame-rate line that covers it (fps, draws, dropped draws, textures waiting);
  • the texture queue's room line nearest it (card memory against its line);
  • how dark the scene band is (BLACK, DARK or ok);
  • the memory.csv row nearest it.

It ends with:

  • the log's numbers averaged over dark shots and over the others;
  • memory by minute, where a leak shows as a line that only rises.

It needs numpy and Pillow.

Tested

  • Used for every analysis on an RTX 5060 Laptop over several sessions (245 shots in one).
  • The memory job was checked against a running process on Windows 11 26300.
  • The report was checked on a 14-minute play log with a memory.csv beside it.
  • The log lines it reads are the same on main (the frame line, and "the texture queue's room … against a line of").

Tested and written with an AI assistant (Claude Code); the runs were on my machine. No game files attached.

**@⁠Agam77055** on GitHub · 2026-11-28 17:40 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1339) `Agam77055:pr/screen-log-tools` → `main` · +271 −0 · 2 files · 1 commits · closed without merging Two scripts for reports like #191 and #791: they line up what the screen showed and what the game's memory did with the log of the same moment, so a black picture or growing memory can be tied to the layer's numbers. ### `scripts/watch-screen.ps1` Run it in a second PowerShell window: ``` powershell -ExecutionPolicy Bypass -File scripts\watch-screen.ps1 [-Every 3] [-Scale 0.5] ``` - Takes a screenshot of the game window every few seconds (3 s by default). Files are named by UTC time like the log's lines, in `%LOCALAPPDATA%\victory\shots\<start time>\`. - Waits for any `victory*.exe` window, so the diagnostics build works too, and stops when the game closes. - A background job writes `memory.csv` every 5 s with: - the game process's private bytes and working set; - the PC's free RAM, commit and commit limit; - the card's dedicated and shared memory the process holds (`GPU Process Memory` counters); - handles and threads. The counters take a few seconds to read, so they run in their own job and don't hold up the screenshots. ### `scripts/shots_vs_log.py` ``` python scripts/shots_vs_log.py <play log> <shots folder> [--out report.md] ``` For each shot it gives: - the frame-rate line that covers it (fps, draws, dropped draws, textures waiting); - the texture queue's room line nearest it (card memory against its line); - how dark the scene band is (BLACK, DARK or ok); - the `memory.csv` row nearest it. It ends with: - the log's numbers averaged over dark shots and over the others; - memory by minute, where a leak shows as a line that only rises. It needs numpy and Pillow. ### Tested - Used for every analysis on an RTX 5060 Laptop over several sessions (245 shots in one). - The memory job was checked against a running process on Windows 11 26300. - The report was checked on a 14-minute play log with a `memory.csv` beside it. - The log lines it reads are the same on main (the frame line, and "the texture queue's room … against a line of"). Tested and written with an AI assistant (Claude Code); the runs were on my machine. No game files attached.
- scripts/watch-screen.ps1: the game window every few seconds (3 s by
  default), named by UTC time like the log's lines, into
  %LOCALAPPDATA%\victory\shots\<start>. It waits for any victory*.exe
  window and stops when the game closes. A background job writes
  memory.csv every 5 s: the game process's private bytes and working set,
  the PC's free RAM and commit, and the card's dedicated and shared memory
  the process holds (GPU Process Memory counters).
- scripts/shots_vs_log.py <log> <shots folder>: each shot with the frame
  line covering it and the texture queue's room line nearest it, how dark
  its scene band is (BLACK/DARK/ok), and the memory row nearest it; then
  the log's numbers averaged over dark and other shots, and memory by
  minute (a leak shows as a line that only rises).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 17:41:22 +00:00
github-bot force-pushed github-bot/gh-1339 from c926d44134 to 220a71a3af 2026-11-28 18:02:50 +00:00 Compare
github-bot closed this pull request 2026-11-29 01:02:10 +00:00

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