createTimer
public MetricsTimer createTimer(Class<?> origin,
String name,
TimeUnit duration,
TimeUnit rate)
Create a MetricsTimer instance.
If the same arguments are given twice, the same instance must be returned.
- Specified by:
createTimer
in interface MetricsTimerFactory
- Parameters:
origin
- The class that instantiate the metricname
- A human readable, short name of the metric.duration
- the scale unit for this timer's duration metricsrate
- the scale unit for this timer's rate metrics
- Returns:
- A Metric instance to be used, OR org.qi4j.spi.metrics.DefaultMetric.NULL if not supported.