docs-devsite/performance.md
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 %}
The Firebase Performance Monitoring Web SDK. This SDK does not work in a Node.js environment.
| Function | Description |
|---|---|
| <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. |
| Interface | Description |
|---|---|
| FirebasePerformance | The Firebase Performance Monitoring service interface. |
| PerformanceSettings | Defines configuration options for the Performance Monitoring SDK. |
| PerformanceTrace | The interface representing a <code>Trace</code>. |
Returns a FirebasePerformance instance for the given app.
<b>Signature:</b>
export declare function getPerformance(app?: FirebaseApp): FirebasePerformance;
| Parameter | Type | Description |
|---|---|---|
| app | FirebaseApp | The FirebaseApp to use. |
<b>Returns:</b>
Returns a FirebasePerformance instance for the given app. Can only be called once.
<b>Signature:</b>
export declare function initializePerformance(app: FirebaseApp, settings?: PerformanceSettings): FirebasePerformance;
| Parameter | Type | Description |
|---|---|---|
| app | FirebaseApp | The FirebaseApp to use. |
| settings | PerformanceSettings | Optional settings for the FirebasePerformance instance. |
<b>Returns:</b>
Returns a new PerformanceTrace instance.
<b>Signature:</b>
export declare function trace(performance: FirebasePerformance, name: string): PerformanceTrace;
| Parameter | Type | Description |
|---|---|---|
| performance | FirebasePerformance | The FirebasePerformance instance to use. |
| name | string | The name of the trace. |
<b>Returns:</b>