GPU: VICTORY_FRAMETIME_DUMP writes the frame summary to a CSV #2314

Open
ruvenesh wants to merge 1 commit from upstream-pr/2316 into main
ruvenesh commented 2026-11-25 10:27:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ruvenesh on 2026-11-25T10:27:29Z.


In diagnostics builds, VICTORY_FRAMETIME_DUMP=<file> (1: frametime.csv in the cache folder) writes one CSV row per one-second frame summary: the figures the summary already computes (fps, ms per frame, preparing, copies, textures, GPU, copy-back, draws, dropped, pipelines being made, indirect, root-view slots) plus the worst and mean single frame, timed at each present. A one-second mean hides a single long frame; the worst frame is the column that shows it.

# lines first name the CPU, GPU and its memory, driver, RAM, OS build, display, the names of the VICTORY_* switches set and the title build, so dumps from different machines and runs can be compared. Switch values are left out (they may be paths); no user names, paths, serials or hostnames. The dump path must be outside the repository (ensure_outside_repo), like the other dumps. It adds no new counters; with the dump off, the summary pays one atomic load. Documented in the README's debugging table.

Ported from skornuta's frame time dump (skornuta/victory-fork, skornuta/victory-frametime, GPL-3.0), cut down to the figures this tree measures (the fork's extra columns time code that is not here). It overlaps a little with #130, which is a much larger profiler with a crate of its own; this one is small and self-contained.

Tested on Linux + Proton (GE-Proton11-14), RTX 3060, x86_64-pc-windows-msvc builds:

  • cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features: clean.
  • New unit tests (path parsing, frame timing, row and header format, switch names): pass. Full cargo test --workspace under Wine: the same failures as unchanged main on that machine (Wine limits), plus one timing test unrelated to this change that passed on three reruns.
  • A 150 s title run with VICTORY_FRAMETIME_DUMP=1: the log names the dump path, and the CSV has a row per second with every line well-formed. (Under Wine the driver version reads as a placeholder.)

No game data included. AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6602376571 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2316). Originally posted by [ruvenesh](https://github.com/ruvenesh) on 2026-11-25T10:27:29Z. --- In diagnostics builds, `VICTORY_FRAMETIME_DUMP=<file>` (`1`: `frametime.csv` in the cache folder) writes one CSV row per one-second frame summary: the figures the summary already computes (fps, ms per frame, preparing, copies, textures, GPU, copy-back, draws, dropped, pipelines being made, indirect, root-view slots) plus the worst and mean single frame, timed at each present. A one-second mean hides a single long frame; the worst frame is the column that shows it. `#` lines first name the CPU, GPU and its memory, driver, RAM, OS build, display, the names of the `VICTORY_*` switches set and the title build, so dumps from different machines and runs can be compared. Switch values are left out (they may be paths); no user names, paths, serials or hostnames. The dump path must be outside the repository (`ensure_outside_repo`), like the other dumps. It adds no new counters; with the dump off, the summary pays one atomic load. Documented in the README's debugging table. Ported from skornuta's frame time dump (skornuta/victory-fork, skornuta/victory-frametime, GPL-3.0), cut down to the figures this tree measures (the fork's extra columns time code that is not here). It overlaps a little with #130, which is a much larger profiler with a crate of its own; this one is small and self-contained. **Tested** on Linux + Proton (GE-Proton11-14), RTX 3060, `x86_64-pc-windows-msvc` builds: - `cargo clippy --workspace --all-targets --locked -- -D warnings`, with and without `--all-features`: clean. - New unit tests (path parsing, frame timing, row and header format, switch names): pass. Full `cargo test --workspace` under Wine: the same failures as unchanged `main` on that machine (Wine limits), plus one timing test unrelated to this change that passed on three reruns. - A 150 s title run with `VICTORY_FRAMETIME_DUMP=1`: the log names the dump path, and the CSV has a row per second with every line well-formed. (Under Wine the driver version reads as a placeholder.) No game data included. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DenRakEiw commented 2026-11-25 11:04:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T10:44:22Z.

Review: APPROVED


Verified against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP:

  • Clean feature-gated (diagnostics) CSV frame-time dumper (VICTORY_FRAMETIME_DUMP) with clear header comments and column formatting.
  • cargo test -p victory-gpu --features diagnostics frametime: 5/5 passed on RTX 5090, 5/5 passed on WARP.
  • cargo clippy -p victory-gpu -p victory --all-targets -- -D warnings (default) and cargo clippy -p victory-gpu --features diagnostics --all-targets -- -D warnings: 0 warnings.
  • cargo xtask policy: 184 files ok.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6056088695 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2316#pullrequestreview-6056088695). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-25T10:44:22Z. **Review:** APPROVED --- Verified against `origin/main` (`940d32f`) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP: - Clean feature-gated (`diagnostics`) CSV frame-time dumper (`VICTORY_FRAMETIME_DUMP`) with clear header comments and column formatting. - `cargo test -p victory-gpu --features diagnostics frametime`: 5/5 passed on RTX 5090, 5/5 passed on WARP. - `cargo clippy -p victory-gpu -p victory --all-targets -- -D warnings` (default) and `cargo clippy -p victory-gpu --features diagnostics --all-targets -- -D warnings`: 0 warnings. - `cargo xtask policy`: 184 files ok. AI-assisted (Gemini 4 Neon).
catminou4 commented 2026-11-25 11:04:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T10:54:04Z.

Review: COMMENTED


VICTORY_FRAMETIME_DUMP CSV per frame summary with CPU/GPU/driver/OS header lines (+471). Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1. Telemetry feature; useful for triaging user perf reports.

<!-- greyfinch-sync:Marvisak/VIctory:review:6056243459 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2316#pullrequestreview-6056243459). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T10:54:04Z. **Review:** COMMENTED --- VICTORY_FRAMETIME_DUMP CSV per frame summary with CPU/GPU/driver/OS header lines (+471). Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1. Telemetry feature; useful for triaging user perf reports.
Marvisak commented 2026-11-25 16:09:32 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T15:26:32Z.


Automated triage for the maintainers.

This pull request no longer merges cleanly into main (conflicts in crates/victory-gpu/src/lib.rs). It will be reviewed once it is rebased onto the current main. The earlier verdict (merge-candidate) was for an older state of main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7166848331 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2316#issuecomment-7166848331). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T15:26:32Z. --- <!-- victory-triage v1 head=0a291e7dd58b1ba171122a03c22b7b507506219e verdict=needs-rebase at=2026-11-25T16:00:00Z --> Automated triage for the maintainers. This pull request no longer merges cleanly into `main` (conflicts in `crates/victory-gpu/src/lib.rs`). It will be reviewed once it is rebased onto the current `main`. The earlier verdict (merge-candidate) was for an older state of `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
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/2316:upstream-pr/2316'
git switch 'upstream-pr/2316'

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