public class FpsDebugFrameCallback extends ChoreographerCompat.FrameCallback
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.
Modifier and Type | Class and Description |
---|---|
static class |
FpsDebugFrameCallback.FpsInfo |
Constructor and Description |
---|
FpsDebugFrameCallback(ReactContext reactContext) |
Modifier and Type | Method and Description |
---|---|
void |
doFrame(long l)
Just a wrapper for frame callback, see
Choreographer.FrameCallback.doFrame(long) . |
int |
get4PlusFrameStutters() |
int |
getExpectedNumFrames() |
double |
getFPS() |
FpsDebugFrameCallback.FpsInfo |
getFpsInfo(long upToTimeMs)
Returns the FpsInfo as if stop had been called at the given upToTimeMs.
|
double |
getJSFPS() |
int |
getNumFrames() |
int |
getNumJSFrames() |
int |
getTotalTimeMS() |
void |
reset() |
void |
start() |
void |
startAndRecordFpsAtEachFrame() |
void |
stop() |
public FpsDebugFrameCallback(ReactContext reactContext)
public void doFrame(long l)
ChoreographerCompat.FrameCallback
Choreographer.FrameCallback.doFrame(long)
.doFrame
in class ChoreographerCompat.FrameCallback
public void start()
public void startAndRecordFpsAtEachFrame()
public void stop()
public double getFPS()
public double getJSFPS()
public int getNumFrames()
public int getNumJSFrames()
public int getExpectedNumFrames()
public int get4PlusFrameStutters()
public int getTotalTimeMS()
public FpsDebugFrameCallback.FpsInfo getFpsInfo(long upToTimeMs)
startAndRecordFpsAtEachFrame()
.public void reset()