Skip to content

BE-851: atlas: remove the single-generation serving layer - #9705

Open
indietyp wants to merge 3 commits into
bm/be-831-hashql-support-type-parameters-in-the-id-macrofrom
bm/be-851-atlas-remove-the-single-generation-serving-layer
Open

indietyp wants to merge 3 commits into
bm/be-831-hashql-support-type-parameters-in-the-id-macrofrom
bm/be-851-atlas-remove-the-single-generation-serving-layer

Conversation

@indietyp

@indietyp indietyp commented Sep 14, 2026

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

Remove the single-generation serving layer from the atlas crate. The layer opens one generation per process and every route, codec and command reads through that one object, so a generation switch is a restart, and a restart drops every in-flight session. The multi-generation runtime replaces the layer whole rather than growing out of it: the new layer takes the module's name and its types collide with the old ones, so the two cannot stand in one crate.

For review, the property this stands on:

  • Nothing outside the deleted modules referenced them. The crate and the graph binary build with the modules gone. Surviving files lose their mod and use lines and the Serve variant of the atlas subcommand (healthcheck stays). Crate-doc lines in lib.rs that linked to deleted items keep their words as plain code spans until the documentation rewrite (BE-856).

🔍 What does this change?

  • serve/: the serving module with its delta consumer, hydration, schedules, visibility cache, density and tests.
  • api/: the HTTP API that read from it.
  • salt/wire/: the wire codecs only that API used.
  • cli/serve and apps/hash-graph: the atlas serve command and its arguments.
  • tests/route_fixture.rs: the route fixture over the deleted API.

⚠️ Breaking Changes & Known Issues

  • Breaking: hash-graph atlas serve no longer exists. The binary fits and publishes generations and serves none until the runtime and its read API land (BE-815).

❓ How to test this?

  1. cargo check -p hash-graph-atlas -p hash-graph --all-features --all-targets builds.
  2. cargo run -p hash-graph -- atlas --help lists no serve subcommand.

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:49pm UTC
petrinaut Ready Ready Preview Sep 15, 2026 2:49pm UTC
petrinaut-docs Ready Ready Preview Sep 15, 2026 2:49pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Sep 15, 2026 2:49pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 14, 2026 13:40 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 14, 2026 13:40 Inactive
@github-actions github-actions Bot added area/apps > hash* Affects HASH (a `hash-*` app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team area/tests New or updated tests area/apps area/apps > hash-graph labels Sep 14, 2026
@indietyp
indietyp deployed to pull-request September 14, 2026 13:41 — with GitHub Actions Active
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.71%. Comparing base (441d22e) to head (a4c187b).

Files with missing lines Patch % Lines
apps/hash-graph/src/subcommand/atlas.rs 0.00% 12 Missing ⚠️
apps/hash-graph/src/subcommand/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                                     Coverage Diff                                      @@
##           bm/be-831-hashql-support-type-parameters-in-the-id-macro    #9705      +/-   ##
============================================================================================
- Coverage                                                     69.31%   65.71%   -3.60%     
============================================================================================
  Files                                                          1384     1712     +328     
  Lines                                                        133488   182323   +48835     
  Branches                                                       6723     7529     +806     
============================================================================================
+ Hits                                                          92527   119816   +27289     
- Misses                                                        39824    61086   +21262     
- Partials                                                       1137     1421     +284     
Flag Coverage Δ
apps.hash-ai-worker-ts 1.99% <ø> (ø)
apps.hash-api 15.35% <ø> (ø)
apps.hash-graph 13.62% <0.00%> (+1.08%) ⬆️
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.21% <ø> (?)
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.92% <ø> (+0.56%) ⬆️
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 78.92% <ø> (ø)
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.

@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: remove the single-generation atlas serving layer BE-851: atlas: remove the single-generation serving layer Sep 14, 2026
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 14, 2026 14:44 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 14, 2026 14:44 Inactive
@indietyp
indietyp force-pushed the bm/be-851-atlas-remove-the-single-generation-serving-layer branch from 21ca29f to 8fe7b04 Compare September 14, 2026 15:39
@codspeed

codspeed Bot commented Sep 14, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 18.95%

⚠️ 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

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 2 improved benchmarks
✅ 96 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
bit_matrix/dense/iter_row[64] 166.4 ns 137.2 ns +21.26%
bit_matrix/dense/iter_row[200] 203.9 ns 174.7 ns +16.69%
⚠️ 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

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing bm/be-851-atlas-remove-the-single-generation-serving-layer (474d97e) with bm/be-831-hashql-support-type-parameters-in-the-id-macro (13dcca9)

Open in CodSpeed

@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 14, 2026 15:55 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 14, 2026 15:55 Inactive
@indietyp
indietyp marked this pull request as ready for review September 14, 2026 15:55
@indietyp
indietyp requested a review from a team as a code owner September 14, 2026 15:55
Copilot AI balanced review requested due to automatic review settings September 14, 2026 15:55
@cursor

cursor Bot commented Sep 14, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Deletes the production Atlas read API and hash-graph atlas serve entirely; nothing serves generations until the BE-815 replacement lands, and the change touches auth, visibility, and delta placement behavior by removal.

Overview
Removes the entire single-generation Atlas serving stack from hash-graph-atlas and the graph binary, ahead of the multi-generation runtime (BE-815). The deleted surface includes the serve module (delta consumer, visibility cache, hydration, schedules), the full api/ HTTP read API (manifest, tile, edges, locate, translate, OpenAPI, authority tokens), salt/wire codecs used only by that API, and cli/serve.

hash-graph atlas no longer exposes serve: the subcommand is reduced to fit and healthcheck, with the large Postgres pool / auth / Temporal / lifecycle wiring removed from apps/hash-graph/src/subcommand/atlas.rs. atlas no longer takes a Telemetry argument.

Build and tooling housekeeping: workspace [workspace.lints.cargo] temporarily allows unused dependencies (BE-850); the atlas crate adds matching #![allow(...)] for dead code and broken doc links until the stack lands. @rust/hash-graph-atlas drops the test:integration script and Turbo task entry.

Docs in lib.rs still mention serve / api as plain code spans until BE-856.

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

Copilot 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Temporarily suppress lints in hash-graph-atlas to facilitate refactoring
under BE-850. Replace specific dead-code handling with broader allowlist
during consolidation work.
@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 $$21.1 \mathrm{ms} \pm 150 \mathrm{μs}\left({\color{red}6.77 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.66 \mathrm{ms} \pm 16.3 \mathrm{μs}\left({\color{gray}-1.526 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$11.0 \mathrm{ms} \pm 73.3 \mathrm{μs}\left({\color{red}12.9 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$34.4 \mathrm{ms} \pm 274 \mathrm{μs}\left({\color{gray}0.569 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$11.3 \mathrm{ms} \pm 117 \mathrm{μs}\left({\color{gray}0.368 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$19.4 \mathrm{ms} \pm 137 \mathrm{μs}\left({\color{gray}1.97 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$20.9 \mathrm{ms} \pm 151 \mathrm{μs}\left({\color{gray}2.55 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.96 \mathrm{ms} \pm 16.5 \mathrm{μs}\left({\color{gray}3.34 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$10.7 \mathrm{ms} \pm 96.1 \mathrm{μs}\left({\color{gray}2.36 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$2.88 \mathrm{ms} \pm 15.2 \mathrm{μs}\left({\color{gray}-1.079 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.30 \mathrm{ms} \pm 13.2 \mathrm{μs}\left({\color{gray}0.684 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$2.60 \mathrm{ms} \pm 15.2 \mathrm{μs}\left({\color{gray}0.710 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$4.00 \mathrm{ms} \pm 29.6 \mathrm{μs}\left({\color{gray}1.86 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.72 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{gray}0.348 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$3.16 \mathrm{ms} \pm 18.1 \mathrm{μs}\left({\color{gray}-0.139 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$3.37 \mathrm{ms} \pm 18.7 \mathrm{μs}\left({\color{gray}-0.535 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.67 \mathrm{ms} \pm 19.6 \mathrm{μs}\left({\color{gray}1.39 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.15 \mathrm{ms} \pm 16.8 \mathrm{μs}\left({\color{gray}1.38 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.10 \mathrm{ms} \pm 10.0 \mathrm{μs}\left({\color{gray}0.500 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.05 \mathrm{ms} \pm 10.0 \mathrm{μs}\left({\color{gray}-0.111 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.17 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{gray}0.058 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.34 \mathrm{ms} \pm 8.73 \mathrm{μs}\left({\color{gray}-0.559 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.23 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{gray}2.14 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.45 \mathrm{ms} \pm 11.9 \mathrm{μs}\left({\color{gray}-0.346 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.36 \mathrm{ms} \pm 9.66 \mathrm{μs}\left({\color{gray}-0.075 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.14 \mathrm{ms} \pm 10.2 \mathrm{μs}\left({\color{gray}0.659 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$2.26 \mathrm{ms} \pm 10.7 \mathrm{μs}\left({\color{gray}0.025 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$2.70 \mathrm{ms} \pm 18.6 \mathrm{μs}\left({\color{gray}0.527 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.34 \mathrm{ms} \pm 9.09 \mathrm{μs}\left({\color{gray}-0.536 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$2.55 \mathrm{ms} \pm 14.2 \mathrm{μs}\left({\color{gray}-0.049 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$2.61 \mathrm{ms} \pm 11.7 \mathrm{μs}\left({\color{gray}-0.714 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.35 \mathrm{ms} \pm 11.3 \mathrm{μs}\left({\color{gray}0.225 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$2.52 \mathrm{ms} \pm 14.4 \mathrm{μs}\left({\color{gray}-0.789 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$24.1 \mathrm{ms} \pm 121 \mathrm{μs}\left({\color{gray}-0.796 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$53.5 \mathrm{ms} \pm 422 \mathrm{μs}\left({\color{gray}2.78 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$27.1 \mathrm{ms} \pm 199 \mathrm{μs}\left({\color{gray}-0.658 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$29.7 \mathrm{ms} \pm 214 \mathrm{μs}\left({\color{gray}0.861 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$32.2 \mathrm{ms} \pm 224 \mathrm{μs}\left({\color{gray}0.877 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$25.4 \mathrm{ms} \pm 141 \mathrm{μs}\left({\color{gray}-1.300 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$312 \mathrm{ms} \pm 858 \mathrm{μs}\left({\color{gray}4.51 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$69.4 \mathrm{ms} \pm 482 \mathrm{μs}\left({\color{gray}-2.001 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$53.7 \mathrm{ms} \pm 370 \mathrm{μs}\left({\color{gray}-1.452 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$213 \mathrm{ms} \pm 675 \mathrm{μs}\left({\color{gray}0.623 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$7.87 \mathrm{ms} \pm 48.3 \mathrm{μs}\left({\color{gray}0.201 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$7.99 \mathrm{ms} \pm 45.5 \mathrm{μs}\left({\color{gray}0.525 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$8.06 \mathrm{ms} \pm 44.9 \mathrm{μs}\left({\color{gray}0.396 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$7.89 \mathrm{ms} \pm 35.1 \mathrm{μs}\left({\color{gray}-0.092 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$8.19 \mathrm{ms} \pm 51.0 \mathrm{μs}\left({\color{gray}1.98 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$7.96 \mathrm{ms} \pm 42.4 \mathrm{μs}\left({\color{gray}1.09 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$8.16 \mathrm{ms} \pm 51.4 \mathrm{μs}\left({\color{gray}2.75 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$8.13 \mathrm{ms} \pm 41.9 \mathrm{μs}\left({\color{gray}1.72 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$7.99 \mathrm{ms} \pm 42.8 \mathrm{μs}\left({\color{gray}0.881 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$8.25 \mathrm{ms} \pm 46.9 \mathrm{μs}\left({\color{gray}0.448 \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 $$8.30 \mathrm{ms} \pm 41.9 \mathrm{μs}\left({\color{gray}0.373 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$8.46 \mathrm{ms} \pm 60.4 \mathrm{μs}\left({\color{gray}2.80 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$8.29 \mathrm{ms} \pm 51.3 \mathrm{μs}\left({\color{gray}0.621 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$8.43 \mathrm{ms} \pm 50.0 \mathrm{μs}\left({\color{gray}3.06 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$8.31 \mathrm{ms} \pm 47.4 \mathrm{μs}\left({\color{gray}1.55 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$8.35 \mathrm{ms} \pm 70.0 \mathrm{μs}\left({\color{gray}-0.638 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$8.28 \mathrm{ms} \pm 47.2 \mathrm{μs}\left({\color{gray}1.55 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$8.17 \mathrm{ms} \pm 42.9 \mathrm{μs}\left({\color{gray}-0.171 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$8.55 \mathrm{ms} \pm 47.6 \mathrm{μs}\left({\color{gray}4.12 \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 $$6.07 \mathrm{ms} \pm 30.3 \mathrm{μs}\left({\color{gray}1.40 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$47.4 \mathrm{ms} \pm 258 \mathrm{μs}\left({\color{gray}4.61 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$84.5 \mathrm{ms} \pm 459 \mathrm{μs}\left({\color{gray}-0.210 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$52.3 \mathrm{ms} \pm 403 \mathrm{μs}\left({\color{gray}3.38 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$58.0 \mathrm{ms} \pm 417 \mathrm{μs}\left({\color{gray}0.145 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$64.7 \mathrm{ms} \pm 351 \mathrm{μs}\left({\color{gray}0.345 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$68.4 \mathrm{ms} \pm 373 \mathrm{μs}\left({\color{gray}-0.074 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$35.7 \mathrm{ms} \pm 252 \mathrm{μs}\left({\color{gray}1.38 \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 $$56.3 \mathrm{ms} \pm 344 \mathrm{μs}\left({\color{gray}-0.699 \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 $$40.4 \mathrm{ms} \pm 290 \mathrm{μs}\left({\color{gray}0.453 \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 $$47.2 \mathrm{ms} \pm 254 \mathrm{μs}\left({\color{gray}1.03 \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 $$49.2 \mathrm{ms} \pm 246 \mathrm{μs}\left({\color{gray}1.12 \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 $$48.8 \mathrm{ms} \pm 232 \mathrm{μs}\left({\color{gray}0.796 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$95.7 \mathrm{ms} \pm 403 \mathrm{μs}\left({\color{red}5.85 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$104 \mathrm{ms} \pm 364 \mathrm{μs}\left({\color{red}5.21 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$17.4 \mathrm{ms} \pm 85.8 \mathrm{μs}\left({\color{gray}-1.043 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$416 \mathrm{ms} \pm 739 \mathrm{μs}\left({\color{gray}-0.170 \mathrm{\%}}\right) $$ Flame Graph

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

Labels

area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-graph area/apps area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

2 participants