setMetric method

void setMetric(
  1. String name,
  2. int value
)

Sets the value of the metric with the given name.

If a metric with the given name doesn't exist, a new one will be created. If the Trace has not been started or has already been stopped, returns immediately without taking action.

Implementation

void setMetric(String name, int value) {
  return _delegate.setMetric(name, value);
}