-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
difficulty: beginnerPure Haskell taskPure Haskell taskenhancementa feature, ready for implementationa feature, ready for implementation
Description
Problem
Setting server-timing-enabled to true has a ~6.5% RPS decrease. Using GETSimple on https://github.com/PostgREST/postgrest-benchmark:
no timings = 2176.4712194 rps
with timings = 2033.3584706 rps
I don't think there's a way around it since calculating the timings requires using clock time which needs a system call (clock_gettime).
Solution
Allow getting server timing headers through a new preference header.
Prefer: metrics=timings
metrics=timings
would be the only value for now, but we could extend it later on.
This can later be enabled/disabled with #2987.
While at it, deprecate server-timing-enabled since it has a perf impact.
develop7kamilogorek
Metadata
Metadata
Assignees
Labels
difficulty: beginnerPure Haskell taskPure Haskell taskenhancementa feature, ready for implementationa feature, ready for implementation