quodolores
Version:
Monorepo for the Firebase JavaScript SDK
26 lines (15 loc) • 943 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/performance](./performance.md) > [PerformanceTrace](./performance.performancetrace.md) > [incrementMetric](./performance.performancetrace.incrementmetric.md)
## PerformanceTrace.incrementMetric() method
Adds to the value of a custom metric. If a custom metric with the provided name does not exist, it creates one with that name and the value equal to the given number. The value will be floored down to an integer.
<b>Signature:</b>
```typescript
incrementMetric(metricName: string, num?: number): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| metricName | string | The name of the custom metric. |
| num | number | The number to be added to the value of the custom metric. If not provided, it uses a default value of one. |
<b>Returns:</b>
void