UNPKG

expo-eas-observe

Version:

Expo module that exposes various app metrics and sends them to EAS Observe

87 lines 3.13 kB
export type AppStartupTimes = { /** * Time from when the user taps the app to the moment the app starts executing the main code. * It includes loading native dynamic libraries, executing C++ static constructors * and Objective-C `+load` methods defined in classes or categories. */ loadTime: number; /** * The load time together with the code execution time until the root view of the React Native instance is created. */ launchTime: number; /** * This is how long it took to evaluate the JavaScript code by the runtime. */ bundleLoadTime: number; }; export type MemoryUsageSnapshot = { /** * Memory in bytes allocated by the app, including both the physical memory and additional memory that the app might be using, * such as memory that has been paged out (swapped) to disk or memory that is shared with other processes. * * @platform iOS */ allocated?: number; /** * Physical memory in bytes pages currently in use (resident size). */ physical: number; /** * The amount of available memory in bytes that app can still allocate. */ available: number; /** * The amount of memory in bytes currently used by the Java heap. * * @platform android */ javaHeap?: number; }; export type FrameRateMetrics = { /** * Total amount of frames rendered. */ renderedFrames: number; /** * Expected amount of frames rendered if everything renders without any delay. */ expectedFrames: number; /** * Number of frames which were skipped because the main thread was busy with some work. */ droppedFrames: number; /** * Total amount of frozen frames. Frozen frame is frame that takes at least 700ms to render. * It is a term from [Android development](https://developer.android.com/topic/performance/vitals/frozen). */ frozenFrames: number; /** * Total amount of slow frames. Slow frame is frame that takes at least 17ms to render. * It is a term from [Android development](https://developer.android.com/topic/performance/vitals/render). */ slowFrames: number; /** * Total amount of freeze durations, in seconds. Freeze is an amount of time every frame rendering was delayed by in comparison with the ideal performant frame. * For example if expected frame duration was 16ms, but in reality we've rendered this frame in 320ms, we have a freeze with 304ms duration. */ freezeTime: number; /** * Total duration of the screen session, in seconds. It is counted by summing up all rendered frames duration. */ sessionDuration: number; }; export interface Metric { timestamp: string; category: string; name: string; value: number; sessionId: string; } export interface ExpoAppMetricsModuleType { dispatchEvents(): Promise<void>; markFirstRender(): Promise<void>; markInteractive(): Promise<void>; getStoredEntries(): Promise<Metric[]>; clearStoredEntries(): Promise<void>; } //# sourceMappingURL=types.d.ts.map