Home > @firebase/performance > PerformanceTrace > getMetric
PerformanceTrace.getMetric() method
Returns the value of the custom metric by that name. If a custom metric with that name does not exist will return zero.
Signature:
getMetric(metricName: string): number;
Parameters
Parameter | Type | Description |
---|---|---|
metricName | string | Name of the custom metric. |
Returns:
number