|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.servo.monitor.DynamicTimer
public final class DynamicTimer
Utility class that dynamically creates BasicTimers based on an arbitrary
(name, tagList), or MonitorConfig. Timers are automatically expired after 15 minutes of
inactivity.
| Method Summary | |
|---|---|
MonitorConfig |
getConfig()
Configuration used to identify a monitor and provide metadata used in aggregations. |
java.util.List<Monitor<?>> |
getMonitors()
Returns a list of sub-monitors for this composite. |
java.lang.Long |
getValue()
Returns the current value for the monitor. |
static void |
record(MonitorConfig config,
long duration)
Record result to the dynamic timer indicated by the provided config with a TimeUnit of milliseconds. |
static void |
record(MonitorConfig config,
long duration,
java.util.concurrent.TimeUnit unit)
Record result to the dynamic timer indicated by the provided config. |
static Stopwatch |
start(MonitorConfig config)
Returns a stopwatch that has been started and will automatically record its result to the dynamic timer specified by the given config. |
static Stopwatch |
start(MonitorConfig config,
java.util.concurrent.TimeUnit unit)
Returns a stopwatch that has been started and will automatically record its result to the dynamic timer specified by the given config. |
static Stopwatch |
start(java.lang.String name,
java.lang.String... tags)
Returns a stopwatch that has been started and will automatically record its result to the dynamic timer specified by the given name, and sequence of (key, value) pairs. |
static Stopwatch |
start(java.lang.String name,
TagList list)
Returns a stopwatch that has been started and will automatically record its result to the dynamic timer specified by the given config. |
static Stopwatch |
start(java.lang.String name,
TagList list,
java.util.concurrent.TimeUnit unit)
Returns a stopwatch that has been started and will automatically record its result to the dynamic timer specified by the given config. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static Stopwatch start(MonitorConfig config,
java.util.concurrent.TimeUnit unit)
public static Stopwatch start(MonitorConfig config)
public static void record(MonitorConfig config,
long duration)
public static void record(MonitorConfig config,
long duration,
java.util.concurrent.TimeUnit unit)
public static Stopwatch start(java.lang.String name,
java.lang.String... tags)
public static Stopwatch start(java.lang.String name,
TagList list)
public static Stopwatch start(java.lang.String name,
TagList list,
java.util.concurrent.TimeUnit unit)
public java.util.List<Monitor<?>> getMonitors()
getMonitors in interface CompositeMonitor<java.lang.Long>public java.lang.Long getValue()
getValue in interface Monitor<java.lang.Long>public MonitorConfig getConfig()
getConfig in interface Monitor<java.lang.Long>public 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 | ||||||||