-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(qe-wasm): WASM query engine benchmarks isolated from DB #4567
Conversation
WASM Size
|
CodSpeed Performance ReportMerging #4567 will not alter performanceComparing Summary
|
start-pg-bench: | ||
docker compose -f query-engine/driver-adapters/executor/bench/docker-compose.yml up --wait -d --remove-orphans postgres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Builds a custom image that loads the seed file, see Dockerfile at https://github.com/prisma/prisma-engines/pull/4567/files#diff-96c0901b002d607e8553d7b5b38b2dd0dccdf904ade81ff4c8f4dffa6ab54140
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, quite large. The alternatives are:
- Store this file in a different place in the internet and pull it (ex. a dedicated repository)
- Seed the database each time benchmark runs (10s -> 5 minutes)
03fed65
to
0c63fac
Compare
cfe897b
to
29ff6a2
Compare
1bca2e3
to
5b07aa2
Compare
d2c2726
to
243b063
Compare
@janpio Did you try to mean "Format the json file?" 😂 |
The present PR adds continuous benchmarking of the current query-engine WASM, comparing it with:
It provides a comment like this with the benchmark results for different queries in text mode.
Benchmarks are considered to have regressed if there is more than one benchmark 5% slower in the current WASM query engine compared to the
latest
version (coming from main)Close https://github.com/prisma/team-orm/issues/725
Close https://github.com/prisma/team-orm/issues/732
Close https://github.com/prisma/team-orm/issues/733
Close https://github.com/prisma/team-orm/issues/734
Implementation:
The code uses a decorator over the driver adapter that fetches query results from a local cache after warmup, in a way such as the database IO latency is a no-op.
The queries to benchmark are defined in the queries.json file. Once this PR is reviewed for a correct approach and implementation, we can add more queries the query-benchmarks suite if necessary.