The number of durations recorded.
The fifteen-minute rate of timings.
The five-minute rate of timings.
The longest recorded duration in nanoseconds.
The arithmetic mean of all recorded durations in nanoseconds.
The mean rate of timings.
The shortest recorded duration in nanoseconds.
The one-minute rate of timings.
A snapshot of the values in the timer's sample.
The standard deviation of all recorded durations.
Runs f, recording its duration, and returns its result.
Converts partial function pf
into a side-effecting partial function that times
every invocation of pf
for which it is defined.
Converts partial function pf
into a side-effecting partial function that times
every invocation of pf
for which it is defined. The result is passed unchanged.
Example usage:
class Example extends Instrumented { val isEven: PartialFunction[Int, String] = { case x if x % 2 == 0 => x+" is even" } val isEvenTimer = metrics.timer("isEven") val timedIsEven: PartialFunction[Int, String] = isEvenTimer.timePF(isEven) val sample = 1 to 10 sample collect timedIsEven // timer does 5 measurements }
A timing com.codahale.metrics.Timer.Context, which measures an elapsed time in nanoseconds.
Adds a recorded duration.
A Scala façade class for Timer.
Example usage: