|
|||||||||
| 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.BasicTimer
public class BasicTimer
A simple timer implementation providing the total time, count, min, and max for the times that have been recorded.
| Field Summary |
|---|
| Fields inherited from class com.netflix.servo.monitor.AbstractMonitor |
|---|
config |
| Constructor Summary | |
|---|---|
BasicTimer(MonitorConfig config)
Creates a new instance of the timer with a unit of milliseconds. |
|
BasicTimer(MonitorConfig config,
java.util.concurrent.TimeUnit unit)
Creates a new instance of the timer. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.Long |
getCount()
Get the total number of updates. |
java.lang.Double |
getMax()
Get the max value since the last reset. |
java.lang.Double |
getMin()
Get the min value since the last reset. |
java.util.List<Monitor<?>> |
getMonitors()
Returns a list of sub-monitors for this composite. |
java.util.concurrent.TimeUnit |
getTimeUnit()
The time unit reported by this timer. |
java.lang.Double |
getTotalTime()
Get the total time for all updates. |
java.lang.Long |
getValue()
Returns the current value for the monitor. |
int |
hashCode()
|
void |
record(long duration)
Deprecated. |
void |
record(long duration,
java.util.concurrent.TimeUnit unit)
Record a new value that was collected with the given TimeUnit. |
Stopwatch |
start()
Returns a stopwatch that has been started and will automatically record its result to this timer when stopped. |
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 |
| Constructor Detail |
|---|
public BasicTimer(MonitorConfig config)
public BasicTimer(MonitorConfig config,
java.util.concurrent.TimeUnit unit)
| Method Detail |
|---|
public java.util.List<Monitor<?>> getMonitors()
getMonitors in interface CompositeMonitor<java.lang.Long>public Stopwatch start()
start in interface Timerpublic java.util.concurrent.TimeUnit getTimeUnit()
getTimeUnit in interface Timer@Deprecated public void record(long duration)
record in interface Timer
public void record(long duration,
java.util.concurrent.TimeUnit unit)
record in interface Timerpublic java.lang.Long getValue()
getValue in interface Monitor<java.lang.Long>public java.lang.Double getTotalTime()
public java.lang.Long getCount()
public java.lang.Double getMin()
public java.lang.Double getMax()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||