From 671f18b1fbc41d614decf9970c20e6c14f74d5f1 Mon Sep 17 00:00:00 2001 From: Mikhail Sokolov Date: Tue, 3 Sep 2024 10:06:08 +0300 Subject: [PATCH] FIXUP --- .../prometheus/ObserveDuration.scala | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/main/scala/com/evolutiongaming/prometheus/ObserveDuration.scala b/src/main/scala/com/evolutiongaming/prometheus/ObserveDuration.scala index 6e78bdb..8d5742f 100644 --- a/src/main/scala/com/evolutiongaming/prometheus/ObserveDuration.scala +++ b/src/main/scala/com/evolutiongaming/prometheus/ObserveDuration.scala @@ -19,6 +19,11 @@ sealed trait ObserveDuration[F] { */ def timeFunc[T](f: => T): T + /** Measures evaluation time of a block in seconds with nano-time precision + * + * @deprecated + * since 1.1.0 timeFunc has been changed to use nano-time precision, this method is obsolete and will be removed + */ @deprecated( message = "use timeFunc instead - it has nano-time precision now", since = "1.1.0" @@ -29,18 +34,37 @@ sealed trait ObserveDuration[F] { */ def timeFuture[T](f: => Future[T]): Future[T] + /** Measures evaluation time of an asynchronous block in seconds with nano-time precision + * + * @deprecated + * since 1.1.0 timeFuture has been changed to use nano-time precision, this method is obsolete and will be removed + */ @deprecated( message = "use timeFuture instead - it has nano-time precision now", since = "1.1.0" ) def timeFutureNanos[T](f: => Future[T]): Future[T] = timeFuture(f) + /** Measures in seconds the time spent since the provided start time obtained using [[ClockPlatform.nowMillis]] + * + * @param start + * start time from a millisecond-precision clock + * @deprecated + * since 1.1.0, use timeTillNowMillis(: Long) with a primitive arg type and explicit precision name suffix + */ @deprecated( message = "use timeTillNowMillis(: Long) with a primitive arg type and explicit precision name suffix", since = "1.1.0" ) def timeTillNow[T](start: T)(implicit numeric: Numeric[T]): Unit + /** Measures in seconds the time spent since the provided start time obtained using [[ClockPlatform.nowNano]] + * + * @param start + * start time from a nanosecond-precision clock + * @deprecated + * since 1.1.0, use timeTillNowNanos(: Long) with a primitive arg type + */ @deprecated( message = "use timeTillNowNanos(: Long) with a primitive arg type", since = "1.1.0"