class FrameDataApi31 : FrameDataApi24


This class stores duration data for a single frame.

This subclass of FrameData adds an additional value for frameDurationCpuNanos

Summary

Public constructors

FrameDataApi31(
    frameStartNanos: Long,
    frameDurationUiNanos: Long,
    frameDurationCpuNanos: Long,
    frameDurationTotalNanos: Long,
    frameOverrunNanos: Long,
    isJank: Boolean,
    states: List<StateInfo>
)

Public functions

open FrameData

Utility method which makes a copy of the items in this object (including copying the items in states into a new List).

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Long

The total time spent rendering this frame (in nanoseconds), which includes both CPU and GPU processing.

Long

The amount of time past the frame deadline that this frame took to complete.

Inherited properties

From androidx.metrics.performance.FrameData
Long

The time spent in the UI portion of this frame (in nanoseconds).

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.

Boolean

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).

List<StateInfo>

The UI/app state during this frame.

From androidx.metrics.performance.FrameDataApi24
Long

The time spent in the non-GPU portions of this frame (in nanoseconds).

Public constructors

FrameDataApi31

Added in 1.0.0-beta01
FrameDataApi31(
    frameStartNanos: Long,
    frameDurationUiNanos: Long,
    frameDurationCpuNanos: Long,
    frameDurationTotalNanos: Long,
    frameOverrunNanos: Long,
    isJank: Boolean,
    states: List<StateInfo>
)

Public functions

copy

open fun copy(): FrameData

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.

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

frameDurationTotalNanos

Added in 1.0.0-beta01
val frameDurationTotalNanosLong

The total time spent rendering this frame (in nanoseconds), which includes both CPU and GPU processing.

frameOverrunNanos

Added in 1.0.0-beta01
val frameOverrunNanosLong

The amount of time past the frame deadline that this frame took to complete. A positive value indicates some jank, a negative value indicates that the frame was complete within the given deadline.