mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1685 - Add support for MetaCounterMetrics and refactor DefaultServerCache to use them
This commit is contained in:
@@ -2,6 +2,7 @@ package io.ebeaninternal.server.profile;
|
||||
|
||||
import io.ebean.ProfileLocation;
|
||||
import io.ebean.meta.MetricType;
|
||||
import io.ebean.metric.CountMetric;
|
||||
import io.ebean.metric.MetricFactory;
|
||||
import io.ebean.metric.QueryPlanMetric;
|
||||
import io.ebean.metric.TimedMetric;
|
||||
@@ -22,6 +23,11 @@ public class DMetricFactory implements MetricFactory {
|
||||
return new DTimedMetric(metricType, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CountMetric createCountMetric(MetricType metricType, String name) {
|
||||
return new DCountMetric(metricType, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueryPlanMetric createQueryPlanMetric(MetricType metricType, Class<?> type, String label, ProfileLocation profileLocation, String sql) {
|
||||
return new DQueryPlanMetric(new DQueryPlanMeta(type, label, profileLocation, sql), new DTimedMetric(metricType, label));
|
||||
|
||||
Reference in New Issue
Block a user