Skip to content

Add make bench target, run in CI, fix failure#1166

Merged
bgentry merged 3 commits intomasterfrom
bg/bench-skip-tests
Mar 14, 2026
Merged

Add make bench target, run in CI, fix failure#1166
bgentry merged 3 commits intomasterfrom
bg/bench-skip-tests

Conversation

@bgentry
Copy link
Contributor

@bgentry bgentry commented Mar 13, 2026

Fixing three separate issues here:

  • We don't have a make bench task in this project's Makefile, so I added one.
  • Configured it to run in CI with low ITERATIONS=1 to ensure it works but isn't slow.
  • Lo and behold, a benchmark was broken because we weren't running them in CI. Fix it by properly setting the query's schema.

Add a workspace-wide `bench` target that runs `go test -bench=.` for all
submodules with configurable `ITERATIONS` (default `100`). It uses
`-run=a^` so regular tests are skipped during benchmark runs.
@bgentry bgentry requested a review from brandur March 13, 2026 13:46
- 5432:5432

steps:
- uses: actions/checkout@v4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably doesn't matter much, but it's up to v6 these days.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh thank you, fixing! 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we had a few other outdated major versions in here, I fixed them all 🚀

bgentry added 2 commits March 14, 2026 14:57
Add a dedicated benchmark job with the same matrix as Riverpro's
benchmark CI (Go 1.25/1.26 on Postgres 17). It runs `make bench
ITERATIONS=1` to keep benchmark coverage in CI while staying fast.
`BenchmarkDriverRiverPgxV5_Executor` used a pooled executor without
setting `Schema` on `JobGetAvailable`, so it could hit default schema
and fail with missing `river_job`. Pass `Schema: bundle.schema` in both
`JobGetAvailable` benchmark calls so the queries always target the
migrated test schema.
@bgentry bgentry force-pushed the bg/bench-skip-tests branch from bfdc89d to 0b88a42 Compare March 14, 2026 19:58
@bgentry bgentry enabled auto-merge (squash) March 14, 2026 19:58
@bgentry bgentry merged commit cbcf59a into master Mar 14, 2026
15 checks passed
@bgentry bgentry deleted the bg/bench-skip-tests branch March 14, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants