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.
This commit is contained in:
steve-chavez
2025-12-18 17:35:18 -05:00
committed by Steve Chavez
parent 2bcd336400
commit 013f078bc4
9 changed files with 106 additions and 9 deletions
+1 -1
View File
@@ -94,6 +94,7 @@ library
PostgREST.Response.OpenAPI
PostgREST.Response.GucHeader
PostgREST.Response.Performance
PostgREST.TimeIt
PostgREST.Version
build-depends: base >= 4.9 && < 4.20
, HTTP >= 4000.3.7 && < 4000.5
@@ -139,7 +140,6 @@ library
, swagger2 >= 2.4 && < 2.9
, text >= 1.2.2 && < 2.2
, time >= 1.6 && < 1.13
, timeit >= 2.0 && < 2.1
, unordered-containers >= 0.2.8 && < 0.3
, unix-compat >= 0.5.4 && < 0.8
, vault >= 0.3.1.5 && < 0.4