Skip to content

Conversation

@indietyp
Copy link
Member

🌟 What is the purpose of this PR?

Add support for graph read filter bodies in MIR, enabling property path extraction for graph traversal.

🔍 What does this change?

  • Add GraphReadFilter as a new body source type in the MIR builder guide
  • Implement TraversalExtraction pass to materialize vertex projections in graph read filters
  • Update PostInline to run the traversal extraction pass and collect results
  • Add append method to IdVec for more efficient vector operations
  • Add type_id_unchecked and Display implementation for Place

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?

  • Comprehensive test suite for the traversal extraction pass covering various scenarios
  • Tests verify correct extraction of projections and traversal map generation

@vercel
Copy link

vercel bot commented Jan 27, 2026

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

2 Skipped Deployments
Project Deployment Review Updated (UTC)
hashdotdesign Ignored Ignored Preview Jan 27, 2026 7:06pm
hashdotdesign-tokens Ignored Ignored Preview Jan 27, 2026 7:06pm

@cursor
Copy link

cursor bot commented Jan 27, 2026

PR Summary

Introduces graph read filter bodies and a new pass to extract vertex traversals, wiring it into the post-inline pipeline.

  • Adds Source::GraphReadFilter and body! macro support ([graph::read::filter]) with docs/examples
  • Implements TraversalExtraction to materialize projections from the vertex arg and record Traversals mappings; comprehensive tests/snapshots
  • Updates PostInline to require heap, run canonicalization then traversal extraction, and expose results via PostInlineResidual
  • Exposes Canonicalization::allocator[_mut] helpers
  • Extends utilities: IdVec::append, Place::type_id_unchecked, and Display for Place
  • Adjusts benches/tests/compiletest to construct PostInline::new_in(heap, scratch)

Written by Cursor Bugbot for commit 6ffafd7. This will update automatically on new commits. Configure here.

@github-actions github-actions bot added 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 area/tests New or updated tests labels Jan 27, 2026
Copy link
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

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

Comment on lines 176 to 182
let new_local = if let Some(offset) =
(self.pending_locals_offset..self.pending_locals.len()).find(|&index| {
self.traversals
.lookup(self.total_locals.plus(self.pending_locals_offset + index))
.is_some_and(|pending| pending.projections == place.projections)
}) {
self.total_locals.plus(offset)
Copy link
Contributor

Choose a reason for hiding this comment

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

Incorrect local ID calculation in deduplication logic

The code incorrectly computes the local ID when checking for existing extractions:

let new_local = if let Some(offset) =
    (self.pending_locals_offset..self.pending_locals.len()).find(|&index| {
        self.traversals
            .lookup(self.total_locals.plus(self.pending_locals_offset + index))  // BUG: double-adds offset
            .is_some_and(|pending| pending.projections == place.projections)
    }) {
    self.total_locals.plus(offset)  // Returns: total_locals + index

Problem: Line 179 adds pending_locals_offset twice:

  • index already ranges from pending_locals_offset..pending_locals.len()
  • Then it adds pending_locals_offset + index again
  • But line 182 returns total_locals.plus(offset) where offset == index

Impact: The lookup searches for the wrong local ID (e.g., _110 instead of _105), causing deduplication to always fail. This creates duplicate extracted locals for the same projection within a basic block, violating the stated deduplication guarantee.

Fix:

let new_local = if let Some(offset) =
    (self.pending_locals_offset..self.pending_locals.len()).find(|&index| {
        self.traversals
            .lookup(self.total_locals.plus(index))  // Remove duplicate offset
            .is_some_and(|pending| pending.projections == place.projections)
    }) {
    self.total_locals.plus(offset)
Suggested change
let new_local = if let Some(offset) =
(self.pending_locals_offset..self.pending_locals.len()).find(|&index| {
self.traversals
.lookup(self.total_locals.plus(self.pending_locals_offset + index))
.is_some_and(|pending| pending.projections == place.projections)
}) {
self.total_locals.plus(offset)
let new_local = if let Some(offset) =
(self.pending_locals_offset..self.pending_locals.len()).find(|&index| {
self.traversals
.lookup(self.total_locals.plus(index))
.is_some_and(|pending| pending.projections == place.projections)
}) {
self.total_locals.plus(offset)

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 27, 2026

Merging this PR will not alter performance

✅ 21 untouched benchmarks
🗄️ 12 archived benchmarks run1


Comparing bm/be-317-hashql-projectionextraction-for-entity-access (6ffafd7) with bm/be-315-hashql-differentiate-between-graphfilter-sources (f97b485)

Open in CodSpeed

Footnotes

  1. 12 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them.

@augmentcode
Copy link

augmentcode bot commented Jan 27, 2026

🤖 Augment PR Summary

Summary: This PR extends HashQL MIR to support graph read filter bodies and adds a new post-inlining transform to extract traversal paths.

Changes:

  • Introduced Source::GraphReadFilter and updated the MIR builder guide and body! macro to construct these bodies.
  • Added a TraversalExtraction transform pass that materializes vertex projections into explicit locals and records a per-body Traversals map.
  • Updated PostInline to run canonicalization then traversal extraction, and to accumulate traversal results via PostInline::finish.
  • Added IdVec::append for efficient vector draining/append operations.
  • Added Place::type_id_unchecked and a Display impl for easier diagnostics/printing.
  • Updated compiletests and benchmarks to the new PostInline::new_in(heap, alloc) constructor.
  • Added an extensive snapshot-based test suite for traversal extraction behavior.

Technical Notes: Traversal extraction only runs on GraphReadFilter bodies, deduplicates within a basic block, and preserves a mapping from extracted locals back to their original projection paths for later graph execution.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

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

Fix All in Augment

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

let new_local = if let Some(offset) =
(self.pending_locals_offset..self.pending_locals.len()).find(|&index| {
self.traversals
.lookup(self.total_locals.plus(self.pending_locals_offset + index))
Copy link

Choose a reason for hiding this comment

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

The per-basic-block dedup check seems to miscompute the candidate local: index already ranges over absolute pending_locals indices, but the lookup uses pending_locals_offset + index, which will overshoot after the first block and prevent dedup in later blocks. This can lead to multiple extracted locals (and traversal entries) for the same projection within a single basic block.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

@vercel vercel bot temporarily deployed to Preview – petrinaut January 27, 2026 18:52 Inactive
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 97.03704% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.65%. Comparing base (f97b485) to head (6ffafd7).

Files with missing lines Patch % Lines
...local/hashql/mir/src/pass/transform/post_inline.rs 75.00% 4 Missing and 1 partial ⚠️
...mir/src/pass/transform/traversal_extraction/mod.rs 97.41% 2 Missing and 2 partials ⚠️
.../hashql/mir/src/pass/transform/canonicalization.rs 50.00% 3 Missing ⚠️
Additional details and impacted files
@@                                      Coverage Diff                                       @@
##           bm/be-315-hashql-differentiate-between-graphfilter-sources    #8331      +/-   ##
==============================================================================================
+ Coverage                                                       66.47%   66.65%   +0.18%     
==============================================================================================
  Files                                                             762      764       +2     
  Lines                                                           67681    68084     +403     
  Branches                                                         3799     3812      +13     
==============================================================================================
+ Hits                                                            44988    45382     +394     
- Misses                                                          22158    22164       +6     
- Partials                                                          535      538       +3     
Flag Coverage Δ
rust.hashql-compiletest 46.65% <ø> (ø)
rust.hashql-mir 89.44% <97.03%> (+0.22%) ⬆️

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.

@vercel vercel bot temporarily deployed to Preview – petrinaut January 27, 2026 19:06 Inactive
@graphite-app graphite-app bot requested review from a team January 27, 2026 20:09
@github-actions
Copy link
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 $$25.7 \mathrm{ms} \pm 134 \mathrm{μs}\left({\color{lightgreen}-7.166 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.18 \mathrm{ms} \pm 12.0 \mathrm{μs}\left({\color{gray}-3.451 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.3 \mathrm{ms} \pm 71.2 \mathrm{μs}\left({\color{gray}-3.528 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$42.6 \mathrm{ms} \pm 307 \mathrm{μs}\left({\color{gray}0.788 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.1 \mathrm{ms} \pm 77.4 \mathrm{μs}\left({\color{gray}2.49 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$23.8 \mathrm{ms} \pm 130 \mathrm{μs}\left({\color{gray}-0.897 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$26.6 \mathrm{ms} \pm 132 \mathrm{μs}\left({\color{lightgreen}-39.092 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.57 \mathrm{ms} \pm 14.9 \mathrm{μs}\left({\color{lightgreen}-82.067 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.2 \mathrm{ms} \pm 99.0 \mathrm{μs}\left({\color{lightgreen}-49.057 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.62 \mathrm{ms} \pm 19.8 \mathrm{μs}\left({\color{gray}0.463 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.81 \mathrm{ms} \pm 12.0 \mathrm{μs}\left({\color{gray}0.548 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.17 \mathrm{ms} \pm 16.0 \mathrm{μs}\left({\color{gray}0.116 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$4.98 \mathrm{ms} \pm 26.7 \mathrm{μs}\left({\color{gray}0.296 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.34 \mathrm{ms} \pm 12.6 \mathrm{μs}\left({\color{gray}-1.868 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$3.96 \mathrm{ms} \pm 20.5 \mathrm{μs}\left({\color{gray}0.751 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.23 \mathrm{ms} \pm 25.1 \mathrm{μs}\left({\color{gray}-0.607 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.25 \mathrm{ms} \pm 16.6 \mathrm{μs}\left({\color{gray}0.762 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.83 \mathrm{ms} \pm 21.3 \mathrm{μs}\left({\color{gray}-0.854 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.56 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{red}9.90 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.45 \mathrm{ms} \pm 8.47 \mathrm{μs}\left({\color{red}6.08 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.57 \mathrm{ms} \pm 10.9 \mathrm{μs}\left({\color{red}8.05 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.76 \mathrm{ms} \pm 16.4 \mathrm{μs}\left({\color{red}6.65 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.67 \mathrm{ms} \pm 13.2 \mathrm{μs}\left({\color{red}7.16 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.84 \mathrm{ms} \pm 11.1 \mathrm{μs}\left({\color{red}6.94 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.91 \mathrm{ms} \pm 13.2 \mathrm{μs}\left({\color{red}5.83 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.61 \mathrm{ms} \pm 10.4 \mathrm{μs}\left({\color{red}8.90 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.78 \mathrm{ms} \pm 10.9 \mathrm{μs}\left({\color{red}7.69 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.23 \mathrm{ms} \pm 11.7 \mathrm{μs}\left({\color{red}5.51 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.87 \mathrm{ms} \pm 14.5 \mathrm{μs}\left({\color{red}8.57 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.06 \mathrm{ms} \pm 14.3 \mathrm{μs}\left({\color{red}6.55 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.14 \mathrm{ms} \pm 17.0 \mathrm{μs}\left({\color{gray}4.94 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.81 \mathrm{ms} \pm 13.5 \mathrm{μs}\left({\color{red}7.18 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.08 \mathrm{ms} \pm 18.2 \mathrm{μs}\left({\color{red}7.57 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$39.2 \mathrm{ms} \pm 139 \mathrm{μs}\left({\color{gray}1.04 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$59.0 \mathrm{ms} \pm 322 \mathrm{μs}\left({\color{lightgreen}-21.461 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$43.6 \mathrm{ms} \pm 151 \mathrm{μs}\left({\color{gray}3.13 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$48.3 \mathrm{ms} \pm 321 \mathrm{μs}\left({\color{red}7.82 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$54.8 \mathrm{ms} \pm 255 \mathrm{μs}\left({\color{gray}2.95 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$41.4 \mathrm{ms} \pm 194 \mathrm{μs}\left({\color{gray}3.30 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$244 \mathrm{ms} \pm 792 \mathrm{μs}\left({\color{lightgreen}-40.863 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$94.0 \mathrm{ms} \pm 448 \mathrm{μs}\left({\color{gray}1.16 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$91.3 \mathrm{ms} \pm 381 \mathrm{μs}\left({\color{red}9.64 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$311 \mathrm{ms} \pm 687 \mathrm{μs}\left({\color{gray}1.56 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$14.7 \mathrm{ms} \pm 61.1 \mathrm{μs}\left({\color{gray}4.11 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$14.8 \mathrm{ms} \pm 72.8 \mathrm{μs}\left({\color{gray}1.43 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$15.5 \mathrm{ms} \pm 80.7 \mathrm{μs}\left({\color{gray}4.19 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$14.8 \mathrm{ms} \pm 62.1 \mathrm{μs}\left({\color{gray}2.05 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$19.1 \mathrm{ms} \pm 94.5 \mathrm{μs}\left({\color{red}7.99 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$14.7 \mathrm{ms} \pm 82.5 \mathrm{μs}\left({\color{gray}4.04 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$14.8 \mathrm{ms} \pm 84.2 \mathrm{μs}\left({\color{gray}2.87 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$14.8 \mathrm{ms} \pm 56.6 \mathrm{μs}\left({\color{gray}2.70 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$15.3 \mathrm{ms} \pm 72.5 \mathrm{μs}\left({\color{gray}2.28 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$22.5 \mathrm{ms} \pm 139 \mathrm{μs}\left({\color{gray}1.29 \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 $$29.3 \mathrm{ms} \pm 209 \mathrm{μs}\left({\color{gray}-4.928 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$30.3 \mathrm{ms} \pm 264 \mathrm{μs}\left({\color{gray}2.10 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$30.7 \mathrm{ms} \pm 282 \mathrm{μs}\left({\color{gray}4.10 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$29.9 \mathrm{ms} \pm 295 \mathrm{μs}\left({\color{gray}-1.895 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$30.0 \mathrm{ms} \pm 286 \mathrm{μs}\left({\color{gray}-0.396 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$30.1 \mathrm{ms} \pm 333 \mathrm{μs}\left({\color{gray}0.851 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$28.8 \mathrm{ms} \pm 243 \mathrm{μs}\left({\color{gray}-3.631 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$28.9 \mathrm{ms} \pm 261 \mathrm{μs}\left({\color{gray}-4.404 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$31.8 \mathrm{ms} \pm 229 \mathrm{μs}\left({\color{gray}2.53 \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.95 \mathrm{ms} \pm 27.7 \mathrm{μs}\left({\color{gray}1.09 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$46.3 \mathrm{ms} \pm 200 \mathrm{μs}\left({\color{gray}-0.932 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$93.6 \mathrm{ms} \pm 380 \mathrm{μs}\left({\color{gray}0.215 \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.5 \mathrm{ms} \pm 225 \mathrm{μs}\left({\color{gray}-0.916 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$60.5 \mathrm{ms} \pm 265 \mathrm{μs}\left({\color{gray}0.728 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$68.8 \mathrm{ms} \pm 335 \mathrm{μs}\left({\color{gray}0.643 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$75.1 \mathrm{ms} \pm 290 \mathrm{μs}\left({\color{gray}-0.671 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$50.5 \mathrm{ms} \pm 311 \mathrm{μs}\left({\color{gray}1.27 \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 $$77.0 \mathrm{ms} \pm 387 \mathrm{μs}\left({\color{gray}0.760 \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 $$56.5 \mathrm{ms} \pm 196 \mathrm{μs}\left({\color{gray}-0.326 \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 $$65.0 \mathrm{ms} \pm 387 \mathrm{μs}\left({\color{gray}1.59 \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 $$66.2 \mathrm{ms} \pm 357 \mathrm{μs}\left({\color{gray}0.422 \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 $$66.4 \mathrm{ms} \pm 305 \mathrm{μs}\left({\color{gray}0.562 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$130 \mathrm{ms} \pm 440 \mathrm{μs}\left({\color{gray}4.84 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$133 \mathrm{ms} \pm 518 \mathrm{μs}\left({\color{gray}4.98 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$40.1 \mathrm{ms} \pm 148 \mathrm{μs}\left({\color{lightgreen}-60.530 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$559 \mathrm{ms} \pm 964 \mathrm{μs}\left({\color{lightgreen}-8.120 \mathrm{\%}}\right) $$ Flame Graph

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

Labels

area/infra Relates to version control, CI, CD or IaC (area) 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