performance package

The Firebase Performance Monitoring Web SDK. This SDK does not work in a Node.js environment.

Functions

Function Description
function(app, ...)
getPerformance(app) Returns a FirebasePerformance instance for the given app.
initializePerformance(app, settings) Returns a FirebasePerformance instance for the given app. Can only be called once.
function(performance, ...)
trace(performance, name) Returns a new PerformanceTrace instance.

Interfaces

Interface Description
FirebasePerformance The Firebase Performance Monitoring service interface.
PerformanceSettings Defines configuration options for the Performance Monitoring SDK.
PerformanceTrace The interface representing a Trace.

function(app, ...)

getPerformance(app)

Returns a FirebasePerformance instance for the given app.

Signature:

export declare function getPerformance(app?: FirebaseApp): FirebasePerformance;

Parameters

Parameter Type Description
app FirebaseApp The FirebaseApp to use.

Returns:

FirebasePerformance

initializePerformance(app, settings)

Returns a FirebasePerformance instance for the given app. Can only be called once.

Signature:

export declare function initializePerformance(app: FirebaseApp, settings?: PerformanceSettings): FirebasePerformance;

Parameters

Parameter Type Description
app FirebaseApp The FirebaseApp to use.
settings PerformanceSettings Optional settings for the FirebasePerformance instance.

Returns:

FirebasePerformance

function(performance, ...)

trace(performance, name)

Returns a new PerformanceTrace instance.

Signature:

export declare function trace(performance: FirebasePerformance, name: string): PerformanceTrace;

Parameters

Parameter Type Description
performance FirebasePerformance The FirebasePerformance instance to use.
name string The name of the trace.

Returns:

PerformanceTrace