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)
MetricStore
Increment one on counter specified
countOnce
in interface MetricStore
name
- A string specify the counterpublic void enableDataSync(boolean enabled)
public void onTimerStart(java.lang.String name)
onTimerStart
in interface MetricStore
public void onTimerStop(Timer timer)
onTimerStop
in interface MetricStore
public java.lang.Long count(java.lang.String name)
MetricStore
Returns the counts of counter specified
count
in interface MetricStore
name
- A string specifies the counternull
if the counter cannot be foundpublic java.lang.Long ns(java.lang.String name)
MetricStore
Returns the aggregated time in nanoseconds of timer specified
ns
in interface MetricStore
name
- A string specifies the timernull
if counter cannot be foundpublic java.util.List<MetricInfo> counters()
MetricStore
Returns all counter names
counters
in interface MetricStore
public java.util.List<MetricInfo> timers()
MetricStore
Returns all timer names
timers
in interface MetricStore
public void clear()
MetricStore
Clear metric data
clear
in interface MetricStore
public void takeSnapshot()
Copyright © 2014–2017 ActFramework. All rights reserved.