Skip to content

Commit

Permalink
Merge pull request #1 from ChristopherDavenport/fixNanosCalc
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherDavenport authored Apr 22, 2020
2 parents 5082032 + c1315a3 commit 1868078
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,15 @@ object RedisMetricOps {

def recordTotalTime(terminationType: TerminationType, elapsed: Long, classifier: Option[String]): F[Unit] = {
metricsCollection.operations.label((terminationType, Classifier.opt(classifier)))
.observe(elapsed.toDouble)
.observe(nanosToSeconds(elapsed))
}
}


// Elapsed is in Nanos, but buckets are in Seconds
private def nanosToSeconds(l: Long): Double =
l / nanoseconds_per_second
private val nanoseconds_per_second = 1E9


}

0 comments on commit 1868078

Please sign in to comment.