Rabbit-R1/original r1/java/sources/io/sentry/metrics/CounterMetric.java

35 lines
848 B
Java
Raw Normal View History

2024-05-21 16:08:36 -05:00
package io.sentry.metrics;
import io.sentry.MeasurementUnit;
import java.util.Collections;
import java.util.Map;
/* loaded from: classes3.dex */
public final class CounterMetric extends Metric {
private double value;
@Override // io.sentry.metrics.Metric
public void add(double d) {
this.value += d;
}
public double getValue() {
return this.value;
}
@Override // io.sentry.metrics.Metric
public int getWeight() {
return 1;
}
public CounterMetric(String str, double d, MeasurementUnit measurementUnit, Map<String, String> map) {
super(MetricType.Counter, str, measurementUnit, map);
this.value = d;
}
@Override // io.sentry.metrics.Metric
public Iterable<?> serialize() {
return Collections.singletonList(Double.valueOf(this.value));
}
}