A derived metric type that can time a given operation. See Timer.Labelled.fromHistogram and Timer.Labelled.fromGauge for more information.
- Companion:
- object
- Source:
- Timer.scala
Type members
Types
Value members
Abstract methods
Concrete methods
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
- labels
labels to add to the underlying metric
- Source:
- Timer.scala
Time an operation using an instance of cats.effect.kernel.Clock, handling failures and computing labels from the result.
Time an operation using an instance of cats.effect.kernel.Clock, handling failures and computing labels from the result.
- Value parameters:
- fb
operation to be timed
- labelsError
partial function to convert an exception raised on unsuccessful operation of
fb
. If the exception does not match the provided scala.PartialFunction then no value will be recorded.- labelsSuccess
function to convert the successful result of
fb
to labels
- Source:
- Timer.scala
Time an operation using an instance of cats.effect.kernel.Clock, computing labels from the result.
Time an operation using an instance of cats.effect.kernel.Clock, computing labels from the result.
- Value parameters:
- fb
operation to be timed
- labels
function to convert the result of
fb
to labels
- Source:
- Timer.scala