Timer

prometheus4cats.Timer
See theTimer companion object
sealed abstract class Timer[F[_], A]

A derived metric type that can time a given operation. See Timer.fromHistogram and Timer.fromGauge for more information.

Attributes

Companion
object
Source
Timer.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Timer[F, A]

Members list

Type members

Types

type Metric

Attributes

Source
Timer.scala

Value members

Concrete methods

def contramapLabels[B](f: B => A): Timer[F, B]

Attributes

Source
Timer.scala
def mapK[G[_]](fk: FunctionK[F, G]): Timer[G, A]

Attributes

Source
Timer.scala
final def recordTime(duration: FiniteDuration): F[Unit]
Implicitly added by TimerSyntax

Attributes

Source
Timer.scala
final def time[B](fb: F[B])(implicit F: MonadThrow[F], clock: Clock[F]): F[B]
Implicitly added by TimerSyntax

Time an operation using an instance of cats.effect.kernel.Clock.

Time an operation using an instance of cats.effect.kernel.Clock.

The resulting metrics depend on the underlying implementation. See Timer.fromHistogram and Timer.fromGauge for more details.

Value parameters

fb

operation to be timed

Attributes

Source
Timer.scala