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

chore: fix clippy #4625

Merged
merged 8 commits into from
Jan 3, 2024
Merged

chore: fix clippy #4625

merged 8 commits into from
Jan 3, 2024

Conversation

jkomyno
Copy link
Contributor

@jkomyno jkomyno commented Jan 2, 2024

  • Removed unused imports
  • Added conditional clippy "allow" rules based on target arch
  • Replaced .get(0) with .first()

@jkomyno jkomyno self-assigned this Jan 2, 2024
@jkomyno jkomyno added this to the 5.8.0 milestone Jan 2, 2024
Copy link
Contributor

github-actions bot commented Jan 2, 2024

WASM Size

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

@jkomyno jkomyno marked this pull request as ready for review January 2, 2024 13:16
@jkomyno jkomyno requested a review from a team as a code owner January 2, 2024 13:16
@jkomyno jkomyno requested review from Weakky and Druue and removed request for a team January 2, 2024 13:16
Copy link

codspeed-hq bot commented Jan 2, 2024

CodSpeed Performance Report

Merging #4625 will not alter performance

Comparing fix/clippy (f88155e) with main (01382e5)

Summary

✅ 11 untouched benchmarks

Copy link
Contributor

github-actions bot commented Jan 2, 2024

🚨 WASM query-engine: 8 benchmark(s) have regressed at least 2%

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  303.95 ms/iter (301.41 ms … 313.02 ms) 304.02 ms 313.02 ms 313.02 ms
Web Assembly: Latest    303.72 ms/iter (299.73 ms … 313.26 ms) 304.42 ms 313.26 ms 313.26 ms
Web Assembly: Current   327.92 ms/iter (324.67 ms … 340.15 ms) 328.15 ms 340.15 ms 340.15 ms
Node API: Current       233.55 ms/iter (223.49 ms … 243.94 ms) 236.86 ms 243.94 ms 243.94 ms

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

• movies.findMany({ take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   12.36 ms/iter   (11.82 ms … 17.27 ms)  12.24 ms  17.27 ms  17.27 ms
Web Assembly: Latest     12.86 ms/iter    (12.1 ms … 21.69 ms)  12.43 ms  21.69 ms  21.69 ms
Web Assembly: Current    13.39 ms/iter   (12.81 ms … 21.68 ms)  13.19 ms  21.68 ms  21.68 ms
Node API: Current         9.52 ms/iter    (9.18 ms … 13.59 ms)   9.53 ms  13.59 ms  13.59 ms

summary for movies.findMany({ take: 2000 })
  Web Assembly: Current
   1.41x slower than Node API: Current
   1.08x slower than Web Assembly: Baseline
   1.04x slower than Web Assembly: Latest

• movies.findMany({ where: {...}, take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline    2.05 ms/iter     (1.86 ms … 3.45 ms)   1.98 ms   3.43 ms   3.44 ms
Web Assembly: Latest      2.07 ms/iter     (1.85 ms … 3.59 ms)   2.03 ms   3.42 ms   3.44 ms
Web Assembly: Current     2.27 ms/iter     (1.97 ms … 3.58 ms)   2.31 ms   3.53 ms   3.57 ms
Node API: Current         1.58 ms/iter      (1.5 ms … 1.84 ms)   1.59 ms   1.78 ms   1.82 ms

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

• movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   12.25 ms/iter    (11.8 ms … 15.88 ms)  12.18 ms  15.88 ms  15.88 ms
Web Assembly: Latest     12.31 ms/iter   (12.18 ms … 12.63 ms)  12.34 ms  12.63 ms  12.63 ms
Web Assembly: Current    13.13 ms/iter    (12.77 ms … 15.6 ms)  13.16 ms   15.6 ms   15.6 ms
Node API: Current         9.38 ms/iter    (9.16 ms … 10.68 ms)   9.35 ms  10.68 ms  10.68 ms

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

• movies.findMany({ where: {...}, include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline    1.93 ms/iter      (1.82 ms … 4.5 ms)   1.92 ms   2.89 ms   3.03 ms
Web Assembly: Latest      1.94 ms/iter     (1.84 ms … 3.21 ms)   1.91 ms   2.98 ms   3.13 ms
Web Assembly: Current     2.06 ms/iter     (1.95 ms … 3.84 ms)   2.02 ms   3.17 ms    3.4 ms
Node API: Current         1.58 ms/iter      (1.49 ms … 1.9 ms)    1.6 ms   1.87 ms   1.88 ms

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

• movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   12.24 ms/iter   (11.92 ms … 13.12 ms)  12.39 ms  13.12 ms  13.12 ms
Web Assembly: Latest      12.4 ms/iter   (12.19 ms … 16.21 ms)  12.39 ms  16.21 ms  16.21 ms
Web Assembly: Current    13.18 ms/iter   (12.77 ms … 17.82 ms)  13.16 ms  17.82 ms  17.82 ms
Node API: Current         9.49 ms/iter     (9.03 ms … 10.3 ms)   9.56 ms   10.3 ms   10.3 ms

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

• movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     1.9 ms/iter     (1.81 ms … 3.06 ms)   1.89 ms    2.5 ms   2.78 ms
Web Assembly: Latest      1.98 ms/iter     (1.83 ms … 3.56 ms)   1.97 ms   2.98 ms   3.04 ms
Web Assembly: Current     2.01 ms/iter     (1.94 ms … 2.85 ms)      2 ms   2.48 ms    2.5 ms
Node API: Current         1.58 ms/iter     (1.49 ms … 2.17 ms)    1.6 ms   1.91 ms   1.95 ms

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

• movie.findMany({ where: { reviews: { author: { ... } }, take: 100 }) (to-many -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  948.71 µs/iter    (866.07 µs … 1.6 ms) 934.47 µs    1.5 ms   1.55 ms
Web Assembly: Latest    933.71 µs/iter   (852.84 µs … 3.14 ms) 925.56 µs   1.46 ms   1.53 ms
Web Assembly: Current   986.91 µs/iter   (898.45 µs … 1.62 ms) 971.98 µs   1.58 ms    1.6 ms
Node API: Current       838.39 µs/iter   (771.67 µs … 1.23 ms) 866.05 µs   1.03 ms   1.06 ms

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

• movie.findMany({ where: { cast: { person: { ... } }, take: 100 }) (m2m -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline     918 µs/iter   (866.43 µs … 1.45 ms) 920.39 µs    1.3 ms   1.32 ms
Web Assembly: Latest    912.42 µs/iter    (854.2 µs … 1.42 ms) 912.93 µs    1.3 ms   1.38 ms
Web Assembly: Current   963.56 µs/iter   (897.49 µs … 1.77 ms)  951.9 µs   1.57 ms   1.59 ms
Node API: Current       845.28 µs/iter    (776.72 µs … 1.6 ms) 865.32 µs   1.03 ms   1.14 ms

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

After changes in f88155e

@jkomyno jkomyno requested a review from laplab January 2, 2024 18:05
Copy link
Contributor

@Druue Druue left a comment

Choose a reason for hiding this comment

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

💚

@jkomyno jkomyno merged commit 0ac27a9 into main Jan 3, 2024
138 of 139 checks passed
@jkomyno jkomyno deleted the fix/clippy branch January 3, 2024 12:44
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