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. Hide All
  2. Show all
  1. Timer
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Timer (metric: Timer)

Value Members

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

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

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

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

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

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

    Attributes
    final
    Definition Classes
    Any
  7. def clone (): AnyRef

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

    The number of durations recorded.

  9. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def fiveMinuteRate : Double

    The five-minute rate of timings.

  14. def getClass (): java.lang.Class[_]

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

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

    Attributes
    final
    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. def ne (arg0: AnyRef): Boolean

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

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

    Attributes
    final
    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. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    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]

    Wraps partial function pf, timing every execution

  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. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any