fix: inaccurate Server-Timing durations
The transaction duration was notably off, doing:
```
curl localhost:3000/rpc/sleep?seconds=5 -i
```
Shows `46.1` for the `transaction;dur`, with this fix we obtain
`5007.3`.
Fixes https://github.com/PostgREST/postgrest/issues/4522
This also fixes inaccurate "schema cache queried" logs,
see https://github.com/PostgREST/postgrest/issues/4551.
(cherry picked from commit 013f078bc4)
This commit is contained in:
committed by
Steve Chavez
parent
e126956c1b
commit
4d35eb02e7
@@ -156,7 +156,7 @@ observationMessage = \case
|
||||
"Evicted entry from JWT cache"
|
||||
where
|
||||
showMillis :: Double -> Text
|
||||
showMillis x = toS $ showFFloat (Just 1) (x * 1000) ""
|
||||
showMillis x = toS $ showFFloat (Just 1) x ""
|
||||
|
||||
jsonMessage err = T.decodeUtf8 . LBS.toStrict . Error.errorPayload $ Error.PgError False err
|
||||
|
||||
|
||||
Reference in New Issue
Block a user