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

query-engine-c-abi: CI build for RN binaries #4838

Merged
merged 3 commits into from Apr 29, 2024
Merged

query-engine-c-abi: CI build for RN binaries #4838

merged 3 commits into from Apr 29, 2024

Conversation

SevInf
Copy link
Contributor

@SevInf SevInf commented Apr 24, 2024

Adds GH Actions pipeline for building iOS & Andorid query engine
for prisma-react-native. Pipeline is triggered by engineer, similar to
Windows and Mac builds.

Will require updated engineer to function.
Example of succesfull run: https://buildkite.com/prisma/release-prisma-engines/builds/3721#018f1a4f-95c9-4cdd-b551-94e53d4e1978

Contributes to https://github.com/prisma/team-orm/issues/1106

@SevInf SevInf added this to the 5.14.0 milestone Apr 24, 2024
@SevInf SevInf force-pushed the c-abi-ci branch 2 times, most recently from 0fbcf9b to 2503407 Compare April 24, 2024 10:46
Copy link
Contributor

github-actions bot commented Apr 24, 2024

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.137MiB 2.137MiB 0.000B
Postgres (gzip) 840.812KiB 840.811KiB 1.000B
Mysql 2.107MiB 2.107MiB 0.000B
Mysql (gzip) 827.979KiB 827.978KiB 1.000B
Sqlite 1.998MiB 1.998MiB 0.000B
Sqlite (gzip) 787.576KiB 787.576KiB 0.000B

Copy link

codspeed-hq bot commented Apr 24, 2024

CodSpeed Performance Report

Merging #4838 will not alter performance

Comparing c-abi-ci (9c9d0ba) with main (744b41c)

Summary

✅ 11 untouched benchmarks

Copy link
Contributor

github-actions bot commented Apr 24, 2024

✅ WASM query-engine performance won't change substantially (1.006x)

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.20.2 (x64-linux)

benchmark                   time (avg)             (min … max)       p75       p99      p999
-------------------------------------------------------------- -----------------------------
• movies.findMany() (all - ~50K)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     373 ms/iter       (366 ms … 381 ms)    375 ms    381 ms    381 ms
Web Assembly: Latest       453 ms/iter       (452 ms … 454 ms)    454 ms    454 ms    454 ms
Web Assembly: Current      457 ms/iter       (456 ms … 459 ms)    458 ms    459 ms    459 ms
Node API: Current          196 ms/iter       (195 ms … 199 ms)    197 ms    199 ms    199 ms

summary for movies.findMany() (all - ~50K)
  Web Assembly: Current
   2.33x slower than Node API: Current
   1.23x slower than Web Assembly: Baseline
   1.01x slower than Web Assembly: Latest

• movies.findMany({ take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  14'977 µs/iter (14'776 µs … 17'055 µs) 14'966 µs 17'055 µs 17'055 µs
Web Assembly: Latest    18'409 µs/iter (17'987 µs … 20'601 µs) 18'508 µs 20'601 µs 20'601 µs
Web Assembly: Current   18'854 µs/iter (18'223 µs … 26'436 µs) 18'482 µs 26'436 µs 26'436 µs
Node API: Current        7'990 µs/iter   (7'846 µs … 8'340 µs)  8'040 µs  8'340 µs  8'340 µs

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

• movies.findMany({ where: {...}, take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   2'335 µs/iter   (2'213 µs … 3'814 µs)  2'300 µs  3'453 µs  3'814 µs
Web Assembly: Latest     2'836 µs/iter   (2'741 µs … 3'424 µs)  2'824 µs  3'404 µs  3'424 µs
Web Assembly: Current    2'876 µs/iter   (2'764 µs … 3'685 µs)  2'861 µs  3'548 µs  3'685 µs
Node API: Current        1'423 µs/iter   (1'318 µs … 2'314 µs)  1'407 µs  2'045 µs  2'314 µs

summary for movies.findMany({ where: {...}, take: 2000 })
  Web Assembly: Current
   2.02x slower than Node API: Current
   1.23x slower than Web Assembly: Baseline
   1.01x slower than Web Assembly: Latest

• movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     568 ms/iter       (562 ms … 590 ms)    571 ms    590 ms    590 ms
Web Assembly: Latest       782 ms/iter       (775 ms … 803 ms)    782 ms    803 ms    803 ms
Web Assembly: Current      788 ms/iter       (783 ms … 800 ms)    790 ms    800 ms    800 ms
Node API: Current          485 ms/iter       (478 ms … 494 ms)    492 ms    494 ms    494 ms

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

• movies.findMany({ where: {...}, include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  78'647 µs/iter (78'073 µs … 79'157 µs) 79'110 µs 79'157 µs 79'157 µs
Web Assembly: Latest       110 ms/iter       (110 ms … 111 ms)    111 ms    111 ms    111 ms
Web Assembly: Current      111 ms/iter       (110 ms … 111 ms)    111 ms    111 ms    111 ms
Node API: Current       62'816 µs/iter (62'238 µs … 63'675 µs) 63'128 µs 63'675 µs 63'675 µs

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

• movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1'008 ms/iter   (1'003 ms … 1'016 ms)  1'014 ms  1'016 ms  1'016 ms
Web Assembly: Latest     1'313 ms/iter   (1'301 ms … 1'329 ms)  1'326 ms  1'329 ms  1'329 ms
Web Assembly: Current    1'315 ms/iter   (1'305 ms … 1'333 ms)  1'331 ms  1'333 ms  1'333 ms
Node API: Current          873 ms/iter       (842 ms … 901 ms)    898 ms    901 ms    901 ms

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

• movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     143 ms/iter       (142 ms … 144 ms)    144 ms    144 ms    144 ms
Web Assembly: Latest       187 ms/iter       (187 ms … 189 ms)    188 ms    189 ms    189 ms
Web Assembly: Current      185 ms/iter       (184 ms … 186 ms)    186 ms    186 ms    186 ms
Node API: Current          110 ms/iter       (108 ms … 113 ms)    112 ms    113 ms    113 ms

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

• movie.findMany({ where: { reviews: { author: { ... } }, take: 100 }) (to-many -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1'036 µs/iter     (974 µs … 1'805 µs)  1'035 µs  1'558 µs  1'805 µs
Web Assembly: Latest     1'368 µs/iter   (1'305 µs … 2'100 µs)  1'368 µs  1'752 µs  2'100 µs
Web Assembly: Current    1'384 µs/iter   (1'319 µs … 1'923 µs)  1'382 µs  1'818 µs  1'923 µs
Node API: Current          792 µs/iter     (743 µs … 1'221 µs)    793 µs  1'095 µs  1'221 µs

summary for movie.findMany({ where: { reviews: { author: { ... } }, take: 100 }) (to-many -> to-one)
  Web Assembly: Current
   1.75x slower than Node API: Current
   1.34x 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   1'025 µs/iter     (974 µs … 1'839 µs)  1'025 µs  1'449 µs  1'839 µs
Web Assembly: Latest     1'353 µs/iter   (1'289 µs … 1'996 µs)  1'353 µs  1'775 µs  1'996 µs
Web Assembly: Current    1'361 µs/iter   (1'306 µs … 1'881 µs)  1'368 µs  1'753 µs  1'881 µs
Node API: Current          752 µs/iter     (701 µs … 1'032 µs)    772 µs    886 µs  1'032 µs

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

After changes in 9c9d0ba

@SevInf SevInf force-pushed the c-abi-ci branch 2 times, most recently from 40c5510 to 4fe72df Compare April 25, 2024 12:32
Adds GH Actions pipeline for building iOS & Andorid query engine
for `prisma-react-native`. Pipeline is triggered by engineer, similar to
Windows and Mac builds.

See prisma/engineer#120
Example of succesfull run: https://buildkite.com/prisma/release-prisma-engines/builds/3721#018f1a4f-95c9-4cdd-b551-94e53d4e1978

Contributes to prisma/team-orm#1106
@SevInf SevInf changed the title WIP: CI build for RN binaries query-engine-c-abi: CI build for RN binaries Apr 26, 2024
@SevInf SevInf marked this pull request as ready for review April 26, 2024 13:05
@SevInf SevInf requested a review from a team as a code owner April 26, 2024 13:05
@SevInf SevInf requested review from Druue and removed request for a team April 26, 2024 13:05
Copy link
Member

@Jolg42 Jolg42 left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍🏼

@SevInf SevInf merged commit 264f24c into main Apr 29, 2024
187 checks passed
@SevInf SevInf deleted the c-abi-ci branch April 29, 2024 07:25
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.

None yet

2 participants