Back to Firebase Js Sdk

performance package

docs-devsite/performance.md

12.12.13.8 KB
Original Source

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

performance package

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

Functions

FunctionDescription
<b>function(app, ...)</b>
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.
<b>function(performance, ...)</b>
trace(performance, name)Returns a new <code>PerformanceTrace</code> instance.

Interfaces

InterfaceDescription
FirebasePerformanceThe Firebase Performance Monitoring service interface.
PerformanceSettingsDefines configuration options for the Performance Monitoring SDK.
PerformanceTraceThe interface representing a <code>Trace</code>.

function(app, ...)

getPerformance(app) {:#getperformance_cf608e1}

Returns a FirebasePerformance instance for the given app.

<b>Signature:</b>

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

Parameters

ParameterTypeDescription
appFirebaseAppThe FirebaseApp to use.

<b>Returns:</b>

FirebasePerformance

initializePerformance(app, settings) {:#initializeperformance_980350e}

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

<b>Signature:</b>

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

Parameters

ParameterTypeDescription
appFirebaseAppThe FirebaseApp to use.
settingsPerformanceSettingsOptional settings for the FirebasePerformance instance.

<b>Returns:</b>

FirebasePerformance

function(performance, ...)

trace(performance, name) {:#trace_62e4b7e}

Returns a new PerformanceTrace instance.

<b>Signature:</b>

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

Parameters

ParameterTypeDescription
performanceFirebasePerformanceThe FirebasePerformance instance to use.
namestringThe name of the trace.

<b>Returns:</b>

PerformanceTrace