Skip to content

Commit

Permalink
Fix execution time being integer-only millisecond values
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTeaCat committed Feb 7, 2024
1 parent d8f270f commit 95f5863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middlewares/http/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func GetMiddleware(options *Options) (func(next http.Handler) http.Handler, erro
chainResponseWriter := httptest.NewRecorder()
startTime := time.Now()
next.ServeHTTP(chainResponseWriter, r)
logEntry.ExecutionTime = float64(time.Since(startTime).Milliseconds())
logEntry.ExecutionTime = float64(time.Since(startTime)) / 1000000.0

// If it has been enabled, and we were able to determine the route and path params, validate the response against the openapi spec
if options.EnableResponseValidation && route != nil && pathParams != nil {
Expand Down

0 comments on commit 95f5863

Please sign in to comment.