nl.grons.metrics.scala

Timer

class Timer extends AnyRef

A Scala façade class for Timer.

Example usage:

class Example(val db: Db) extends Instrumented {
private[this] val loadTimer = metrics.timer("load")

def load(id: Long) = loadTimer.time {
  db.load(id)
}
}
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Timer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Timer(metric: com.codahale.metrics.Timer)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def count: Long

    The number of durations recorded.

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def fifteenMinuteRate: Double

    The fifteen-minute rate of timings.

  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def fiveMinuteRate: Double

    The five-minute rate of timings.

  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. def max: Long

    The longest recorded duration in nanoseconds.

  18. def mean: Double

    The arithmetic mean of all recorded durations in nanoseconds.

  19. def meanRate: Double

    The mean rate of timings.

  20. def min: Long

    The shortest recorded duration in nanoseconds.

  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. def oneMinuteRate: Double

    The one-minute rate of timings.

  25. def snapshot: Snapshot

    A snapshot of the values in the timer's sample.

  26. def stdDev: Double

    The standard deviation of all recorded durations.

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def time[A](f: ⇒ A): A

    Runs f, recording its duration, and returns its result.

  29. def timePF[A, B](pf: PartialFunction[A, B]): PartialFunction[A, B]

    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
    }
  30. def timerContext(): Context

    A timing com.codahale.metrics.Timer.Context, which measures an elapsed time in nanoseconds.

  31. def toString(): String

    Definition Classes
    AnyRef → Any
  32. def update(duration: Long, unit: TimeUnit): Unit

    Adds a recorded duration.

  33. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  34. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  35. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any

Ungrouped