|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.servo.monitor.AbstractMonitor<java.lang.Long>
com.netflix.servo.monitor.StatsMonitor
public class StatsMonitor
A Timer that provides statistics.
The statistics are collected periodically and are published according to the configuration
specified by the user using a StatsConfig object.
| Field Summary | |
|---|---|
protected Counter |
count
|
protected static java.util.concurrent.ScheduledExecutorService |
defaultExecutor
|
protected Counter |
totalMeasurement
|
| Fields inherited from class com.netflix.servo.monitor.AbstractMonitor |
|---|
config |
| Constructor Summary | |
|---|---|
StatsMonitor(MonitorConfig config,
StatsConfig statsConfig,
java.util.concurrent.ScheduledExecutorService executor,
java.lang.String totalTagName,
boolean autoStart,
Tag... additionalTags)
Creates a new instance of the timer with a unit of milliseconds, using the ScheduledExecutorService provided by
the user. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
long |
getCount()
Get the number of times this timer has been updated |
java.util.List<Monitor<?>> |
getMonitors()
Returns a list of sub-monitors for this composite. |
long |
getTotalMeasurement()
Get the total time recorded for this timer |
java.lang.Long |
getValue()
Get the value of the measurement |
protected void |
handleException(java.lang.Exception e)
This is called when we encounter an exception while processing the values recorded to compute the stats. |
int |
hashCode()
|
void |
record(long measurement)
Record the measurement we want to perform statistics on |
void |
startComputingStats()
starts computation. |
java.lang.String |
toString()
|
| Methods inherited from class com.netflix.servo.monitor.AbstractMonitor |
|---|
getConfig |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.netflix.servo.monitor.Monitor |
|---|
getConfig |
| Field Detail |
|---|
protected static final java.util.concurrent.ScheduledExecutorService defaultExecutor
protected final Counter count
protected final Counter totalMeasurement
| Constructor Detail |
|---|
public StatsMonitor(MonitorConfig config,
StatsConfig statsConfig,
java.util.concurrent.ScheduledExecutorService executor,
java.lang.String totalTagName,
boolean autoStart,
Tag... additionalTags)
ScheduledExecutorService provided by
the user.
| Method Detail |
|---|
public void startComputingStats()
public java.util.List<Monitor<?>> getMonitors()
getMonitors in interface CompositeMonitor<java.lang.Long>public void record(long measurement)
public java.lang.Long getValue()
getValue in interface Monitor<java.lang.Long>protected void handleException(java.lang.Exception e)
e - Exception encountered.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic long getCount()
public long getTotalMeasurement()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||