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

DRIVER_ADAPTER_BRANCH=restore-pool-check #4655

Closed
wants to merge 1 commit into from
Closed

DRIVER_ADAPTER_BRANCH=restore-pool-check #4655

wants to merge 1 commit into from

Conversation

SevInf
Copy link
Contributor

@SevInf SevInf commented Jan 18, 2024

Not for merging

Copy link
Contributor

WASM Size

Engine This PR Base branch Diff
WASM 2.338MiB 2.338MiB 0.000B
WASM (gzip) 907.788KiB 907.788KiB 0.000B

Copy link

codspeed-hq bot commented Jan 18, 2024

CodSpeed Performance Report

Merging #4655 will not alter performance

Comparing test/da (bf31f4c) with main (9c3f205)

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  301.12 ms/iter  (299.41 ms … 304.9 ms)  301.8 ms  304.9 ms  304.9 ms
Web Assembly: Latest    387.28 ms/iter (385.13 ms … 389.92 ms) 387.74 ms 389.92 ms 389.92 ms
Web Assembly: Current   394.22 ms/iter (387.59 ms … 423.33 ms) 394.54 ms 423.33 ms 423.33 ms
Node API: Current       232.07 ms/iter (225.39 ms … 240.26 ms) 235.54 ms 240.26 ms 240.26 ms

summary for movies.findMany() (all - 25000)
  Web Assembly: Current
   1.7x slower than Node API: Current
   1.31x slower than Web Assembly: Baseline
   1.02x slower than Web Assembly: Latest

• movies.findMany({ take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   12.64 ms/iter   (11.85 ms … 18.27 ms)   12.4 ms  18.27 ms  18.27 ms
Web Assembly: Latest     16.14 ms/iter   (15.68 ms … 24.26 ms)  15.97 ms  24.26 ms  24.26 ms
Web Assembly: Current    15.67 ms/iter   (15.27 ms … 17.25 ms)  15.75 ms  17.25 ms  17.25 ms
Node API: Current         9.47 ms/iter    (9.06 ms … 12.73 ms)   9.48 ms  12.73 ms  12.73 ms

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

• movies.findMany({ where: {...}, take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline    2.03 ms/iter     (1.83 ms … 3.61 ms)   1.95 ms   3.45 ms    3.6 ms
Web Assembly: Latest      2.53 ms/iter     (2.39 ms … 4.27 ms)   2.49 ms   3.93 ms    4.2 ms
Web Assembly: Current     2.47 ms/iter     (2.38 ms … 4.01 ms)   2.47 ms   2.97 ms   3.46 ms
Node API: Current         1.52 ms/iter     (1.42 ms … 1.79 ms)   1.54 ms   1.71 ms   1.74 ms

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

• movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   12.27 ms/iter   (11.91 ms … 14.92 ms)  12.26 ms  14.92 ms  14.92 ms
Web Assembly: Latest     15.67 ms/iter   (15.51 ms … 16.03 ms)  15.71 ms  16.03 ms  16.03 ms
Web Assembly: Current    15.65 ms/iter   (15.23 ms … 19.87 ms)  15.63 ms  19.87 ms  19.87 ms
Node API: Current         9.46 ms/iter    (9.07 ms … 11.84 ms)   9.42 ms  11.84 ms  11.84 ms

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

• movies.findMany({ where: {...}, include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline    1.91 ms/iter     (1.83 ms … 3.61 ms)    1.9 ms   2.66 ms   2.88 ms
Web Assembly: Latest      2.48 ms/iter     (2.39 ms … 3.66 ms)   2.47 ms   3.11 ms   3.44 ms
Web Assembly: Current     2.45 ms/iter     (2.38 ms … 2.94 ms)   2.46 ms   2.85 ms   2.85 ms
Node API: Current         1.56 ms/iter     (1.48 ms … 2.02 ms)   1.57 ms   1.86 ms   1.99 ms

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

• movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   12.12 ms/iter   (11.82 ms … 12.63 ms)  12.19 ms  12.63 ms  12.63 ms
Web Assembly: Latest     15.69 ms/iter      (15.57 ms … 16 ms)  15.71 ms     16 ms     16 ms
Web Assembly: Current    15.77 ms/iter    (15.33 ms … 18.2 ms)  15.77 ms   18.2 ms   18.2 ms
Node API: Current         9.32 ms/iter     (8.97 ms … 9.73 ms)   9.42 ms   9.73 ms   9.73 ms

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

• movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     1.9 ms/iter      (1.83 ms … 2.8 ms)    1.9 ms   2.48 ms   2.55 ms
Web Assembly: Latest      2.45 ms/iter     (2.37 ms … 2.87 ms)   2.46 ms    2.8 ms    2.8 ms
Web Assembly: Current     2.45 ms/iter     (2.37 ms … 4.04 ms)   2.45 ms   3.05 ms   3.16 ms
Node API: Current         1.56 ms/iter     (1.49 ms … 1.78 ms)   1.57 ms   1.73 ms   1.74 ms

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

• movie.findMany({ where: { reviews: { author: { ... } }, take: 100 }) (to-many -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  927.28 µs/iter   (852.16 µs … 1.61 ms) 919.63 µs   1.51 ms   1.54 ms
Web Assembly: Latest      1.19 ms/iter     (1.13 ms … 1.89 ms)    1.2 ms   1.71 ms   1.78 ms
Web Assembly: Current     1.21 ms/iter     (1.13 ms … 2.04 ms)    1.2 ms    1.8 ms   1.86 ms
Node API: Current       856.15 µs/iter   (756.84 µs … 1.91 ms) 860.54 µs   1.28 ms   1.41 ms

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

• movie.findMany({ where: { cast: { person: { ... } }, take: 100 }) (m2m -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  903.13 µs/iter    (860.7 µs … 1.46 ms) 905.89 µs   1.23 ms   1.28 ms
Web Assembly: Latest      1.19 ms/iter     (1.14 ms … 1.77 ms)    1.2 ms   1.48 ms   1.55 ms
Web Assembly: Current     1.18 ms/iter     (1.14 ms … 1.86 ms)   1.18 ms   1.71 ms   1.75 ms
Node API: Current        796.3 µs/iter   (766.33 µs … 1.13 ms)  800.1 µs 895.33 µs 974.28 µs

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

After changes in bf31f4c

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