feat(victory-gpu): emit one-second FPS line on stdout #385

Manually merged
github merged 2 commits from github-bot/gh-385 into main 2026-11-26 17:30:55 +00:00 AGit
Owner

@⁠Lewandox on GitHub · 2026-11-26 14:45 UTC · original
Lewandox:feat/victory-stdout-fps → main · +97 −6 · 1 files · 2 commits · merged 2026-11-26 17:29 UTC

Summary

Addresses the finding noted in docs/rust-full-status.md ("VIctory writes fps only to its window title. A stdout fps line in VIctory would let both launchers show it"):

  • Emit a compact, flushed, one-second FPS line on stdout (victory fps: {fps:.1} fps, {ms:.1} ms/frame, {draws:.0} draws/frame) from the existing victory-caption background thread in third_party/victory/crates/victory-gpu/src/host.rs, so Presenter::frame never blocks on a full stdout pipe and broken-pipe errors are safely ignored (unlike println!).
  • Enabled by default and opt-out via VICTORY_FPS_STDOUT=0 (matching VICTORY_OVERLAY=0).
  • Guard against non-finite or negative metrics via format_stdout_fps.
  • Add unit tests in host::stdout_fps_tests covering env parsing, formatting, non-finite/negative rejection, and newline-terminated flushing output.

Verification

  • cargo test -p victory-gpu --lib stdout_fps_tests (default features): 4 passed, 0 failed
  • cargo test -p victory-gpu --features diagnostics --lib stdout_fps_tests: 4 passed, 0 failed
  • cargo xtask policy (in third_party/victory): asset policy: 213 files ok
**@⁠Lewandox** on GitHub · 2026-11-26 14:45 UTC · [original](https://github.com/LooperSalty/AnyXboxX/pull/385) `Lewandox:feat/victory-stdout-fps` → `main` · +97 −6 · 1 files · 2 commits · merged 2026-11-26 17:29 UTC ## Summary Addresses the finding noted in `docs/rust-full-status.md` ("VIctory writes fps only to its window title. A stdout fps line in VIctory would let both launchers show it"): - Emit a compact, flushed, one-second FPS line on `stdout` (`victory fps: {fps:.1} fps, {ms:.1} ms/frame, {draws:.0} draws/frame`) from the existing `victory-caption` background thread in `third_party/victory/crates/victory-gpu/src/host.rs`, so `Presenter::frame` never blocks on a full stdout pipe and broken-pipe errors are safely ignored (unlike `println!`). - Enabled by default and opt-out via `VICTORY_FPS_STDOUT=0` (matching `VICTORY_OVERLAY=0`). - Guard against non-finite or negative metrics via `format_stdout_fps`. - Add unit tests in `host::stdout_fps_tests` covering env parsing, formatting, non-finite/negative rejection, and newline-terminated flushing output. ## Verification - `cargo test -p victory-gpu --lib stdout_fps_tests` (default features): 4 passed, 0 failed - `cargo test -p victory-gpu --features diagnostics --lib stdout_fps_tests`: 4 passed, 0 failed - `cargo xtask policy` (in `third_party/victory`): `asset policy: 213 files ok`
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 14:52:47 +00:00
github manually merged commit f088a432a8 into main 2026-11-26 17:30:55 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.