FrameData
public class FrameData
FrameDataApi24 |
This class stores duration data for a single frame. |
FrameDataApi31 |
This class stores duration data for a single frame. |
This class stores duration data for a single frame.
| See also | |
|---|---|
jankHeuristicMultiplier |
|
putState |
Summary
Public constructors |
|---|
Public methods |
|
|---|---|
@NonNull FrameData |
copy()Utility method which makes a copy of the items in this object (including copying the items in |
boolean |
|
final long |
The time spent in the UI portion of this frame (in nanoseconds). |
final long |
These backing fields are used to enable mutation of an existing FrameData object, to avoid allocating a new object on every frame for sending out to listeners. |
final @NonNull List<@NonNull StateInfo> |
The UI/app state during this frame. |
int |
hashCode() |
final boolean |
isJank()Whether this frame was determined to be janky, meaning that its duration exceeds the duration determined by the system to indicate jank (@see |
@NonNull String |
toString() |
Public constructors
Public methods
copy
public @NonNull FrameData copy()
Utility method which makes a copy of the items in this object (including copying the items in states into a new List). This is used internally to create a copy to pass along to listeners to avoid having a reference to the internally-mutable FrameData object.
getFrameDurationUiNanos
public final long getFrameDurationUiNanos()
The time spent in the UI portion of this frame (in nanoseconds). This is essentially the time spent on the UI thread to draw this frame, but does not include any time spent on the RenderThread.
getFrameStartNanos
public final long getFrameStartNanos()
These backing fields are used to enable mutation of an existing FrameData object, to avoid allocating a new object on every frame for sending out to listeners.
getStates
public final @NonNull List<@NonNull StateInfo> getStates()
The UI/app state during this frame. This is the information set by the app, or by other library code, that can be analyzed later to determine the UI state that was current when jank occurred.
isJank
public final boolean isJank()
Whether this frame was determined to be janky, meaning that its duration exceeds the duration determined by the system to indicate jank (@see JankStats.jankHeuristicMultiplier).