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.

app: FirebaseApp;

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;

newTrace

</>

Creates a Trace instance with the given identifier.

newTrace(identifier: string): Trace;

setPerformanceCollectionEnabled

</>

Enables or disables performance monitoring.

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

startTrace

</>

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

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