Package com.hcl.labs.domi.metrics
Interface DOMIStatistics
-
- All Known Implementing Classes:
DOMIStatisticsHolder
public interface DOMIStatistics
This holds statistics about the current Keep session- Author:
- Paul Stephen Withers
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
DOMIStatistics.StatisticAction
For statistic actions: add or remove to make it less confusing than a boolean
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.micrometer.core.instrument.Meter
createMetricForRegistry(String key, List<io.micrometer.core.instrument.Tag> metricsTags, io.micrometer.core.instrument.Meter.Type type, io.micrometer.core.instrument.MeterRegistry registry)
Creates a counter or timer for a specific registry, currently only Prometheus.Map<String,io.micrometer.core.instrument.Meter>
getMetricsMap()
io.micrometer.core.instrument.Counter
getOrCreateCounter(String key, List<io.micrometer.core.instrument.Tag> metricsTags)
Gets or creates a counter.io.micrometer.core.instrument.Timer
getOrCreateTimer(String key, List<io.micrometer.core.instrument.Tag> metricsTags)
Gets or creates a counter.DOMIStatistics
reset()
Resets the statistics to start over.
-
-
-
Method Detail
-
createMetricForRegistry
io.micrometer.core.instrument.Meter createMetricForRegistry(String key, List<io.micrometer.core.instrument.Tag> metricsTags, io.micrometer.core.instrument.Meter.Type type, io.micrometer.core.instrument.MeterRegistry registry)
Creates a counter or timer for a specific registry, currently only Prometheus.- Parameters:
key
- to create metric withmetricsTags
- to create metric withtype
- of Meter to create. Only Timer and Counter are currently supportedregistry
- registry into which to create the metric- Returns:
- Meter created
-
getMetricsMap
Map<String,io.micrometer.core.instrument.Meter> getMetricsMap()
- Returns:
- Map of metrics
-
getOrCreateCounter
io.micrometer.core.instrument.Counter getOrCreateCounter(String key, List<io.micrometer.core.instrument.Tag> metricsTags)
Gets or creates a counter. Use this if tags require minimal computation to pass- Parameters:
key
- to create metric withmetricsTags
- to create metric with- Returns:
- Meter(Counter) created
-
getOrCreateTimer
io.micrometer.core.instrument.Timer getOrCreateTimer(String key, List<io.micrometer.core.instrument.Tag> metricsTags)
Gets or creates a counter. Use this if tags require minimal computation to pass- Parameters:
key
- to create metric withmetricsTags
- to create metric with- Returns:
- Meter(Timer) created
-
reset
DOMIStatistics reset()
Resets the statistics to start over. Mainly used when restarting keep- Returns:
- fluent
-
-