The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

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