class Meter extends AnyRef
A Scala facade class for DropwizardMeter.
Example usage:
class Example(val db: Db) extends Instrumented { private[this] val rowsLoadedMeter = metrics.meter("rowsLoaded") def load(id: Long): Seq[Row] = { val rows = db.load(id) rowsLoaded.mark(rows.size) rows } }
- Alphabetic
- By Inheritance
- Meter
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Meter(metric: com.codahale.metrics.Meter)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
count: Long
The number of events which have been marked.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exceptionMarker: AnyRef { def apply[A](f: => A): A }
Gives a marker that runs f, marks the meter on an exception, and returns result of f.
Gives a marker that runs f, marks the meter on an exception, and returns result of f.
Example usage:
class Example(val db: Db) extends Instrumented { private[this] val loadExceptionMeter = metrics.meter("load").exceptionMarker def load(id: Long) = loadExceptionMeter { db.load(id) } }
-
def
exceptionMarkerPF: AnyRef { def apply[A, B](pf: PartialFunction[A,B]): PartialFunction[A,B] }
Converts partial function
pf
into a side-effecting partial function that meters thrown exceptions for every invocation ofpf
(for the cases it is defined).Converts partial function
pf
into a side-effecting partial function that meters thrown exceptions for every invocation ofpf
(for the cases 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" case 5 => throw new IllegalArgumentException("5 is unlucky") } val isEvenExceptionMeter = metrics.meter("isEvenExceptions") val meteredIsEven: PartialFunction[Int, String] = isEvenExceptionMeter.exceptionMarkerPF(isEven) val sample = 1 to 10 sample collect meteredIsEven // the meter counts 1 exception }
-
def
fifteenMinuteRate: Double
The fifteen-minute exponentially-weighted moving average rate at which events have occurred since the meter was created.
The fifteen-minute exponentially-weighted moving average rate at which events have occurred since the meter was created.
This rate has the same exponential decay factor as the fifteen-minute load average in the top Unix command.
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fiveMinuteRate: Double
The five-minute exponentially-weighted moving average rate at which events have occurred since the meter was created.
The five-minute exponentially-weighted moving average rate at which events have occurred since the meter was created.
This rate has the same exponential decay factor as the five-minute load average in the top Unix command.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
mark(count: Long): Unit
Marks the occurrence of a given number of events.
-
def
mark(): Unit
Marks the occurrence of an event.
-
def
meanRate: Double
The mean rate at which events have occurred since the meter was created.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
oneMinuteRate: Double
The one-minute exponentially-weighted moving average rate at which events have occurred since the meter was created.
The one-minute exponentially-weighted moving average rate at which events have occurred since the meter was created.
This rate has the same exponential decay factor as the one-minute load average in the top Unix command.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()