fix(tools): read session-fps from the per-frame present timing lines #471

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

@⁠Duckbuster on GitHub · 2026-12-04 14:41 UTC · original
Duckbuster:fix/session-fps-frame-format → main · +286 −34 · 4 files · 2 commits · open

session-fps.sh matches stats: frame samples, which the port does not
write: every run log since present timing landed (2039e43) carries
per-frame present timing lines instead, so the tool exits with "no
samples" on every log. this rewires the awk to interval_us
(present-to-present frametime), skips sub-millisecond double presents
(counted), and drops the min-draws filter since per-frame lines carry no
draw count. README and docs/DIAGNOSTICS.md described the same phantom
format and now describe the real one. percentiles need gawk's asort.

also adds tools/fps-stats.py for the deeper look: frametime percentiles
and 1%/0.1% lows, a target-relative histogram, fps over time windows and
the frametime-derived fps convention, time below thresholds, and a
per-segment table. the target comes from VICTORY_FRAME_INTERVAL_MS in
run.conf, else 33.333.

tested on a 34k-frame log against a hand parse and a 170k-frame log
(1.8 s), including ANSI-stripping, missing-interval and double-present
edge cases.

**@⁠Duckbuster** on GitHub · 2026-12-04 14:41 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/471) `Duckbuster:fix/session-fps-frame-format` → `main` · +286 −34 · 4 files · 2 commits · open session-fps.sh matches stats: frame samples, which the port does not write: every run log since present timing landed (2039e43) carries per-frame present timing lines instead, so the tool exits with "no samples" on every log. this rewires the awk to interval_us (present-to-present frametime), skips sub-millisecond double presents (counted), and drops the min-draws filter since per-frame lines carry no draw count. README and docs/DIAGNOSTICS.md described the same phantom format and now describe the real one. percentiles need gawk's asort. also adds tools/fps-stats.py for the deeper look: frametime percentiles and 1%/0.1% lows, a target-relative histogram, fps over time windows and the frametime-derived fps convention, time below thresholds, and a per-segment table. the target comes from VICTORY_FRAME_INTERVAL_MS in run.conf, else 33.333. tested on a 34k-frame log against a hand parse and a 170k-frame log (1.8 s), including ANSI-stripping, missing-interval and double-present edge cases.
The tool matched 'stats: frame' samples, which the port does not write:
every run log since present timing landed (2039e43) carries per-frame
'present timing' lines instead, so session-fps.sh exited with 'no
samples' on every log. Match interval_us, skip sub-millisecond double
presents, and drop the min-draws filter (per-frame lines carry no draw
count). README and docs/DIAGNOSTICS.md described the same phantom
format and now describe the real one. Percentiles need gawk's asort.
Prints frametime avg/median/min/max, p90-p99.9, 1%/0.1% lows, a
target-relative histogram, frames-over-target rates, fps over time
windows (plus the frametime-derived fps convention), time below
thresholds and a per-segment table. The target comes from
VICTORY_FRAME_INTERVAL_MS in run.conf, else 33.333.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 14:42:03 +00:00
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/471/head:github-bot/gh-471'
git switch 'github-bot/gh-471'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-471'
git switch 'github-bot/gh-471'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-471'
git switch 'github-bot/gh-471'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-471'
git switch 'main'
git merge --squash 'github-bot/gh-471'
git switch 'main'
git merge --ff-only 'github-bot/gh-471'
git switch 'main'
git merge 'github-bot/gh-471'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.