Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
fix bug because of order of operations
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewDennison authored and stijndehaes committed Oct 12, 2017
1 parent 7a930a6 commit 4c33c4f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class StatusAndRouteLatencyFilter @Inject()(registry: CollectorRegistry) (implic

nextFilter(requestHeader).map { result =>
val endTime = System.nanoTime
val requestTime = endTime - startTime / Collector.NANOSECONDS_PER_SECOND
val requestTime = (endTime - startTime) / Collector.NANOSECONDS_PER_SECOND
val routeLabel = requestHeader.attrs
.get(Router.Attrs.HandlerDef)
.map(_.method)
Expand All @@ -39,4 +39,4 @@ class StatusAndRouteLatencyFilter @Inject()(registry: CollectorRegistry) (implic

object StatusAndRouteLatencyFilter {
val unmatchedRoute: String = "unmatchedRoute"
}
}

0 comments on commit 4c33c4f

Please sign in to comment.