com.netflix.servo.monitor
Interface Timer

All Superinterfaces:
Monitor<java.lang.Long>, NumericMonitor<java.lang.Long>
All Known Implementing Classes:
BasicTimer, ContextualTimer, StatsTimer

public interface Timer
extends NumericMonitor<java.lang.Long>

Monitor type for tracking how much time something is taking.


Method Summary
 java.util.concurrent.TimeUnit getTimeUnit()
          The time unit reported by this timer.
 void record(long duration)
          Record a new value for this timer.
 void record(long duration, java.util.concurrent.TimeUnit timeUnit)
          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.
 
Methods inherited from interface com.netflix.servo.monitor.Monitor
getConfig, getValue
 

Method Detail

start

Stopwatch start()
Returns a stopwatch that has been started and will automatically record its result to this timer when stopped.


getTimeUnit

java.util.concurrent.TimeUnit getTimeUnit()
The time unit reported by this timer.


record

void record(long duration)
Record a new value for this timer.


record

void record(long duration,
            java.util.concurrent.TimeUnit timeUnit)
Record a new value that was collected with the given TimeUnit.