Repository navigation
Measure drawn frames with the platform frame metrics on API 24+ - #12
Merged
Merged
Conversation
imayankkumar
commented
Nov 16, 2026
Owner
- New: FramePulse.start(activity, config, listener) measures the frames the window draws on API 24+, using the platform frame metrics
- New: on API 31+ a frame is jank when it runs past the deadline the system gave it; idle time is never jank
- Update: the sample app and README use the new start(activity)
- New: unit and instrumentation tests for measured frames
A frame source can now deliver a frame with the duration the platform measured for it. FPS is then the frames drawn in the window over the window length, so idle time lowers the FPS and is never jank. A frame is jank when it took longer than its deadline, or the configured threshold when there is no deadline.
Backed by Window.OnFrameMetricsAvailableListener (API 24+). First draw frames and reports without a duration are dropped.
Measures the frames the activity's window draws on API 24+, and falls back to Choreographer callbacks with display refresh-rate tracking on API 21 to 23.
The window's drawn frames are measured, so the forced highest refresh-rate mode is no longer needed.
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.