Skip to content

BE-844: atlas: typed artifact files, atomic generation publication and validated fit options - #9708

Open
indietyp wants to merge 2 commits into
bm/be-857-atlas-take-validated-scalars-as-math-operandsfrom
bm/be-844-atlas-typed-artifact-files-atomic-generation-publication-and
Open

indietyp wants to merge 2 commits into
bm/be-857-atlas-take-validated-scalars-as-math-operandsfrom
bm/be-844-atlas-typed-artifact-files-atomic-generation-publication-and

Conversation

@indietyp

@indietyp indietyp commented Sep 14, 2026

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

Type the atlas file layer, publish a generation atomically, and validate fit options once at the boundary. Depth, tile zoom and artifact identity travel as untyped integers and strings through the file layer, so every reader re-derives the same facts and a mismatch shows up at runtime. Each artifact format opens through its own function with its own error shape. A generation assembles in place, so a reader can open a half-written one, and activation and removal race each other. Fit and policy parameters arrive as loose values that each consumer validates on use.

For review, the properties this stands on:

  • A generation is visible under the root only once it is complete: it assembles in a staging directory and publishes atomically when sealed.
  • Activation and removal serialize through a root lock, so a removal cannot delete the generation an activation is about to name. Readers hold no lock.
  • One open contract covers every artifact format, typed per artifact, with one error type per format.
  • Options and their validated configurations are separate types, and the conversion happens once.

🔍 What does this change?

  • file/: depth and zoom as newtypes that serialize, and a Morton tile that carries its zoom. One open contract covers every artifact format, typed per artifact, with one error type per format.
  • file/generation/: the staging, seal, activate and remove root under its lock.
  • salt/fit, salt/policy, salt/projector/train: fit, solver, training-schedule and policy options separate from their validated configurations, converting once at the boundary.
  • An offload handle for blocking computation that is a future.
  • libs/@local/hashql/core/src/id/: IdSlice's raw views read a field instead of casting through a pointer, so they are usable in const; IdVec gains drain, and the boxed clone paths get tests.
  • Cargo.toml: hashbrown and tokio-util added, tokio gains time, serde_json gains raw_value, and the workspace pins move schemars to 1.2.2 and serde to 1.0.229.
  • README.md and docs/wire.md follow the typed file layer.

❓ How to test this?

  1. cargo nextest run -p hash-graph-atlas --all-features file:: runs the file-layer tests, including the staging and lock tests under file/generation.
  2. Run a fit; the generation directory exists under the root only after the seal, and never as a partial tree.

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

@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
hash Ready Ready Preview Sep 15, 2026 2:50pm UTC
petrinaut Ready Ready Preview Sep 15, 2026 2:50pm UTC
petrinaut-docs Ready Ready Preview Sep 15, 2026 2:50pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Sep 15, 2026 2:50pm UTC

Request Review

@github-actions github-actions Bot added 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 labels Sep 14, 2026
@indietyp
indietyp deployed to pull-request September 14, 2026 13:41 — with GitHub Actions Active
@indietyp
indietyp deployed to pull-request September 14, 2026 13:41 — with GitHub Actions Active
Comment thread libs/@local/graph/atlas/src/file/generation/staging.rs
Comment thread libs/@local/graph/atlas/src/file/generation/staging.rs
Comment thread libs/@local/graph/atlas/src/file/generation/scratch.rs
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.24865% with 580 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.58%. Comparing base (4e692d0) to head (0b46e48).

Files with missing lines Patch % Lines
...bs/@local/graph/atlas/src/file/generation/error.rs 17.50% 66 Missing ⚠️
...@local/graph/atlas/src/salt/runner/operator/mod.rs 0.00% 65 Missing ⚠️
libs/@local/graph/atlas/src/morton/mod.rs 58.38% 62 Missing ⚠️
...local/graph/atlas/src/salt/fit/prepare/identity.rs 44.44% 35 Missing ⚠️
libs/@local/graph/atlas/src/cli/shell.rs 2.85% 34 Missing ⚠️
libs/@local/graph/atlas/src/file/array/read.rs 36.36% 27 Missing and 1 partial ⚠️
...al/graph/atlas/src/salt/projector/train/refresh.rs 0.00% 28 Missing ⚠️
libs/@local/graph/atlas/src/identity/column.rs 0.00% 27 Missing ⚠️
...s/@local/graph/atlas/src/salt/postings/artifact.rs 0.00% 22 Missing ⚠️
.../@local/graph/atlas/src/salt/adjacency/artifact.rs 0.00% 21 Missing ⚠️
... and 36 more
Additional details and impacted files
@@                                     Coverage Diff                                     @@
##           bm/be-857-atlas-take-validated-scalars-as-math-operands    #9708      +/-   ##
===========================================================================================
- Coverage                                                    74.70%   67.58%   -7.12%     
===========================================================================================
  Files                                                          782     1576     +794     
  Lines                                                        86834   177558   +90724     
  Branches                                                      3627     6318    +2691     
===========================================================================================
+ Hits                                                         64869   120005   +55136     
- Misses                                                       21283    56157   +34874     
- Partials                                                       682     1396     +714     
Flag Coverage Δ
apps.hash-ai-worker-ts ?
apps.hash-api 15.35% <ø> (?)
apps.hash-graph 13.62% <ø> (ø)
blockprotocol.type-system 38.15% <ø> (?)
local.claude-hooks 0.00% <ø> (?)
local.harpc-client 51.49% <ø> (?)
local.hash-backend-utils 3.27% <ø> (?)
local.hash-graph-sdk 10.02% <ø> (ø)
local.hash-isomorphic-utils 12.22% <ø> (?)
rust.antsi 2.36% <ø> (?)
rust.error-stack 90.81% <ø> (?)
rust.harpc-codec 84.70% <ø> (?)
rust.harpc-net 96.24% <ø> (?)
rust.harpc-tower 67.03% <ø> (?)
rust.harpc-types 0.00% <ø> (?)
rust.harpc-wire-protocol 92.23% <ø> (?)
rust.hash-codec 72.76% <ø> (?)
rust.hash-config 81.14% <ø> (?)
rust.hash-graph-api 19.71% <ø> (?)
rust.hash-graph-atlas 80.60% <63.63%> (-0.62%) ⬇️
rust.hash-graph-authentication 96.02% <ø> (?)
rust.hash-graph-authorization 63.14% <ø> (?)
rust.hash-graph-embeddings 91.88% <ø> (?)
rust.hash-graph-postgres-store 32.15% <ø> (?)
rust.hash-graph-store 48.41% <ø> (?)
rust.hash-graph-temporal-versioning 50.18% <ø> (?)
rust.hash-graph-types 0.00% <ø> (?)
rust.hash-graph-validation 84.71% <ø> (?)
rust.hash-middleware 90.92% <ø> (?)
rust.hashql-ast 89.63% <ø> (ø)
rust.hashql-compiletest 28.39% <ø> (ø)
rust.hashql-core 79.03% <100.00%> (+0.11%) ⬆️
rust.hashql-diagnostics 72.51% <ø> (?)
rust.hashql-eval 79.82% <ø> (?)
rust.hashql-hir 89.09% <ø> (ø)
rust.hashql-mir 87.92% <ø> (?)
rust.hashql-syntax-jexpr 94.04% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clippy found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@codspeed-hq

codspeed-hq Bot commented Sep 14, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 6 benchmarks measured no execution time

Nothing ran under measurement, usually because the compiler removed the code under test. These results are not comparable, so they count as unchanged.

Preventing compiler optimizations

✅ 98 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚠️ as_constant < 1 ns < 1 ns N/A
⚠️ constant_equal < 1 ns < 1 ns N/A
⚠️ constant_not_equal < 1 ns < 1 ns N/A
⚠️ access < 1 ns < 1 ns N/A
⚠️ runtime_equal < 1 ns < 1 ns N/A
⚠️ runtime_not_equal < 1 ns < 1 ns N/A

Comparing bm/be-844-atlas-typed-artifact-files-atomic-generation-publication-and (5316321) with main (ead965d)1

Open in CodSpeed

Footnotes

  1. No successful run was found on bm/be-857-atlas-take-validated-scalars-as-math-operands (1cddf83) during the generation of this report, so main (ead965d) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@indietyp
indietyp added this pull request to stack #9714 September 14, 2026 13:56
@indietyp indietyp self-assigned this Sep 14, 2026
@indietyp indietyp changed the title refactor: typed atlas artifact files, atomic generation root, options BE-844: atlas: typed artifact files, atomic generation publication and validated fit options Sep 14, 2026
@indietyp
indietyp force-pushed the bm/be-844-atlas-typed-artifact-files-atomic-generation-publication-and branch from efdb4fc to 274e977 Compare September 14, 2026 14:44
@indietyp
indietyp force-pushed the bm/be-844-atlas-typed-artifact-files-atomic-generation-publication-and branch from 274e977 to 55d40a9 Compare September 14, 2026 15:39

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread libs/@local/graph/atlas/src/file/generation/mod.rs

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 5fae1ae. Configure here.

Comment thread libs/@local/graph/atlas/src/file/generation/mod.rs
@github-actions

Copy link
Copy Markdown
Contributor

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 $$27.8 \mathrm{ms} \pm 223 \mathrm{μs}\left({\color{gray}-2.004 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.48 \mathrm{ms} \pm 25.0 \mathrm{μs}\left({\color{gray}0.853 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$13.6 \mathrm{ms} \pm 103 \mathrm{μs}\left({\color{gray}1.59 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$44.5 \mathrm{ms} \pm 426 \mathrm{μs}\left({\color{gray}0.970 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.1 \mathrm{ms} \pm 137 \mathrm{μs}\left({\color{gray}0.036 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$24.8 \mathrm{ms} \pm 189 \mathrm{μs}\left({\color{gray}-1.280 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$29.1 \mathrm{ms} \pm 238 \mathrm{μs}\left({\color{gray}0.633 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.84 \mathrm{ms} \pm 26.0 \mathrm{μs}\left({\color{gray}2.50 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$15.2 \mathrm{ms} \pm 124 \mathrm{μs}\left({\color{gray}3.31 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.78 \mathrm{ms} \pm 26.9 \mathrm{μs}\left({\color{gray}-1.410 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.00 \mathrm{ms} \pm 19.2 \mathrm{μs}\left({\color{gray}-0.614 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.37 \mathrm{ms} \pm 20.5 \mathrm{μs}\left({\color{gray}-1.447 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.28 \mathrm{ms} \pm 39.2 \mathrm{μs}\left({\color{gray}-1.423 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.56 \mathrm{ms} \pm 19.9 \mathrm{μs}\left({\color{gray}-3.270 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.27 \mathrm{ms} \pm 42.6 \mathrm{μs}\left({\color{gray}0.137 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.46 \mathrm{ms} \pm 36.1 \mathrm{μs}\left({\color{gray}-0.618 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.43 \mathrm{ms} \pm 22.3 \mathrm{μs}\left({\color{gray}-1.005 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.24 \mathrm{ms} \pm 30.8 \mathrm{μs}\left({\color{gray}-0.525 \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 17.0 \mathrm{μs}\left({\color{gray}-0.037 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.65 \mathrm{ms} \pm 15.7 \mathrm{μs}\left({\color{gray}-0.839 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.78 \mathrm{ms} \pm 17.3 \mathrm{μs}\left({\color{gray}-1.322 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.07 \mathrm{ms} \pm 20.2 \mathrm{μs}\left({\color{gray}0.234 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.87 \mathrm{ms} \pm 18.0 \mathrm{μs}\left({\color{gray}-0.092 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.16 \mathrm{ms} \pm 18.3 \mathrm{μs}\left({\color{gray}0.484 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.17 \mathrm{ms} \pm 24.9 \mathrm{μs}\left({\color{gray}1.67 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.82 \mathrm{ms} \pm 15.7 \mathrm{μs}\left({\color{gray}1.50 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$3.03 \mathrm{ms} \pm 21.3 \mathrm{μs}\left({\color{gray}0.919 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.60 \mathrm{ms} \pm 24.0 \mathrm{μs}\left({\color{gray}1.66 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.07 \mathrm{ms} \pm 21.1 \mathrm{μs}\left({\color{gray}0.391 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.37 \mathrm{ms} \pm 24.3 \mathrm{μs}\left({\color{gray}2.10 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.48 \mathrm{ms} \pm 24.1 \mathrm{μs}\left({\color{gray}-0.391 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.12 \mathrm{ms} \pm 17.4 \mathrm{μs}\left({\color{gray}1.36 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.45 \mathrm{ms} \pm 34.4 \mathrm{μs}\left({\color{gray}3.32 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$32.1 \mathrm{ms} \pm 186 \mathrm{μs}\left({\color{gray}-2.849 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$70.5 \mathrm{ms} \pm 512 \mathrm{μs}\left({\color{red}29.6 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$35.3 \mathrm{ms} \pm 280 \mathrm{μs}\left({\color{gray}-4.490 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$39.0 \mathrm{ms} \pm 236 \mathrm{μs}\left({\color{lightgreen}-6.980 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$43.4 \mathrm{ms} \pm 299 \mathrm{μs}\left({\color{gray}1.04 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$33.7 \mathrm{ms} \pm 232 \mathrm{μs}\left({\color{gray}-2.578 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$414 \mathrm{ms} \pm 1.75 \mathrm{ms}\left({\color{red}64.6 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$85.9 \mathrm{ms} \pm 608 \mathrm{μs}\left({\color{lightgreen}-6.646 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$78.8 \mathrm{ms} \pm 441 \mathrm{μs}\left({\color{lightgreen}-10.796 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$274 \mathrm{ms} \pm 1.15 \mathrm{ms}\left({\color{lightgreen}-10.700 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$10.2 \mathrm{ms} \pm 67.9 \mathrm{μs}\left({\color{gray}-1.649 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$10.4 \mathrm{ms} \pm 89.8 \mathrm{μs}\left({\color{gray}0.152 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$10.5 \mathrm{ms} \pm 83.1 \mathrm{μs}\left({\color{gray}-0.666 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$10.5 \mathrm{ms} \pm 85.7 \mathrm{μs}\left({\color{gray}0.139 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$10.7 \mathrm{ms} \pm 84.9 \mathrm{μs}\left({\color{gray}0.928 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$10.5 \mathrm{ms} \pm 89.6 \mathrm{μs}\left({\color{gray}0.548 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$10.4 \mathrm{ms} \pm 73.1 \mathrm{μs}\left({\color{lightgreen}-7.461 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$10.7 \mathrm{ms} \pm 82.6 \mathrm{μs}\left({\color{gray}-0.507 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$10.6 \mathrm{ms} \pm 71.4 \mathrm{μs}\left({\color{gray}-0.664 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$11.1 \mathrm{ms} \pm 88.3 \mathrm{μs}\left({\color{gray}0.289 \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 $$10.8 \mathrm{ms} \pm 73.4 \mathrm{μs}\left({\color{gray}-0.956 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$11.1 \mathrm{ms} \pm 63.3 \mathrm{μs}\left({\color{gray}-1.157 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$10.7 \mathrm{ms} \pm 87.9 \mathrm{μs}\left({\color{gray}-2.088 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$11.0 \mathrm{ms} \pm 87.1 \mathrm{μs}\left({\color{lightgreen}-5.121 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$10.8 \mathrm{ms} \pm 73.9 \mathrm{μs}\left({\color{gray}-0.952 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$10.8 \mathrm{ms} \pm 72.7 \mathrm{μs}\left({\color{gray}-2.361 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$11.0 \mathrm{ms} \pm 82.3 \mathrm{μs}\left({\color{gray}0.993 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$10.6 \mathrm{ms} \pm 80.8 \mathrm{μs}\left({\color{gray}-3.473 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$10.9 \mathrm{ms} \pm 81.1 \mathrm{μs}\left({\color{gray}-2.997 \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 $$7.90 \mathrm{ms} \pm 49.9 \mathrm{μs}\left({\color{gray}-2.034 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$58.1 \mathrm{ms} \pm 456 \mathrm{μs}\left({\color{gray}-1.391 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$109 \mathrm{ms} \pm 618 \mathrm{μs}\left({\color{gray}-0.805 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$64.3 \mathrm{ms} \pm 403 \mathrm{μs}\left({\color{gray}-1.221 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$73.5 \mathrm{ms} \pm 551 \mathrm{μs}\left({\color{gray}0.284 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$81.0 \mathrm{ms} \pm 465 \mathrm{μs}\left({\color{gray}-2.060 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$88.3 \mathrm{ms} \pm 555 \mathrm{μs}\left({\color{gray}-1.935 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$46.6 \mathrm{ms} \pm 281 \mathrm{μs}\left({\color{gray}-1.470 \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 $$74.9 \mathrm{ms} \pm 461 \mathrm{μs}\left({\color{gray}-1.955 \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 $$53.0 \mathrm{ms} \pm 340 \mathrm{μs}\left({\color{gray}-2.279 \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 $$61.5 \mathrm{ms} \pm 445 \mathrm{μs}\left({\color{gray}-3.004 \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 $$63.7 \mathrm{ms} \pm 401 \mathrm{μs}\left({\color{gray}-3.995 \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 $$63.8 \mathrm{ms} \pm 426 \mathrm{μs}\left({\color{gray}-3.816 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$112 \mathrm{ms} \pm 505 \mathrm{μs}\left({\color{gray}1.17 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$124 \mathrm{ms} \pm 650 \mathrm{μs}\left({\color{gray}0.341 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$18.0 \mathrm{ms} \pm 134 \mathrm{μs}\left({\color{lightgreen}-17.591 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$526 \mathrm{ms} \pm 1.38 \mathrm{ms}\left({\color{red}5.85 \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.

3 participants