[PR #1263] present: measure latency only for observed frame origins #1297

Open
opened 2026-11-26 20:20:46 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1263
Author: @Kadamitas
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: fix/frame-origin-latency


📝 Commits (1)

  • 32fd2ea present: sample latency only for observed frame origins

📊 Changes

2 files changed (+14 additions, -3 deletions)

View changed files

📝 runtime/src/frame_pacer.h (+5 -3)
📝 runtime/test/frame_pacer_test.cpp (+9 -0)

📄 Description

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1263 **Author:** [@Kadamitas](https://github.com/Kadamitas) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/frame-origin-latency` --- ### 📝 Commits (1) - [`32fd2ea`](https://github.com/ubiquitarianism/leonida/commit/32fd2ea54e09b6bc403df9899ce0adc33c3ab60b) present: sample latency only for observed frame origins ### 📊 Changes **2 files changed** (+14 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `runtime/src/frame_pacer.h` (+5 -3) 📝 `runtime/test/frame_pacer_test.cpp` (+9 -0) </details> ### 📄 Description Claimed in the coordination issue as: [frame-origin latency](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7144407859) 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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
starred/leonida#1297
No description provided.