public class SimpleMetricStore extends java.lang.Object implements MetricStore, java.io.Serializable
A simple implementation of MetricStore
| Constructor and Description |
|---|
SimpleMetricStore(SimpleMetricPlugin plugin) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear metric data
|
java.lang.Long |
count(java.lang.String name)
Returns the counts of counter specified
|
java.util.List<MetricInfo> |
counters()
Returns all counter names
|
void |
countOnce(java.lang.String name)
Increment one on counter specified
|
void |
enableDataSync(boolean enabled) |
java.lang.Long |
ns(java.lang.String name)
Returns the aggregated time in nanoseconds of timer specified
|
void |
onTimerStart(java.lang.String name) |
void |
onTimerStop(Timer timer) |
void |
takeSnapshot() |
java.util.List<MetricInfo> |
timers()
Returns all timer names
|
public SimpleMetricStore(SimpleMetricPlugin plugin)
public void countOnce(java.lang.String name)
MetricStoreIncrement one on counter specified
countOnce in interface MetricStorename - A string specify the counterpublic void enableDataSync(boolean enabled)
public void onTimerStart(java.lang.String name)
onTimerStart in interface MetricStorepublic void onTimerStop(Timer timer)
onTimerStop in interface MetricStorepublic java.lang.Long count(java.lang.String name)
MetricStoreReturns the counts of counter specified
count in interface MetricStorename - A string specifies the counternull if the counter cannot be foundpublic java.lang.Long ns(java.lang.String name)
MetricStoreReturns the aggregated time in nanoseconds of timer specified
ns in interface MetricStorename - A string specifies the timernull if counter cannot be foundpublic java.util.List<MetricInfo> counters()
MetricStoreReturns all counter names
counters in interface MetricStorepublic java.util.List<MetricInfo> timers()
MetricStoreReturns all timer names
timers in interface MetricStorepublic void clear()
MetricStoreClear metric data
clear in interface MetricStorepublic void takeSnapshot()
Copyright © 2014–2017 ActFramework. All rights reserved.