Steady the health pill's fps readout#83
Merged
Merged
Conversation
The overlay counted frames between two Task.sleep(1s) wakeups, and those wakeups drift tens of milliseconds under load — a capture locked at exactly 60 fps (min = max frame duration, see PERFORMANCE.md) read as 57-63 depending on how long each window really was. The sample now timestamps each snapshot and reports rates normalized by the actual elapsed time, which also steadies the Mb/s figure. Capture itself was never fluctuating; no pipeline change. Release-Bump: minor Release-Beta: true Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dWUcqAkNNuNELnMPS4RdT
MyNamesEMurray
enabled auto-merge
July 25, 2026 23:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The in-app health pill showed 60 fps capture fluctuating between ~57 and ~63. The camera was never drifting — capture pins min and max frame duration to exactly 1/fps (the cadence lock in docs/PERFORMANCE.md). The meter was the problem: it counted frames between two
Task.sleep(1s)wakeups, and those wakeups land tens of milliseconds late under load, so the window length varied while the count was taken at face value.The sampler now timestamps each stats snapshot and reports rates normalized by the actual elapsed time between them, which reads a locked 60 fps stream as a steady 60 and also stabilizes the Mb/s figure. Display-only; no capture or pipeline change.
How it was tested
Swift sources parse clean via
syntax-check.sh(full type check in CI's macOS job). Visual confirmation is on-device: the pill should now sit at the set frame rate instead of wandering ±3.🤖 Generated with Claude Code
https://claude.ai/code/session_015dWUcqAkNNuNELnMPS4RdT
Generated by Claude Code