001package io.ebean.metric; 002 003import io.ebean.ProfileLocation; 004 005/** 006 * Factory to create timed metric counters. 007 */ 008public interface MetricFactory { 009 010 /** 011 * Return the factory instance. 012 */ 013 static MetricFactory get() { 014 return MetricServiceProvider.get(); 015 } 016 017 /** 018 * Create a timed metric group. 019 */ 020 TimedMetricMap createTimedMetricMap(String name); 021 022 /** 023 * Create a Timed metric. 024 */ 025 TimedMetric createTimedMetric(String name); 026 027 /** 028 * Create a counter metric. 029 */ 030 CountMetric createCountMetric(String name); 031 032 /** 033 * Create a Timed metric. 034 */ 035 QueryPlanMetric createQueryPlanMetric(Class<?> type, String label, ProfileLocation profileLocation, String sql); 036 037}