Keep FPS reports usable for short or idle runs #8
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/paveledits--ScarlettMac!8
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-8"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@civilwarinfrance on GitHub · 2026-11-27 01:46 UTC · original
civilwarinfrance:fix/fps-report-short-logs→main· +86 −14 · 2 files · 1 commits · merged 2026-11-27 12:32 UTCChanges
Short or idle VIctory logs can make
tools/fps-report.pyexit with a division-by-zero error, leaving only part of the report. Keep the report available when the frame counter stays flat, the wait samples cover no elapsed time, or there are zero memory refreshes. Omit the corresponding derived rates when they cannot be calculated.The aggregate wait rate now counts only waits from the intervals covered by the reported duration. For example, a log with 99, 10 and 20 waits at 0, 1 and 3 seconds now reports 30 waits over 3 seconds. VIctory resets the counters after each sample.
Verification
python3 -m unittest discover -s tests -vpassed all five tests using synthetic logs. The original script crashed on the four edge-case inputs and overstated the wait rate in the timed example.git diff --checkpassed. This changes the report script only. No game or runtime testing was needed.AI assistance: OpenAI Codex wrote the patch and ran the tests.