Skip to content

nix(loadtest): run all target branches almost at the same time#5052

Merged
wolfgangwalther merged 4 commits into
PostgREST:mainfrom
wolfgangwalther:loadtest-against-build-once
Jun 27, 2026
Merged

nix(loadtest): run all target branches almost at the same time#5052
wolfgangwalther merged 4 commits into
PostgREST:mainfrom
wolfgangwalther:loadtest-against-build-once

Conversation

@wolfgangwalther

Copy link
Copy Markdown
Member

Instead of building, running, building, running, ... we now build all executables once ahead of time and then run all loadtests right after each other. This can sometimes reduce noise when load on the GHA runner varies over time.

(a few more less meaningful commits around that as well)

No need to duplicate this code, all of it is right there.
I'm not sure whether anyone is actually using them, but they never
worked really well, I believe. We should add something based on an
existing pre-commit hook manager, not that brittle custom thing we have.

Allows me to remove postgrest-with-git in the next commit instead of
duplicating it.
Instead of building, running, building, running, ... we now build all
executables once ahead of time and then run all loadtests right after
each other. This can sometimes reduce noise when load on the GHA runner
varies over time.

Since this requires us to move building into the loadtest-against
script, it also allows to go back to have the regular postgrest-loadtest
command default to building with cabal for faster local iteration.
Instead of generating them at loadtest runtime, we generate these
dynamic targets once via Nix. Because we're using libfaketime, we're not
bound to doing it at the same time as running the tests.

This allows us to run each loadtest right after each other, with minimal
other stuff going on inbetween. It's also a tiny bit more reproducible,
because the loadtests against both branches run with exactly the same
set of targets, where they did not before.
@wolfgangwalther wolfgangwalther force-pushed the loadtest-against-build-once branch from 99046de to cb406e1 Compare June 27, 2026 15:13
@wolfgangwalther wolfgangwalther merged commit 84e2a0c into PostgREST:main Jun 27, 2026
28 checks passed
@wolfgangwalther wolfgangwalther deleted the loadtest-against-build-once branch June 27, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants