FOps

final class FOps[F[_], A](f: F[A]) extends AnyVal
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def time(record: Duration => F[Unit])(implicit F: Bracket[F, Throwable], C: Clock[F]): F[A]

Measures the time it takes the effect to finish and records it using the provided function.

Measures the time it takes the effect to finish and records it using the provided function.

def timeCase(record: Either[Duration, Duration] => F[Unit])(implicit F: Bracket[F, Throwable], C: Clock[F]): F[A]

Measures the time it takes the effect to finish and records it using the provided function. It distinguishes between successful and failure state. Please note, that in case of the effect cancellation the record is not invoked at all.

Measures the time it takes the effect to finish and records it using the provided function. It distinguishes between successful and failure state. Please note, that in case of the effect cancellation the record is not invoked at all.