Skip to content
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

make: add db-push target #4636

Closed
wants to merge 1 commit into from
Closed

make: add db-push target #4636

wants to merge 1 commit into from

Conversation

aqrln
Copy link
Member

@aqrln aqrln commented Jan 10, 2024

Add make db-push command to push the schema in dev_datamodel.prisma
to the database.

Add `make db-push` command to push the schema in `dev_datamodel.prisma`
to the database.
@aqrln aqrln requested a review from a team as a code owner January 10, 2024 11:45
@aqrln aqrln requested review from miguelff and Weakky and removed request for a team January 10, 2024 11:45
@aqrln
Copy link
Member Author

aqrln commented Jan 10, 2024

Actually there is a target for that already 🙈

@aqrln aqrln closed this Jan 10, 2024
@aqrln aqrln deleted the make-add-db-push-target branch January 10, 2024 11:46
Copy link
Contributor

WASM Size

Engine This PR Base branch Diff
WASM 2.744MiB 2.744MiB 0.000B
WASM (gzip) 1.006MiB 1.006MiB 0.000B

Copy link

codspeed-hq bot commented Jan 10, 2024

CodSpeed Performance Report

Merging #4636 will not alter performance

Comparing make-add-db-push-target (bcadec8) with main (0a83d85)

Summary

✅ 11 untouched benchmarks

Copy link
Contributor

✅ WASM query-engine: no benchmarks have regressed

Full benchmark report
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/bench?schema=imdb_bench&sslmode=disable" \
node --experimental-wasm-modules query-engine/driver-adapters/executor/dist/bench.mjs
cpu: AMD EPYC 7763 64-Core Processor
runtime: node v18.19.0 (x64-linux)

benchmark                   time (avg)             (min … max)       p75       p99      p995
-------------------------------------------------------------- -----------------------------
• movies.findMany() (all - 25000)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  306.53 ms/iter (304.05 ms … 311.34 ms) 307.11 ms 311.34 ms 311.34 ms
Web Assembly: Latest    309.69 ms/iter (307.36 ms … 315.95 ms) 309.99 ms 315.95 ms 315.95 ms
Web Assembly: Current   308.77 ms/iter (304.68 ms … 323.06 ms) 308.42 ms 323.06 ms 323.06 ms
Node API: Current       233.15 ms/iter (226.96 ms … 246.21 ms) 236.55 ms 246.21 ms 246.21 ms

summary for movies.findMany() (all - 25000)
  Web Assembly: Current
   1.32x slower than Node API: Current
   1.01x slower than Web Assembly: Baseline
   1x faster than Web Assembly: Latest

• movies.findMany({ take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   12.73 ms/iter    (11.87 ms … 18.9 ms)  12.48 ms   18.9 ms   18.9 ms
Web Assembly: Latest     12.67 ms/iter   (12.03 ms … 15.22 ms)  12.57 ms  15.22 ms  15.22 ms
Web Assembly: Current    12.47 ms/iter   (12.09 ms … 15.87 ms)  12.36 ms  15.87 ms  15.87 ms
Node API: Current         9.58 ms/iter    (8.99 ms … 14.25 ms)   9.66 ms  14.25 ms  14.25 ms

summary for movies.findMany({ take: 2000 })
  Web Assembly: Current
   1.3x slower than Node API: Current
   1.02x faster than Web Assembly: Latest
   1.02x faster than Web Assembly: Baseline

• movies.findMany({ where: {...}, take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline    2.16 ms/iter     (1.85 ms … 7.34 ms)   2.07 ms   3.57 ms   3.61 ms
Web Assembly: Latest      2.04 ms/iter     (1.84 ms … 3.61 ms)      2 ms   3.41 ms   3.43 ms
Web Assembly: Current     1.94 ms/iter     (1.84 ms … 3.64 ms)   1.91 ms   3.32 ms   3.37 ms
Node API: Current         1.61 ms/iter     (1.45 ms … 2.97 ms)   1.59 ms   2.49 ms   2.85 ms

summary for movies.findMany({ where: {...}, take: 2000 })
  Web Assembly: Current
   1.21x slower than Node API: Current
   1.05x faster than Web Assembly: Latest
   1.11x faster than Web Assembly: Baseline

• movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   12.26 ms/iter   (11.92 ms … 13.76 ms)  12.31 ms  13.76 ms  13.76 ms
Web Assembly: Latest     12.23 ms/iter   (11.87 ms … 15.36 ms)  12.25 ms  15.36 ms  15.36 ms
Web Assembly: Current    12.39 ms/iter   (12.11 ms … 14.97 ms)  12.38 ms  14.97 ms  14.97 ms
Node API: Current         9.36 ms/iter     (9.04 ms … 9.96 ms)   9.39 ms   9.96 ms   9.96 ms

summary for movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
  Web Assembly: Current
   1.32x slower than Node API: Current
   1.01x slower than Web Assembly: Latest
   1.01x slower than Web Assembly: Baseline

• movies.findMany({ where: {...}, include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline    1.99 ms/iter     (1.86 ms … 3.38 ms)   1.96 ms   3.13 ms   3.21 ms
Web Assembly: Latest      1.93 ms/iter     (1.83 ms … 3.33 ms)   1.91 ms   2.62 ms   2.77 ms
Web Assembly: Current     1.95 ms/iter     (1.83 ms … 3.52 ms)    1.9 ms   3.27 ms   3.35 ms
Node API: Current         1.55 ms/iter     (1.45 ms … 2.04 ms)   1.57 ms   1.83 ms   2.01 ms

summary for movies.findMany({ where: {...}, include: { cast: true } take: 2000 }) (m2m)
  Web Assembly: Current
   1.25x slower than Node API: Current
   1.01x slower than Web Assembly: Latest
   1.02x faster than Web Assembly: Baseline

• movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline    12.3 ms/iter   (11.98 ms … 12.97 ms)  12.45 ms  12.97 ms  12.97 ms
Web Assembly: Latest      12.3 ms/iter   (12.11 ms … 12.69 ms)  12.35 ms  12.69 ms  12.69 ms
Web Assembly: Current    12.26 ms/iter   (11.86 ms … 14.83 ms)  12.31 ms  14.83 ms  14.83 ms
Node API: Current         9.43 ms/iter    (9.12 ms … 11.38 ms)   9.43 ms  11.38 ms  11.38 ms

summary for movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
  Web Assembly: Current
   1.3x slower than Node API: Current
   1x faster than Web Assembly: Latest
   1x faster than Web Assembly: Baseline

• movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     1.9 ms/iter     (1.82 ms … 2.59 ms)    1.9 ms   2.38 ms   2.39 ms
Web Assembly: Latest      1.88 ms/iter      (1.8 ms … 2.89 ms)   1.87 ms   2.84 ms   2.86 ms
Web Assembly: Current     1.92 ms/iter     (1.81 ms … 4.44 ms)   1.88 ms   2.79 ms   3.35 ms
Node API: Current         1.58 ms/iter     (1.48 ms … 2.12 ms)    1.6 ms   1.84 ms   2.04 ms

summary for movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
  Web Assembly: Current
   1.21x slower than Node API: Current
   1.02x slower than Web Assembly: Latest
   1.01x slower than Web Assembly: Baseline

• movie.findMany({ where: { reviews: { author: { ... } }, take: 100 }) (to-many -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  940.56 µs/iter    (859.7 µs … 1.59 ms) 928.94 µs   1.53 ms   1.55 ms
Web Assembly: Latest    908.94 µs/iter   (843.18 µs … 1.56 ms) 896.92 µs   1.54 ms   1.54 ms
Web Assembly: Current   897.09 µs/iter    (852.42 µs … 1.4 ms) 899.02 µs   1.18 ms   1.32 ms
Node API: Current          796 µs/iter   (763.52 µs … 1.01 ms) 801.66 µs 884.36 µs 976.38 µs

summary for movie.findMany({ where: { reviews: { author: { ... } }, take: 100 }) (to-many -> to-one)
  Web Assembly: Current
   1.13x slower than Node API: Current
   1.01x faster than Web Assembly: Latest
   1.05x faster than Web Assembly: Baseline

• movie.findMany({ where: { cast: { person: { ... } }, take: 100 }) (m2m -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  912.11 µs/iter   (859.56 µs … 1.45 ms) 911.28 µs   1.32 ms   1.39 ms
Web Assembly: Latest    885.09 µs/iter   (844.99 µs … 1.49 ms) 888.96 µs   1.18 ms   1.23 ms
Web Assembly: Current    896.5 µs/iter   (854.32 µs … 2.61 ms) 893.58 µs   1.25 ms   1.29 ms
Node API: Current       858.46 µs/iter   (773.59 µs … 1.74 ms) 864.52 µs   1.18 ms   1.27 ms

summary for movie.findMany({ where: { cast: { person: { ... } }, take: 100 }) (m2m -> to-one)
  Web Assembly: Current
   1.04x slower than Node API: Current
   1.01x slower than Web Assembly: Latest
   1.02x faster than Web Assembly: Baseline

After changes in bcadec8

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.

1 participant