UNPKG

voluptasmollitia

Version:
34 lines (23 loc) 1.25 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@firebase/performance](./performance.md) &gt; [PerformanceTrace](./performance.performancetrace.md) &gt; [record](./performance.performancetrace.record.md) ## PerformanceTrace.record() method Records a trace from given parameters. This provides a direct way to use trace without a need to start/stop. This is useful for use cases in which the trace cannot directly be used (e.g. if the duration was captured before the Performance SDK was loaded). <b>Signature:</b> ```typescript record(startTime: number, duration: number, options?: { metrics?: { [key: string]: number; }; attributes?: { [key: string]: string; }; }): void; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | startTime | number | trace start time since epoch in millisec. | | duration | number | The duraction of the trace in millisec. | | options | { metrics?: { \[key: string\]: number; }; attributes?: { \[key: string\]: string; }; } | An object which can optionally hold maps of custom metrics and custom attributes. | <b>Returns:</b> void