The number of events which have been marked.
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)
}
}
Gives a marker that wraps the PartialFunction pf, which on execution marks the meter on an exception, and returns result of f.
Gives a marker that wraps the PartialFunction pf, which on execution marks the meter on an exception, and returns result of f.
Example usage:
class Example(val shardedDb: List[Db]) extends Instrumented {
private[this] val shardExceptionMeter = metrics.meter("shard").exceptionMarkerPartialFunction
private[this] val shardFunction: PartialFunction[Long,Db] = shardExceptionMeter {
case id:Long => shardedDb(id.toInt % shardedDb.length)
}
private[this] def shard(id: Long): Db = shardFunction.applyOrElse(id,(x: Long) => shardedDb(0))
def load(id: Long) = {
shard(id).load(id)
}
}
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.
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.
Marks the occurrence of a given number of events.
Marks the occurrence of an event.
The mean 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.
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.
A Scala façade class for Meter.
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 } }