Jump to top

perf

interface

The Firebase Performance Monitoring service interface.

This module is available for the default app only.

Example

Get the Performance Monitoring service for the default app:

const defaultAppPerf = firebase.perf();

Properties

app

</>

The current FirebaseApp instance for this Firebase service.

isPerformanceCollectionEnabled

</>

Determines whether performance monitoring is enabled or disabled.

isPerformanceCollectionEnabled: boolean;

Methods

newHttpMetric

</>

Creates a HttpMetric instance for collecting network performance data for a single request/response

newHttpMetric(url: string, httpMethod: HttpMethod): HttpMetric;

newScreenTrace

</>

Creates a ScreenTrace instance with the given identifier. Throws if hardware acceleration is diabled or if Android is 9.0 or 9.1.

newScreenTrace(identifier: string): ScreenTrace;

newTrace

</>

Creates a Trace instance with the given identifier.

newTrace(identifier: string): Trace;

setPerformanceCollectionEnabled

</>

Enables or disables performance monitoring.

setPerformanceCollectionEnabled(enabled: boolean): Promise<null>;

startScreenTrace

</>

Creates a ScreenTrace instance with the given identifier and immediately starts it. Throws if hardware acceleration is diabled or if Android is 9.0 or 9.1.

startScreenTrace(identifier: string): Promise<ScreenTrace>;

startTrace

</>

Creates a Trace instance with the given identifier and immediately starts it.

startTrace(identifier: string): Promise<Trace>;