Repository navigation
gate: summary.json gets the run's memory peaks (D3D12-GATE-MEMORY-PEAKS) - #2810
Conversation
Testers could not use the gate daily without memory figures, and a memory pile-up took a 3090's Windows down twice. The parser now reads the runtime's memory line and video memory line (every 5 s in builds with diagnostics) and writes a memory block: the private bytes at their most and when, the most of them in physical memory, the least the PC had left to commit and when, the card's video memory in use at its most and when with the budget then, the seconds over that budget, and the most shared memory in use. The video memory is what the system counts for the process, so it works on any card. The five runtime strings it reads join the contract test.
|
Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12, head MEASURED
READ IN CODE
ASSUMED
AI-assisted: Claude Code |
|
Verified on Windows, with the control that matters: the tests fail when the change is reverted. Cherry-picked onto
So the new tests are tied to the change and not to each other's fixtures. No part of this needed a GPU, a display or game data, which is what the gate tests are built for. What I could not test: the script against a real run folder - AI-assisted: yes - DeepSeek v4.1 (flash), applied and ran both arms on the machine above. Written with an AI assistant. |
|
Merging. Head AI-assisted (Claude Code). |
Claimed in the coordination issue as: D3D12-GATE-MEMORY-PEAKS (#2570 (comment))
What and why
Testers asked for memory figures in the gate's
summary.json(#2782): without them they cannot use the gate daily. A memory pile-up has also taken a 3090's Windows down twice. This is the first of three PRs: the peaks here, then a safety stop, then a time series.tools/game_gate.pynow reads two lines the runtime already writes every 5 s in builds with diagnostics (the gate's builds):memory: N MB private (...; the PC has ... MB free and ... MB left to commit));video memory as the system counts it, ...: the card's own: budget ... MB, in use ... MB, ...). This is DXGI's count for the process, so it works on any card.From them it writes a
memoryblock:A build without diagnostics gives
source: nulland no peaks. The five runtime strings it reads join the contract test, so a reworded line fails the test.docs/game_gate.mddescribes the block.Tested
On Windows 11 Pro 10.0:
tests/test_game_gate.py: 23 tests OK. The two new ones (peaks and times from synthetic lines, including time over budget; no lines gives nulls) fail withmain'sgame_gate.py.The contract test finds the new strings in
copystat.rsandhost.rs.The docs tests and
scripts/check_no_game_data.pyon the changed files are clean.On a real run: I re-summarized a copy of a 124 s gate run from this week's ABBA validation (RTX 3080 10 GB, driver 32.0.16.2140, Series S profile). The block read 37 memory lines:
A separate sampler on that run saw private bytes of 23 to 24 GB.
nvidia-smishowed 7.4 to 7.8 GB, because it counts the whole card.GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.2140
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)