FpsDebugFrameCallback

Each time a frame is drawn, records whether it should have expected any more callbacks since the last time a frame was drawn (i.e. was a frame skipped?). Uses this plus total elapsed time to determine FPS. Can also record total and expected frame counts, though NB, since the expected frame rate is estimated, the expected frame count will lose accuracy over time.

Also records the JS FPS, i.e. the frames per second with which either JS updated the UI or was idle and not trying to update the UI. This is different from the FPS above since JS rendering is async.

Constructors

Link copied to clipboard
constructor(reactContext: ReactContext)

Types

Link copied to clipboard
class FpsInfo(val totalFrames: Int, val totalJsFrames: Int, val totalExpectedFrames: Int, val total4PlusFrameStutters: Int, val fps: Double, val jsFps: Double, val totalTimeMs: Int)

Properties

Link copied to clipboard
Link copied to clipboard
val fps: Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun doFrame(l: Long)
Link copied to clipboard
Link copied to clipboard

Returns the FpsInfo as if stop had been called at the given upToTimeMs. Only valid if monitoring was started with .startAndRecordFpsAtEachFrame.

Link copied to clipboard
fun reset()
Link copied to clipboard
fun start(targetFps: Double = this.targetFps)
Link copied to clipboard
fun stop()