Remove io.ebean.meta.MetricType as it is unnecessary (#1923)

This commit is contained in:
Rob Bygrave
2020-02-22 09:17:14 +13:00
committed by GitHub
parent 444c868124
commit b24f093bbb
27 changed files with 56 additions and 170 deletions
@@ -1,6 +1,5 @@
package io.ebeaninternal.server.profile;
import io.ebean.meta.MetricType;
import io.ebean.meta.MetricVisitor;
import io.ebean.metric.TimedMetricMap;
@@ -8,14 +7,11 @@ import java.util.concurrent.ConcurrentHashMap;
class DTimedMetricMap implements TimedMetricMap {
private final MetricType metricType;
private final String name;
private final ConcurrentHashMap<String, DTimedMetric> map = new ConcurrentHashMap<>();
DTimedMetricMap(MetricType metricType, String name) {
this.metricType = metricType;
DTimedMetricMap(String name) {
this.name = name;
}
@@ -26,7 +22,7 @@ class DTimedMetricMap implements TimedMetricMap {
@Override
public void add(String key, long exeMicros) {
map.computeIfAbsent(key, (k) -> new DTimedMetric(metricType, name + key)).add(exeMicros);
map.computeIfAbsent(key, (k) -> new DTimedMetric(name + key)).add(exeMicros);
}
@Override