diagnostics: add performance log analyzer #2599

Open
github-bot wants to merge 2 commits from github-bot/gh-2599 into main AGit
Owner

@⁠Kennychu1119 on GitHub · 2026-11-29 14:50 UTC · original
Kennychu1119:diagnostics/perf-analyzer → main · +415 −0 · 3 files · 2 commits · open

What it changes

Adds a standalone offline performance log analyzer using the Python standard library.

  • Parses presented FPS, frame timing windows, CPU preparation time, CPU wait for the GPU, and available GPU timestamp measurements.
  • Compares two runs and generates a Markdown report.
  • Preserves the distinction between periodic aggregates and individual frame measurements.
  • Flags potential performance regressions when captures are explicitly marked as comparable.
  • Handles malformed, truncated, and incomplete log records.
  • Prevents generated reports from being written inside the repository.
  • Includes automated tests and usage documentation.

No runtime, rendering, or shader code is modified.

How it was tested

  • GPU and profile: N/A — offline synthetic-data testing.
  • Python 3.14.2: all 5 automated tests passed in 1.558 seconds.
  • Synthetic two-run CLI demonstration: passed.
  • Git diff check: passed.
  • Staged asset-policy check: passed (3 files).
  • Full repository asset-policy check: reports an existing file-size violation in crates/victory-shader/src/emit/lower.rs, which is unchanged by this PR.
  • Cargo workspace tests: not run locally; no Rust crates were modified.
  • Shader wave sizes: N/A.

Test command:

python -I -B -m unittest discover -s scripts -p test_perf_analyzer.py -v

Checked for overlap

  • Searched open pull requests for related diagnostics and performance analysis work.

Related: #1960, #1846, #1331.

This contribution analyzes existing logs offline rather than introducing additional runtime instrumentation.

Disclosure

Developed with AI assistance using OpenAI Codex. All reported validation results are based on synthetic tests, not gameplay benchmarks.

Feedback is welcome.

**@⁠Kennychu1119** on GitHub · 2026-11-29 14:50 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2599) `Kennychu1119:diagnostics/perf-analyzer` → `main` · +415 −0 · 3 files · 2 commits · open ## What it changes Adds a standalone offline performance log analyzer using the Python standard library. - Parses presented FPS, frame timing windows, CPU preparation time, CPU wait for the GPU, and available GPU timestamp measurements. - Compares two runs and generates a Markdown report. - Preserves the distinction between periodic aggregates and individual frame measurements. - Flags potential performance regressions when captures are explicitly marked as comparable. - Handles malformed, truncated, and incomplete log records. - Prevents generated reports from being written inside the repository. - Includes automated tests and usage documentation. No runtime, rendering, or shader code is modified. ## How it was tested - GPU and profile: N/A — offline synthetic-data testing. - Python 3.14.2: all 5 automated tests passed in 1.558 seconds. - Synthetic two-run CLI demonstration: passed. - Git diff check: passed. - Staged asset-policy check: passed (3 files). - Full repository asset-policy check: reports an existing file-size violation in `crates/victory-shader/src/emit/lower.rs`, which is unchanged by this PR. - Cargo workspace tests: not run locally; no Rust crates were modified. - Shader wave sizes: N/A. Test command: `python -I -B -m unittest discover -s scripts -p test_perf_analyzer.py -v` ## Checked for overlap - [x] Searched open pull requests for related diagnostics and performance analysis work. Related: #1960, #1846, #1331. This contribution analyzes existing logs offline rather than introducing additional runtime instrumentation. ## Disclosure Developed with AI assistance using OpenAI Codex. All reported validation results are based on synthetic tests, not gameplay benchmarks. Feedback is welcome.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 14:56:12 +00:00
Author
Owner

@⁠ANDREANIADS on GitHub · 2026-11-29 14:54 UTC · original

At 41cda14, a truncated submitting-thread row can produce a regression flag on otherwise identical captures. Synthetic CLI repro with --comparable: both inputs contain four 30 fps, 33.3 ms/frame rows and submitting-thread times [1, 9, 9, 9] ms. In the candidate only, truncate the first timing row immediately after preparing per frame, the submitting thread:. The report correctly says Skipped 1: malformed submitting thread timing, then reports 7.00 to 9.00 (+28.6%) (potential regression). All three surviving values match their counterparts.

Could compare() suppress the submitting-thread flag when either input contains a known malformed submitting-thread record, while keeping the observed means and counts in the summaries? This avoids assuming that this separate counter always has the frame meter’s cadence. A useful control is the same pair with the missing 1 ms restored: both means should be 7.00. Offline analyzer only, synthetic text.

**@⁠ANDREANIADS** on GitHub · 2026-11-29 14:54 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2599#issuecomment-7257667179) At `41cda14`, a truncated submitting-thread row can produce a regression flag on otherwise identical captures. Synthetic CLI repro with `--comparable`: both inputs contain four `30 fps, 33.3 ms/frame` rows and submitting-thread times `[1, 9, 9, 9]` ms. In the candidate only, truncate the first timing row immediately after `preparing per frame, the submitting thread:`. The report correctly says `Skipped 1: malformed submitting thread timing`, then reports `7.00 to 9.00 (+28.6%) (potential regression)`. All three surviving values match their counterparts. Could `compare()` suppress the submitting-thread flag when either input contains a known malformed submitting-thread record, while keeping the observed means and counts in the summaries? This avoids assuming that this separate counter always has the frame meter’s cadence. A useful control is the same pair with the missing `1 ms` restored: both means should be `7.00`. Offline analyzer only, synthetic text.
Author
Owner

@⁠Kennychu1119 on GitHub · 2026-11-29 16:28 UTC · original

Thanksfor the detailed repro!

I've reproduced and fixed the false +28.6% regression flag. The analyzer now skips the submitting-thread regression assessment when either capture contains a malformed submitting-thread timing record, while preserving the observed means, sample counts, and parse warnings.

Added regression tests covering truncation on either side, restored 7.00 ms means, and genuine regressions with valid records. Unaffected metrics continue to be compared normally.

All 6 tests passed, and the staged asset-policy check passed.

Thanks again for catching this!

**@⁠Kennychu1119** on GitHub · 2026-11-29 16:28 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2599#issuecomment-7258934131) Thanksfor the detailed repro! I've reproduced and fixed the false +28.6% regression flag. The analyzer now skips the submitting-thread regression assessment when either capture contains a malformed submitting-thread timing record, while preserving the observed means, sample counts, and parse warnings. Added regression tests covering truncation on either side, restored 7.00 ms means, and genuine regressions with valid records. Unaffected metrics continue to be compared normally. All 6 tests passed, and the staged asset-policy check passed. Thanks again for catching this!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2599/head:github-bot/gh-2599'
git switch 'github-bot/gh-2599'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2599'
git switch 'github-bot/gh-2599'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2599'
git switch 'github-bot/gh-2599'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2599'
git switch 'main'
git merge --squash 'github-bot/gh-2599'
git switch 'main'
git merge --ff-only 'github-bot/gh-2599'
git switch 'main'
git merge 'github-bot/gh-2599'
git push origin 'main'
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!2599
No description provided.