Skip to content

GPU: VICTORY_FRAMETIME_DUMP writes the frame summary to a CSV - #2316

Open
ruvenesh wants to merge 1 commit into
Marvisak:mainfrom
ruvenesh:gpu/frametime-dump-pr
Open

ruvenesh wants to merge 1 commit into
Marvisak:mainfrom
ruvenesh:gpu/frametime-dump-pr

Conversation

@ruvenesh

Copy link
Copy Markdown

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

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 (frame rate, 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. `#` lines first name the CPU, GPU and
its memory, driver, RAM, OS build, display, the names of the VICTORY_*
switches set (not their values, which may be paths) and the title build,
so dumps from different machines can be compared. The path must be outside
the repository. No new counters; with the dump off, the summary pays one
atomic load.

Ported from skornuta's frame time dump (skornuta/victory-fork,
skornuta/victory-frametime, GPL-3.0), cut down to the figures this tree
measures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@DenRakEiw DenRakEiw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 catminou4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Nov 25, 2026 •

Copy link
Copy Markdown
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants