mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1875 - Refactor simplify MetaTimedMetric removing unrequired getStartTime() and getBeanCount()
This commit is contained in:
@@ -24,21 +24,11 @@ class DTimedMetricMap implements TimedMetricMap {
|
||||
add(key, (System.nanoTime() - startNanos)/1000L);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSinceNanos(String key, long startNanos, int beans) {
|
||||
add(key, (System.nanoTime() - startNanos)/1000L, beans);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(String key, long exeMicros) {
|
||||
map.computeIfAbsent(key, (k) -> new DTimedMetric(metricType, name + key)).add(exeMicros);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(String key, long exeMicros, int rows) {
|
||||
map.computeIfAbsent(key, (k) -> new DTimedMetric(metricType, name + key)).add(exeMicros, rows);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(MetricVisitor visitor) {
|
||||
for (DTimedMetric value : map.values()) {
|
||||
|
||||
Reference in New Issue
Block a user