present: measure latency only for observed frame origins #1263

Open
github-bot wants to merge 1 commit from github-bot/gh-1263 into main AGit
Owner

@⁠Kadamitas on GitHub · 2026-11-24 21:03 UTC · original
Kadamitas:fix/frame-origin-latency → main · +14 −3 · 2 files · 1 commits · open

Claimed in the coordination issue as: frame-origin latency

Depends on: #1198 touches the same frame timing function. Either change can land first.

What and why

A timeout can return a frame token with no observed origin event. Carry that distinction into presentation statistics so the frame still contributes to the interval and frame counts while origin latency includes only observed origins.

Tested

  • Built and ran the native frame pacer suite on Windows 11 x64 with GCC.
  • The synthetic regression checks a measured origin and a timeout token in the same schedule. Both presentations count, and the one observed origin contributes exactly 2,000 microseconds of latency.

GPUs tested: n/a (CPU-only tests)

AI-assisted: yes

  • One topic with synthetic inputs and no game data.
**@⁠Kadamitas** on GitHub · 2026-11-24 21:03 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1263) `Kadamitas:fix/frame-origin-latency` → `main` · +14 −3 · 2 files · 1 commits · open Claimed in the coordination issue as: [frame-origin latency](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) Depends on: #1198 touches the same frame timing function. Either change can land first. ### What and why A timeout can return a frame token with no observed origin event. Carry that distinction into presentation statistics so the frame still contributes to the interval and frame counts while origin latency includes only observed origins. ### Tested - Built and ran the native frame pacer suite on Windows 11 x64 with GCC. - The synthetic regression checks a measured origin and a timeout token in the same schedule. Both presentations count, and the one observed origin contributes exactly 2,000 microseconds of latency. GPUs tested: n/a (CPU-only tests) AI-assisted: yes - [x] One topic with synthetic inputs and no game data.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:44:57 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 14:40 UTC · original

Reviewed 32fd2ea54: built and ran frame_pacer_test on the branch and on main (Linux, g++); the extended scenario fails on main without the fix — it tests the right thing. Probed timeout-issued consecutive tokens (mixed, repeated, uncapped, stale out-of-order) on both trees: only the latency ring changes; token numbering, tick grid, interval stats and uncapped mode are unchanged. The branch conflicts with current main (merge-tree: issue_token_locked, one region) — main moved issuance to the shared FrameTokenSource and added the current_token_locked poll path, whose origin also needs an observed/unobserved decision when this is rebased. AI-assisted review.

Recommendation: Fix first

**@⁠PierreEbele** on GitHub · 2026-11-25 14:40 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1263#issuecomment-7165647239) Reviewed 32fd2ea54: built and ran `frame_pacer_test` on the branch and on main (Linux, g++); the extended scenario fails on main without the fix — it tests the right thing. Probed timeout-issued consecutive tokens (mixed, repeated, uncapped, stale out-of-order) on both trees: only the latency ring changes; token numbering, tick grid, interval stats and uncapped mode are unchanged. The branch conflicts with current main (merge-tree: `issue_token_locked`, one region) — main moved issuance to the shared `FrameTokenSource` and added the `current_token_locked` poll path, whose origin also needs an observed/unobserved decision when this is rebased. AI-assisted review. **Recommendation:** Fix first
This pull request has changes conflicting with the target branch.
  • runtime/src/frame_pacer.h
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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