quodolores
Version:
Monorepo for the Firebase JavaScript SDK
26 lines (15 loc) • 828 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) > [putMetric](./performance.performancetrace.putmetric.md)
## PerformanceTrace.putMetric() method
Sets the value of the specified custom metric to the given number regardless of whether a metric with that name already exists on the trace instance or not. The value will be floored down to an integer.
<b>Signature:</b>
```typescript
putMetric(metricName: string, num: number): void;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| metricName | string | Name of the custom metric. |
| num | number | Value to of the custom metric. |
<b>Returns:</b>
void