Skip to content

BE-576: Upgrade @napi-rs/cli and napi crates to v3#8752

Open
indietyp wants to merge 4 commits into
mainfrom
bm/be-576-update-napi-to-v3
Open

BE-576: Upgrade @napi-rs/cli and napi crates to v3#8752
indietyp wants to merge 4 commits into
mainfrom
bm/be-576-update-napi-to-v3

Conversation

@indietyp
Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

This upgrades the napi-rs ecosystem to its latest major versions — bumping @napi-rs/cli from 2.18.4 to 3.6.2 and the corresponding Rust crates (napi, napi-derive, napi-build, napi-sys) from v2 to v3. This brings in breaking changes to the NAPI build tooling, requiring updates to how build targets are declared and how the CLI output directory is specified.

🔗 Related links

🔍 What does this change?

  • Upgrades @napi-rs/cli from 2.18.4 to 3.6.2 in the mise config.
  • Upgrades napi to 3.9.0, napi-derive to 3.5.6, napi-build to 2.3.2, and napi-sys to 3.2.1 in Cargo.toml.
  • Enables the type-def feature on napi-derive to support TypeScript type definition generation.
  • Updates the effect-dns-hickory build scripts to use the new CLI flag syntax (-o dist instead of positional dist argument).
  • Migrates the napi config in effect-dns-hickory/package.json from the old name/triples format to the new buildName/targets format, explicitly listing all supported targets including x86_64-unknown-linux-gnu, x86_64-pc-windows-msvc, and x86_64-apple-darwin.
  • Removes the now-unused convert_case 0.6.0 and ctor 0.2.9 transitive dependencies, replacing them with convert_case 0.11.0 and ctor 1.0.6.
  • Updates libloading from 0.8.9 to 0.9.0.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

🛡 What tests cover this?

  • Existing build and integration tests for effect-dns-hickory.

❓ How to test this?

  1. Checkout the branch.
  2. Run yarn build in libs/@local/effect-dns/hickory.
  3. Confirm the native module builds successfully and the generated impl.js and impl.d.ts files are emitted to dist.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Jun 2, 2026 8:28am
hashdotdesign-tokens Ready Ready Preview, Comment Jun 2, 2026 8:28am
petrinaut Ready Ready Preview Jun 2, 2026 8:28am

@cursor
Copy link
Copy Markdown

cursor Bot commented May 26, 2026

PR Summary

Medium Risk
Major-version bumps to native build tooling and lockfile-wide napi transitive deps; risk is mainly broken native builds or wrong platform artifacts for effect-dns-hickory until builds are verified on target triples.

Overview
Upgrades the napi-rs stack to v3: @napi-rs/cli 2.18.4 → 3.6.2 in mise, and workspace Rust crates napi / napi-derive / napi-build / napi-sys to their v3-compatible versions, with type-def enabled on napi-derive for TS definitions.

For @local/effect-dns-hickory, build scripts now pass -o dist instead of a positional output path, regenerate-packages uses napi create-npm-dirs, and package.json napi config moves from name + triples.additional to binaryName + explicit targets (including x86_64 Linux/macOS/Windows). .gitignore ignores the generated libs/@local/effect-dns/hickory/npm tree; Cargo.lock reflects transitive dependency churn (e.g. libloading 0.9).

Reviewed by Cursor Bugbot for commit 5e229c8. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team labels May 26, 2026
Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 26, 2026

🤖 Augment PR Summary

Summary: Upgrades the repo’s NAPI-RS toolchain to the v3 ecosystem to match the latest breaking changes in build/config conventions.

Changes:

  • Bumps @napi-rs/cli from 2.18.4 → 3.6.2 in mise
  • Updates Rust dependencies (napi, napi-derive, napi-build) to the v3-compatible versions and enables TS type-def generation
  • Adjusts effect-dns-hickory build scripts to use -o dist instead of positional output args
  • Migrates the package’s NAPI config from triples to an explicit targets list

Technical Notes: This aligns the native build + binding generation with the v3 CLI option/config schema to keep cross-platform builds working.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread libs/@local/effect-dns/hickory/package.json Outdated
Comment thread libs/@local/effect-dns/hickory/package.json Outdated
Comment thread libs/@local/effect-dns/hickory/package.json
@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.08%. Comparing base (188c0a5) to head (5e229c8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8752      +/-   ##
==========================================
- Coverage   59.09%   59.08%   -0.02%     
==========================================
  Files        1344     1343       -1     
  Lines      129783   129731      -52     
  Branches     5869     5866       -3     
==========================================
- Hits        76699    76651      -48     
+ Misses      52181    52177       -4     
  Partials      903      903              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.41% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
blockprotocol.type-system 40.84% <ø> (ø)
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.24% <ø> (ø)
local.hash-backend-utils 2.81% <ø> (ø)
local.hash-graph-sdk 9.63% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.antsi 0.00% <ø> (ø)
rust.error-stack 90.87% <ø> (ø)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.18% <ø> (-0.04%) ⬇️
rust.harpc-tower 67.03% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 92.23% <ø> (ø)
rust.hash-codec 72.76% <ø> (ø)
rust.hash-graph-api 2.52% <ø> (ø)
rust.hash-graph-authorization 62.34% <ø> (ø)
rust.hash-graph-postgres-store 26.74% <ø> (ø)
rust.hash-graph-store 37.76% <ø> (ø)
rust.hash-graph-temporal-versioning 47.95% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 83.45% <ø> (ø)
rust.hashql-ast 87.23% <ø> (ø)
rust.hashql-compiletest 28.26% <ø> (ø)
rust.hashql-core 79.28% <ø> (ø)
rust.hashql-diagnostics 72.53% <ø> (ø)
rust.hashql-eval 75.69% <ø> (ø)
rust.hashql-hir 89.06% <ø> (ø)
rust.hashql-mir 86.94% <ø> (-0.01%) ⬇️
rust.hashql-syntax-jexpr 94.06% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 26, 2026

Merging this PR will not alter performance

✅ 80 untouched benchmarks


Comparing bm/be-576-update-napi-to-v3 (5e229c8) with main (7aa2018)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (188c0a5) during the generation of this report, so 7aa2018 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@vercel vercel Bot temporarily deployed to Preview – petrinaut May 26, 2026 07:57 Inactive
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repo’s N-API build tooling configuration (notably for libs/@local/effect-dns/hickory) by bumping the @napi-rs/cli tool version and adjusting the CLI invocation/config to match the newer syntax, while also enabling napi-derive TypeScript type definition generation via the type-def feature.

Changes:

  • Bump @napi-rs/cli in mise and update effect-dns-hickory package.json scripts/config to the newer napi CLI syntax and explicit target listing.
  • Enable napi-derive’s type-def feature at the workspace dependency level.
  • Refresh Cargo.lock (including napi-build patch update and a libloading version change) and add a gitignore entry for the generated npm artifacts directory.

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
libs/@local/effect-dns/hickory/package.json Updates napi build flags, create-npm-dirs script, and switches to explicit targets configuration.
Cargo.toml Enables napi-derive type-def feature in workspace dependencies.
Cargo.lock Updates resolved crate versions (incl. napi-build patch and libloading change).
.gitignore Ignores generated libs/@local/effect-dns/hickory/npm directory.
.config/mise/config.toml Bumps @napi-rs/cli tool version used by the repo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Cargo.toml Outdated
Comment thread libs/@local/effect-dns/hickory/package.json
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 67605c4. Configure here.

Comment thread Cargo.toml Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$26.3 \mathrm{ms} \pm 172 \mathrm{μs}\left({\color{gray}-4.936 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.54 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{lightgreen}-6.438 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.9 \mathrm{ms} \pm 99.8 \mathrm{μs}\left({\color{lightgreen}-12.663 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$43.7 \mathrm{ms} \pm 307 \mathrm{μs}\left({\color{gray}-4.675 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.8 \mathrm{ms} \pm 123 \mathrm{μs}\left({\color{gray}-3.192 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$25.1 \mathrm{ms} \pm 197 \mathrm{μs}\left({\color{lightgreen}-7.794 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$27.4 \mathrm{ms} \pm 212 \mathrm{μs}\left({\color{gray}-3.559 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.95 \mathrm{ms} \pm 26.7 \mathrm{μs}\left({\color{lightgreen}-7.436 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.1 \mathrm{ms} \pm 114 \mathrm{μs}\left({\color{lightgreen}-11.271 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.76 \mathrm{ms} \pm 23.5 \mathrm{μs}\left({\color{lightgreen}-6.001 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.06 \mathrm{ms} \pm 22.2 \mathrm{μs}\left({\color{lightgreen}-5.782 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.38 \mathrm{ms} \pm 18.7 \mathrm{μs}\left({\color{gray}-4.171 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.15 \mathrm{ms} \pm 34.3 \mathrm{μs}\left({\color{lightgreen}-5.630 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.57 \mathrm{ms} \pm 19.9 \mathrm{μs}\left({\color{lightgreen}-9.245 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.12 \mathrm{ms} \pm 32.3 \mathrm{μs}\left({\color{gray}-4.557 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.35 \mathrm{ms} \pm 26.4 \mathrm{μs}\left({\color{lightgreen}-8.654 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.51 \mathrm{ms} \pm 23.9 \mathrm{μs}\left({\color{lightgreen}-5.372 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.07 \mathrm{ms} \pm 29.6 \mathrm{μs}\left({\color{lightgreen}-6.050 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.72 \mathrm{ms} \pm 14.7 \mathrm{μs}\left({\color{gray}-3.483 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.58 \mathrm{ms} \pm 20.2 \mathrm{μs}\left({\color{lightgreen}-6.138 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.68 \mathrm{ms} \pm 10.8 \mathrm{μs}\left({\color{lightgreen}-7.039 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.09 \mathrm{ms} \pm 18.4 \mathrm{μs}\left({\color{gray}-4.001 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.80 \mathrm{ms} \pm 18.8 \mathrm{μs}\left({\color{lightgreen}-6.750 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.00 \mathrm{ms} \pm 23.2 \mathrm{μs}\left({\color{lightgreen}-5.097 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.10 \mathrm{ms} \pm 21.1 \mathrm{μs}\left({\color{gray}-3.208 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.77 \mathrm{ms} \pm 16.5 \mathrm{μs}\left({\color{lightgreen}-5.242 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$3.02 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{gray}-2.891 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.40 \mathrm{ms} \pm 23.1 \mathrm{μs}\left({\color{lightgreen}-6.887 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.03 \mathrm{ms} \pm 21.3 \mathrm{μs}\left({\color{lightgreen}-6.084 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.29 \mathrm{ms} \pm 19.8 \mathrm{μs}\left({\color{lightgreen}-8.547 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.37 \mathrm{ms} \pm 23.1 \mathrm{μs}\left({\color{lightgreen}-6.237 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.03 \mathrm{ms} \pm 15.2 \mathrm{μs}\left({\color{lightgreen}-6.356 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.39 \mathrm{ms} \pm 22.3 \mathrm{μs}\left({\color{lightgreen}-6.845 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$55.4 \mathrm{ms} \pm 291 \mathrm{μs}\left({\color{lightgreen}-5.277 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$47.2 \mathrm{ms} \pm 241 \mathrm{μs}\left({\color{gray}-0.674 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$51.6 \mathrm{ms} \pm 315 \mathrm{μs}\left({\color{gray}0.416 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$45.0 \mathrm{ms} \pm 328 \mathrm{μs}\left({\color{gray}-1.871 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$64.4 \mathrm{ms} \pm 362 \mathrm{μs}\left({\color{lightgreen}-6.482 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$62.6 \mathrm{ms} \pm 389 \mathrm{μs}\left({\color{lightgreen}-6.403 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$57.7 \mathrm{ms} \pm 382 \mathrm{μs}\left({\color{gray}-2.713 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$107 \mathrm{ms} \pm 666 \mathrm{μs}\left({\color{lightgreen}-5.312 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$57.9 \mathrm{ms} \pm 3.73 \mathrm{ms}\left({\color{red}15.5 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$273 \mathrm{ms} \pm 884 \mathrm{μs}\left({\color{lightgreen}-6.416 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$19.7 \mathrm{ms} \pm 83.8 \mathrm{μs}\left({\color{lightgreen}-7.933 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$21.1 \mathrm{ms} \pm 115 \mathrm{μs}\left({\color{gray}-4.543 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$21.1 \mathrm{ms} \pm 122 \mathrm{μs}\left({\color{lightgreen}-9.312 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$19.8 \mathrm{ms} \pm 137 \mathrm{μs}\left({\color{lightgreen}-5.764 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$25.8 \mathrm{ms} \pm 132 \mathrm{μs}\left({\color{gray}0.930 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$19.8 \mathrm{ms} \pm 120 \mathrm{μs}\left({\color{lightgreen}-6.055 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$19.7 \mathrm{ms} \pm 116 \mathrm{μs}\left({\color{lightgreen}-11.012 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$19.9 \mathrm{ms} \pm 110 \mathrm{μs}\left({\color{lightgreen}-11.832 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$20.7 \mathrm{ms} \pm 110 \mathrm{μs}\left({\color{lightgreen}-12.104 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$27.4 \mathrm{ms} \pm 195 \mathrm{μs}\left({\color{lightgreen}-8.173 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$35.6 \mathrm{ms} \pm 281 \mathrm{μs}\left({\color{gray}-3.995 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$36.4 \mathrm{ms} \pm 293 \mathrm{μs}\left({\color{gray}-0.610 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$36.5 \mathrm{ms} \pm 312 \mathrm{μs}\left({\color{gray}-0.291 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$35.1 \mathrm{ms} \pm 303 \mathrm{μs}\left({\color{gray}-3.645 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$35.1 \mathrm{ms} \pm 283 \mathrm{μs}\left({\color{gray}1.20 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$34.8 \mathrm{ms} \pm 257 \mathrm{μs}\left({\color{gray}-3.257 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$36.0 \mathrm{ms} \pm 309 \mathrm{μs}\left({\color{gray}-3.506 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$35.6 \mathrm{ms} \pm 276 \mathrm{μs}\left({\color{gray}-1.057 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$35.1 \mathrm{ms} \pm 249 \mathrm{μs}\left({\color{gray}-1.601 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba $$8.89 \mathrm{ms} \pm 61.5 \mathrm{μs}\left({\color{gray}3.13 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$92.9 \mathrm{ms} \pm 414 \mathrm{μs}\left({\color{gray}-2.512 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$148 \mathrm{ms} \pm 770 \mathrm{μs}\left({\color{gray}0.445 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$102 \mathrm{ms} \pm 612 \mathrm{μs}\left({\color{gray}1.86 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$112 \mathrm{ms} \pm 605 \mathrm{μs}\left({\color{gray}0.143 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$119 \mathrm{ms} \pm 582 \mathrm{μs}\left({\color{gray}-2.733 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$127 \mathrm{ms} \pm 636 \mathrm{μs}\left({\color{gray}0.049 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$104 \mathrm{ms} \pm 563 \mathrm{μs}\left({\color{gray}-0.040 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$134 \mathrm{ms} \pm 729 \mathrm{μs}\left({\color{gray}-1.107 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$112 \mathrm{ms} \pm 643 \mathrm{μs}\left({\color{gray}-1.082 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$120 \mathrm{ms} \pm 548 \mathrm{μs}\left({\color{gray}-0.463 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$122 \mathrm{ms} \pm 741 \mathrm{μs}\left({\color{gray}0.216 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$122 \mathrm{ms} \pm 536 \mathrm{μs}\left({\color{gray}-1.748 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$197 \mathrm{ms} \pm 760 \mathrm{μs}\left({\color{red}49.2 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$199 \mathrm{ms} \pm 1.88 \mathrm{ms}\left({\color{red}36.6 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$41.2 \mathrm{ms} \pm 218 \mathrm{μs}\left({\color{gray}-1.483 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$562 \mathrm{ms} \pm 1.05 \mathrm{ms}\left({\color{gray}-2.214 \mathrm{\%}}\right) $$ Flame Graph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

2 participants