Skip to content

BE-849: atlas: response documents and authorization - #9713

Open
indietyp wants to merge 1 commit into
bm/be-848-atlas-visibility-resolution-and-the-request-scenefrom
bm/be-849-atlas-response-documents-and-authorization
Open

indietyp wants to merge 1 commit into
bm/be-848-atlas-visibility-resolution-and-the-request-scenefrom
bm/be-849-atlas-response-documents-and-authorization

Conversation

@indietyp

@indietyp indietyp commented Sep 14, 2026

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

Add the response documents and the authorization that guards them. Every document type (tile, edges, locate, translate, manifest) builds from one captured Scene, encodes through one codec layer into the saltile envelope, and the envelope records its own content type. Authority tokens bind a request to the actor, the requested generation and the DeltaId, so a token from a retired lifetime refuses uniformly.

The module stays dead code under the lib.rs attribute until the read API consumes it (BE-815). api::problem, the problem-type vocabulary the API returns, arrives here for the same reason and under the same attribute.

For review, the properties this stands on:

  • Every response comes from one snapshot: a document reads only its Scene.
  • Authority validation binds the generation and the DeltaId, never a DeltaRevision; renewal on the same filter keeps its offset, and a changed filter rebinds.
  • Authority-token expiry, visibility-cache age and retained-generation admission are distinct checks even when the host derives them from one maximum duration.
  • The saltile envelope carries its content type, so the API returns what the document says it is.

🔍 What does this change?

  • serve/document/: the Document trait and the tile, edges, locate, translate and manifest documents, each with its codec.
  • serve/document/codec/: the column and CBOR codecs and the saltile envelope.
  • serve/authorization/: Authority, EncryptedToken, Scope with its lease, and the archived actor identities a token carries.
  • api/problem.rs: the problem types.
  • serve/tests: the delta pipeline's end-to-end tests over the documents.

❓ How to test this?

  1. cargo nextest run -p hash-graph-atlas --all-features serve::document:: serve::authorization:: runs the document, codec and token tests.
  2. Reading order: serve/document/mod.rs for the trait, then serve/authorization/mod.rs.

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

Request Review

@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 14, 2026 13:41 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 14, 2026 13:41 Inactive
@github-actions github-actions Bot added 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:42 — with GitHub Actions Active

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

@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.19246% with 359 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.93%. Comparing base (a2a97b2) to head (fc4e80c).

Files with missing lines Patch % Lines
libs/@local/graph/atlas/src/api/problem.rs 55.87% 154 Missing ⚠️
...l/graph/atlas/src/serve/authorization/authority.rs 0.00% 89 Missing ⚠️
...local/graph/atlas/src/serve/authorization/actor.rs 0.00% 28 Missing ⚠️
...al/graph/atlas/src/serve/document/translate/mod.rs 80.00% 12 Missing and 2 partials ⚠️
...ph/atlas/src/serve/document/translate/codec/mod.rs 52.00% 12 Missing ⚠️
.../graph/atlas/src/serve/document/locate/subgraph.rs 97.33% 6 Missing and 4 partials ⚠️
...local/graph/atlas/src/serve/authorization/error.rs 0.00% 9 Missing ⚠️
...local/graph/atlas/src/serve/authorization/scope.rs 78.57% 9 Missing ⚠️
...local/graph/atlas/src/serve/authorization/token.rs 43.75% 9 Missing ⚠️
...@local/graph/atlas/src/serve/document/edges/mod.rs 92.80% 9 Missing ⚠️
... and 2 more
Additional details and impacted files
@@                                       Coverage Diff                                       @@
##           bm/be-848-atlas-visibility-resolution-and-the-request-scene    #9713      +/-   ##
===============================================================================================
+ Coverage                                                        73.60%   73.93%   +0.32%     
===============================================================================================
  Files                                                             1423     1446      +23     
  Lines                                                           142238   144254    +2016     
  Branches                                                          6025     6064      +39     
===============================================================================================
+ Hits                                                            104696   106652    +1956     
- Misses                                                           36250    36308      +58     
- Partials                                                          1292     1294       +2     
Flag Coverage Δ
apps.hash-graph 13.62% <ø> (ø)
rust.hash-graph-atlas 81.70% <82.19%> (+0.63%) ⬆️

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 feat: add atlas response documents and authorization BE-849: atlas: response documents and authorization Sep 14, 2026
@indietyp
indietyp force-pushed the bm/be-849-atlas-response-documents-and-authorization branch from dc7f2e9 to 9fd8566 Compare September 14, 2026 14:44
@indietyp
indietyp marked this pull request as ready for review September 14, 2026 15:04
Copilot AI balanced review requested due to automatic review settings September 14, 2026 15:04
@cursor

cursor Bot commented Sep 14, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Adds cryptographic authority tokens and a broad client-visible error/auth mapping layer; mistakes in sealing, expiry, or problem redaction directly affect security and API behavior.

Overview
Introduces the Atlas read-path foundations that sit ahead of HTTP routes: a shared RFC 9457 error surface and actor-bound authority tokens, plus the binary/JSON document codecs response bodies will use.

api/problem defines Surface v1 problem types (/problems/atlas/*), maps handler and middleware failures (documents, visibility, auth, rate limits) into application/problem+json, redacts internal errors while logging full reports, and adds a Tower layer to turn Result errors into problem responses. The api module is wired in lib.rs but marked dead until the route layer lands.

serve/authorization seals a fixed scope (generation, delta lifetime, actor, optional filter digest, delivery zoom k) into reusable XChaCha20-Poly1305 tokens with HKDF-derived keys; verification binds actor/generation/delta before expiry, and current vs continuity scope views separate data admission from renewal.

serve/document/codec adds the saltile v1 envelope (magic kind, slot directory, 8-byte padding), CBOR and little-endian column writers, and encoders such as CurrentDocument JSON and EdgesResponseSALTILEE (HEAD map + source/target/identity columns + optional hydrated trailer).

serve/delta/tests adds a large integration suite over withdrawals, schedules, walks, and locate behavior against captured scenes.

Reviewed by Cursor Bugbot for commit 8dfe578. 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.

@indietyp
indietyp force-pushed the bm/be-849-atlas-response-documents-and-authorization branch 2 times, most recently from 5b22cb2 to b48c3b9 Compare September 14, 2026 21:05
@indietyp
indietyp force-pushed the bm/be-849-atlas-response-documents-and-authorization branch from b48c3b9 to 6b934dc Compare September 15, 2026 08:17
@indietyp
indietyp force-pushed the bm/be-849-atlas-response-documents-and-authorization branch from 6b934dc to fc4e80c Compare September 15, 2026 13:57
@indietyp
indietyp force-pushed the bm/be-849-atlas-response-documents-and-authorization branch from fc4e80c to b77564e Compare September 15, 2026 14:18
@indietyp
indietyp removed this pull request from stack #9714 September 15, 2026 14:38
@indietyp
indietyp requested a review from a team as a code owner September 15, 2026 14:38
@indietyp
indietyp force-pushed the bm/be-849-atlas-response-documents-and-authorization branch from b77564e to 8dfe578 Compare September 15, 2026 14:38
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 15, 2026 14:38 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 15, 2026 14:38 Inactive
@indietyp
indietyp added this pull request to stack #9738 September 15, 2026 14:39
@indietyp
indietyp deployed to pull-request September 15, 2026 14:39 — with GitHub Actions Active
@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 $$28.5 \mathrm{ms} \pm 258 \mathrm{μs}\left({\color{gray}-0.912 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.62 \mathrm{ms} \pm 29.5 \mathrm{μs}\left({\color{gray}-0.992 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$13.8 \mathrm{ms} \pm 145 \mathrm{μs}\left({\color{gray}-4.279 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$46.3 \mathrm{ms} \pm 457 \mathrm{μs}\left({\color{gray}-0.106 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.3 \mathrm{ms} \pm 135 \mathrm{μs}\left({\color{gray}-3.961 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$26.0 \mathrm{ms} \pm 298 \mathrm{μs}\left({\color{gray}-1.119 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$29.5 \mathrm{ms} \pm 248 \mathrm{μs}\left({\color{gray}-2.100 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.93 \mathrm{ms} \pm 30.8 \mathrm{μs}\left({\color{gray}-2.269 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$15.2 \mathrm{ms} \pm 133 \mathrm{μs}\left({\color{gray}-0.410 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$4.14 \mathrm{ms} \pm 34.5 \mathrm{μs}\left({\color{gray}4.99 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.20 \mathrm{ms} \pm 22.8 \mathrm{μs}\left({\color{red}5.14 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.56 \mathrm{ms} \pm 28.8 \mathrm{μs}\left({\color{red}5.27 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.50 \mathrm{ms} \pm 43.6 \mathrm{μs}\left({\color{gray}1.78 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.66 \mathrm{ms} \pm 35.3 \mathrm{μs}\left({\color{gray}-2.038 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.38 \mathrm{ms} \pm 32.8 \mathrm{μs}\left({\color{gray}-0.252 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.65 \mathrm{ms} \pm 33.9 \mathrm{μs}\left({\color{lightgreen}-5.242 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.59 \mathrm{ms} \pm 24.4 \mathrm{μs}\left({\color{gray}-1.452 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.47 \mathrm{ms} \pm 38.8 \mathrm{μs}\left({\color{gray}2.74 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.77 \mathrm{ms} \pm 15.6 \mathrm{μs}\left({\color{gray}-1.486 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.77 \mathrm{ms} \pm 18.6 \mathrm{μs}\left({\color{gray}0.474 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.91 \mathrm{ms} \pm 18.7 \mathrm{μs}\left({\color{gray}2.33 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.14 \mathrm{ms} \pm 23.5 \mathrm{μs}\left({\color{gray}-2.467 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.94 \mathrm{ms} \pm 20.9 \mathrm{μs}\left({\color{gray}-2.851 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.21 \mathrm{ms} \pm 20.6 \mathrm{μs}\left({\color{gray}-2.982 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.24 \mathrm{ms} \pm 23.3 \mathrm{μs}\left({\color{gray}-0.802 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.97 \mathrm{ms} \pm 22.6 \mathrm{μs}\left({\color{gray}1.78 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$3.11 \mathrm{ms} \pm 23.7 \mathrm{μs}\left({\color{gray}-0.239 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.72 \mathrm{ms} \pm 36.4 \mathrm{μs}\left({\color{gray}-0.574 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.16 \mathrm{ms} \pm 19.3 \mathrm{μs}\left({\color{lightgreen}-5.396 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.38 \mathrm{ms} \pm 22.8 \mathrm{μs}\left({\color{lightgreen}-7.524 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.61 \mathrm{ms} \pm 27.4 \mathrm{μs}\left({\color{gray}1.18 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.23 \mathrm{ms} \pm 26.7 \mathrm{μs}\left({\color{gray}0.942 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.58 \mathrm{ms} \pm 28.2 \mathrm{μs}\left({\color{gray}2.93 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$33.6 \mathrm{ms} \pm 202 \mathrm{μs}\left({\color{gray}0.542 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$72.3 \mathrm{ms} \pm 518 \mathrm{μs}\left({\color{gray}-0.642 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$37.0 \mathrm{ms} \pm 259 \mathrm{μs}\left({\color{gray}-1.146 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$39.9 \mathrm{ms} \pm 279 \mathrm{μs}\left({\color{gray}-1.313 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$44.3 \mathrm{ms} \pm 266 \mathrm{μs}\left({\color{gray}1.24 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$35.7 \mathrm{ms} \pm 239 \mathrm{μs}\left({\color{gray}4.74 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$419 \mathrm{ms} \pm 2.05 \mathrm{ms}\left({\color{gray}0.110 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$89.2 \mathrm{ms} \pm 641 \mathrm{μs}\left({\color{lightgreen}-5.829 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$81.1 \mathrm{ms} \pm 429 \mathrm{μs}\left({\color{gray}1.20 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$281 \mathrm{ms} \pm 1.34 \mathrm{ms}\left({\color{lightgreen}-11.703 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$11.0 \mathrm{ms} \pm 93.0 \mathrm{μs}\left({\color{gray}3.32 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$10.9 \mathrm{ms} \pm 74.0 \mathrm{μs}\left({\color{gray}-0.443 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$11.6 \mathrm{ms} \pm 77.5 \mathrm{μs}\left({\color{red}7.37 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$11.1 \mathrm{ms} \pm 77.2 \mathrm{μs}\left({\color{gray}1.11 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$11.2 \mathrm{ms} \pm 60.5 \mathrm{μs}\left({\color{gray}3.07 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$11.2 \mathrm{ms} \pm 85.7 \mathrm{μs}\left({\color{gray}4.71 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$11.1 \mathrm{ms} \pm 87.8 \mathrm{μs}\left({\color{gray}1.09 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$11.2 \mathrm{ms} \pm 86.7 \mathrm{μs}\left({\color{gray}0.945 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$11.7 \mathrm{ms} \pm 78.2 \mathrm{μs}\left({\color{red}6.21 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$12.1 \mathrm{ms} \pm 90.4 \mathrm{μs}\left({\color{red}6.15 \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 $$12.4 \mathrm{ms} \pm 101 \mathrm{μs}\left({\color{red}8.55 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$12.1 \mathrm{ms} \pm 107 \mathrm{μs}\left({\color{red}5.83 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$11.0 \mathrm{ms} \pm 71.3 \mathrm{μs}\left({\color{gray}-1.477 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$10.9 \mathrm{ms} \pm 76.9 \mathrm{μs}\left({\color{gray}-4.738 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$11.6 \mathrm{ms} \pm 110 \mathrm{μs}\left({\color{gray}0.334 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$11.0 \mathrm{ms} \pm 93.0 \mathrm{μs}\left({\color{lightgreen}-7.302 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$11.4 \mathrm{ms} \pm 98.9 \mathrm{μs}\left({\color{gray}-2.569 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$11.3 \mathrm{ms} \pm 76.0 \mathrm{μs}\left({\color{gray}-3.113 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$11.4 \mathrm{ms} \pm 100 \mathrm{μs}\left({\color{gray}-1.974 \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.04 \mathrm{ms} \pm 51.0 \mathrm{μs}\left({\color{gray}-2.303 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$56.9 \mathrm{ms} \pm 425 \mathrm{μs}\left({\color{gray}-0.711 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$111 \mathrm{ms} \pm 583 \mathrm{μs}\left({\color{gray}0.280 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$63.4 \mathrm{ms} \pm 618 \mathrm{μs}\left({\color{gray}-0.299 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$72.1 \mathrm{ms} \pm 524 \mathrm{μs}\left({\color{gray}1.22 \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.3 \mathrm{ms} \pm 655 \mathrm{μs}\left({\color{gray}1.30 \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.1 \mathrm{ms} \pm 577 \mathrm{μs}\left({\color{gray}2.04 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$47.4 \mathrm{ms} \pm 379 \mathrm{μs}\left({\color{gray}0.468 \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 $$73.0 \mathrm{ms} \pm 564 \mathrm{μs}\left({\color{lightgreen}-5.212 \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 $$54.0 \mathrm{ms} \pm 439 \mathrm{μs}\left({\color{gray}-0.335 \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 $$63.0 \mathrm{ms} \pm 451 \mathrm{μs}\left({\color{gray}0.247 \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 $$61.3 \mathrm{ms} \pm 448 \mathrm{μs}\left({\color{lightgreen}-6.075 \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 $$62.1 \mathrm{ms} \pm 481 \mathrm{μs}\left({\color{lightgreen}-6.358 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$112 \mathrm{ms} \pm 814 \mathrm{μs}\left({\color{lightgreen}-6.869 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$125 \mathrm{ms} \pm 904 \mathrm{μs}\left({\color{gray}-4.274 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$24.1 \mathrm{ms} \pm 197 \mathrm{μs}\left({\color{gray}-1.058 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$513 \mathrm{ms} \pm 1.53 \mathrm{ms}\left({\color{gray}1.32 \mathrm{\%}}\right) $$ Flame Graph

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

Labels

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