public interface KeepStatistics
This holds statistics about the current Keep session
Modifier and Type | Interface and Description |
---|---|
static class |
KeepStatistics.StatisticAction
For statistic actions: add or remove to make it less confusing than a boolean
|
static class |
KeepStatistics.TagKey |
Modifier and Type | Method and Description |
---|---|
KeepStatistics |
adjustConfiguredForms(KeepDbInfo dbInfo,
KeepStatistics.StatisticAction action)
Adjusts number of configured forms
|
KeepStatistics |
adjustConfiguredForms(KeepStatistics.StatisticAction action)
Adjusts number of configured forms by 1, up or down
|
io.micrometer.core.instrument.Meter |
createMetricForRegistry(java.lang.String key,
java.util.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.
|
java.util.Map<java.lang.String,io.micrometer.core.instrument.Meter> |
getMetricsMap() |
io.micrometer.core.instrument.Counter |
getOrCreateCounter(java.lang.String key,
java.util.List<io.micrometer.core.instrument.Tag> metricsTags)
Gets or creates a counter.
|
io.micrometer.core.instrument.Timer |
getOrCreateTimer(java.lang.String key,
java.util.List<io.micrometer.core.instrument.Tag> metricsTags)
Gets or creates a counter.
|
KeepStatistics |
reset()
Resets the statistics to start over.
|
KeepStatistics adjustConfiguredForms(KeepDbInfo dbInfo, KeepStatistics.StatisticAction action)
Adjusts number of configured forms
dbInfo
- KeepDbInfo to processaction
- increment or decrementKeepStatistics adjustConfiguredForms(KeepStatistics.StatisticAction action)
Adjusts number of configured forms by 1, up or down
action
- increment or decrementio.micrometer.core.instrument.Meter createMetricForRegistry(java.lang.String key, java.util.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 the only registry in use is Prometheus. The future approach will call this recursively for all registries enabled
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 metricjava.util.Map<java.lang.String,io.micrometer.core.instrument.Meter> getMetricsMap()
io.micrometer.core.instrument.Counter getOrCreateCounter(java.lang.String key, java.util.List<io.micrometer.core.instrument.Tag> metricsTags)
Gets or creates a counter. Use this if tags require minimal computation to pass
key
- to create metric withmetricsTags
- to create metric withio.micrometer.core.instrument.Timer getOrCreateTimer(java.lang.String key, java.util.List<io.micrometer.core.instrument.Tag> metricsTags)
Gets or creates a counter. Use this if tags require minimal computation to pass
key
- to create metric withmetricsTags
- to create metric withKeepStatistics reset()
Resets the statistics to start over. Mainly used when restarting keep