|
|||||||||
| 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.BucketTimer
public class BucketTimer
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 | |
|---|---|
BucketTimer(MonitorConfig config,
BucketConfig bucketConfig)
Creates a new instance of the timer with a unit of milliseconds. |
|
BucketTimer(MonitorConfig config,
BucketConfig bucketConfig,
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.Long |
getMax()
Get the max value since the last reset. |
java.lang.Long |
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.Long |
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)
Record a new value for this timer. |
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 BucketTimer(MonitorConfig config,
BucketConfig bucketConfig)
public BucketTimer(MonitorConfig config,
BucketConfig bucketConfig,
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 Timerpublic 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.Long getTotalTime()
public java.lang.Long getCount()
public java.lang.Long getMin()
public java.lang.Long 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 | ||||||||