Skip to content

Conversation

@indietyp
Copy link
Member

🌟 What is the purpose of this PR?

This PR adds a size estimation analysis to the MIR framework that can statically determine the size of values flowing through a program. The analysis helps predict memory usage and performance characteristics of queries.

🔍 What does this change?

  • Implements a two-phase size estimation analysis:
    • Static analysis: Estimates sizes purely from type information
    • Dynamic analysis: Uses dataflow to track how sizes propagate through the program
  • Adds support for tracking parameter-dependent sizes using affine equations
  • Introduces range types for representing bounded and unbounded size estimates
  • Updates the MIR builder guide to document new type syntax for lists and unknown types

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 unit tests for all components of the size estimation system
  • Integration tests for multi-function analysis and recursive functions
  • Snapshot tests to verify analysis results

@cursor
Copy link

cursor bot commented Jan 20, 2026

PR Summary

Introduces a two-phase MIR size estimation analysis with parameter-aware results.

  • New analysis: size_estimation (static typing + forward dataflow) producing Footprint (units/cardinality) via InformationRange/Cardinality and affine equations; supports SCC fixpoint; exposes SizeEstimationAnalysis and GlobalAnalysisPass.
  • Dataflow/lattice upgrades: metadata hooks for bounded iteration (initialize_metadata, should_process_block, should_propagate_between); JoinSemiLattice<T, Rhs> and HasBottom/HasTop<T=Self> generalization; adjusted trait bounds; driver generics updated.
  • Core/MIR tweaks: builder adds ? and [List T] types; RValue exports ArgSlice; IdVec gains into_iter_enumerated and cross-allocator PartialEq/PartialOrd; collections add small_vec_from_elem; optimized Vec clone-into.
  • Docs/Tests: MIR builder guide updated; extensive unit and snapshot tests for the analysis.

Written by Cursor Bugbot for commit 5238cb6. 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 labels Jan 20, 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.

@augmentcode
Copy link

augmentcode bot commented Jan 20, 2026

🤖 Augment PR Summary

Summary: Adds a MIR “size estimation” analysis to predict value footprints (information units + cardinality), including parameter-dependent sizing via affine equations.

Changes:

  • Introduces size_estimation analysis pass with two phases: static (type-based) sizing and dynamic (dataflow) propagation for intrinsically-sized/unknown types.
  • Adds core abstractions: InformationUnit/Range, Cardinal/Cardinality, Footprint, Estimate (constant vs affine), and AffineEquation.
  • Implements affine substitution across apply calls, and handles recursion via call-graph SCC processing + bounded fixpoint iteration.
  • Extends the dataflow framework with optional per-analysis metadata hooks to bound worklist propagation/iteration, and relaxes/adjusts Domain/Lattice allocator bounds accordingly.
  • Updates lattice traits to support RHS-typed joins and defaulted HasBottom/HasTop type params; adds bottom/top impls for numeric carriers.
  • Improves allocator-aware cloning for Vec and adds a smallvec helper for repeated elements.
  • Extends MIR builder type syntax to support unknown (?) and intrinsic list types ([List T]).
  • Adds extensive unit + snapshot tests validating analysis behavior (control-flow joins, projections, calls, and recursion).

🤖 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. 2 suggestions posted.

Fix All in Augment

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

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 91.73935% with 161 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.83%. Comparing base (d7b72f2) to head (5238cb6).

Files with missing lines Patch % Lines
...mir/src/pass/analysis/size_estimation/footprint.rs 83.62% 26 Missing and 11 partials ⚠️
...shql/mir/src/pass/analysis/size_estimation/unit.rs 61.11% 28 Missing ⚠️
...hashql/mir/src/pass/analysis/dataflow/framework.rs 43.58% 20 Missing and 2 partials ⚠️
...l/mir/src/pass/analysis/size_estimation/dynamic.rs 91.32% 15 Missing and 6 partials ⚠️
.../mir/src/pass/analysis/size_estimation/estimate.rs 93.77% 6 Missing and 8 partials ⚠️
...hql/mir/src/pass/analysis/size_estimation/range.rs 95.59% 13 Missing ⚠️
...ql/mir/src/pass/analysis/dataflow/lattice/impls.rs 50.00% 6 Missing ⚠️
libs/@local/hashql/core/src/heap/clone.rs 0.00% 4 Missing ⚠️
...ql/mir/src/pass/analysis/size_estimation/affine.rs 96.99% 1 Missing and 3 partials ⚠️
...ql/mir/src/pass/analysis/size_estimation/static.rs 98.41% 4 Missing ⚠️
... and 4 more
Additional details and impacted files
@@                             Coverage Diff                             @@
##           bm/be-273-hashql-interpreter-benchmarks    #8278      +/-   ##
===========================================================================
+ Coverage                                    60.22%   60.83%   +0.60%     
===========================================================================
  Files                                         1231     1240       +9     
  Lines                                       117974   119913    +1939     
  Branches                                      5133     5181      +48     
===========================================================================
+ Hits                                         71050    72948    +1898     
- Misses                                       46097    46107      +10     
- Partials                                       827      858      +31     
Flag Coverage Δ
rust.hashql-compiletest 46.65% <ø> (ø)
rust.hashql-mir 89.22% <92.16%> (+1.31%) ⬆️

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

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

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

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 20, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing bm/be-301-hashql-size-estimation-for-local-variables-and-functions (5238cb6) with bm/be-273-hashql-interpreter-benchmarks (d7b72f2)

Summary

✅ 21 untouched benchmarks
🗄️ 12 archived benchmarks run1

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.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@vercel vercel bot temporarily deployed to Preview – petrinaut January 21, 2026 09:11 Inactive
@vercel vercel bot temporarily deployed to Preview – petrinaut January 21, 2026 09:12 Inactive
@vercel vercel bot temporarily deployed to Preview – petrinaut January 21, 2026 09:39 Inactive
@graphite-app graphite-app bot requested review from a team January 21, 2026 10:24
@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 $$29.1 \mathrm{ms} \pm 280 \mathrm{μs}\left({\color{gray}1.47 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.26 \mathrm{ms} \pm 14.6 \mathrm{μs}\left({\color{gray}0.180 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.3 \mathrm{ms} \pm 85.8 \mathrm{μs}\left({\color{gray}4.17 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$42.7 \mathrm{ms} \pm 357 \mathrm{μs}\left({\color{gray}0.858 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$13.9 \mathrm{ms} \pm 82.3 \mathrm{μs}\left({\color{gray}0.421 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$23.5 \mathrm{ms} \pm 135 \mathrm{μs}\left({\color{gray}0.931 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$31.1 \mathrm{ms} \pm 204 \mathrm{μs}\left({\color{lightgreen}-27.134 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.67 \mathrm{ms} \pm 16.8 \mathrm{μs}\left({\color{lightgreen}-82.126 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.6 \mathrm{ms} \pm 91.1 \mathrm{μs}\left({\color{lightgreen}-47.567 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.67 \mathrm{ms} \pm 16.0 \mathrm{μs}\left({\color{gray}1.81 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.86 \mathrm{ms} \pm 12.8 \mathrm{μs}\left({\color{gray}0.830 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.21 \mathrm{ms} \pm 13.8 \mathrm{μs}\left({\color{gray}1.73 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.11 \mathrm{ms} \pm 32.1 \mathrm{μs}\left({\color{gray}3.84 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.44 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{gray}2.15 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.03 \mathrm{ms} \pm 22.0 \mathrm{μs}\left({\color{gray}2.73 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.30 \mathrm{ms} \pm 23.2 \mathrm{μs}\left({\color{gray}1.26 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.30 \mathrm{ms} \pm 13.8 \mathrm{μs}\left({\color{gray}-0.798 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.90 \mathrm{ms} \pm 26.1 \mathrm{μs}\left({\color{gray}0.416 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.58 \mathrm{ms} \pm 10.1 \mathrm{μs}\left({\color{red}6.99 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.48 \mathrm{ms} \pm 8.73 \mathrm{μs}\left({\color{gray}4.82 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.62 \mathrm{ms} \pm 11.8 \mathrm{μs}\left({\color{red}6.29 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.82 \mathrm{ms} \pm 13.2 \mathrm{μs}\left({\color{red}6.51 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.70 \mathrm{ms} \pm 12.5 \mathrm{μs}\left({\color{red}6.27 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.90 \mathrm{ms} \pm 13.3 \mathrm{μs}\left({\color{red}6.57 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.96 \mathrm{ms} \pm 13.5 \mathrm{μs}\left({\color{red}7.65 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.64 \mathrm{ms} \pm 10.5 \mathrm{μs}\left({\color{red}7.89 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.85 \mathrm{ms} \pm 14.2 \mathrm{μs}\left({\color{red}10.3 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.33 \mathrm{ms} \pm 16.3 \mathrm{μs}\left({\color{red}7.34 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.85 \mathrm{ms} \pm 13.4 \mathrm{μs}\left({\color{red}5.30 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.12 \mathrm{ms} \pm 17.4 \mathrm{μs}\left({\color{red}8.25 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.24 \mathrm{ms} \pm 14.4 \mathrm{μs}\left({\color{red}7.04 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.84 \mathrm{ms} \pm 11.1 \mathrm{μs}\left({\color{red}7.26 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.09 \mathrm{ms} \pm 17.3 \mathrm{μs}\left({\color{red}8.34 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$39.7 \mathrm{ms} \pm 190 \mathrm{μs}\left({\color{gray}0.131 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$77.1 \mathrm{ms} \pm 372 \mathrm{μs}\left({\color{gray}1.62 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$42.8 \mathrm{ms} \pm 189 \mathrm{μs}\left({\color{gray}0.607 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$46.0 \mathrm{ms} \pm 187 \mathrm{μs}\left({\color{gray}0.857 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$54.0 \mathrm{ms} \pm 299 \mathrm{μs}\left({\color{gray}-0.057 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$41.0 \mathrm{ms} \pm 143 \mathrm{μs}\left({\color{gray}-0.086 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$419 \mathrm{ms} \pm 902 \mathrm{μs}\left({\color{gray}1.76 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$95.2 \mathrm{ms} \pm 353 \mathrm{μs}\left({\color{gray}-0.709 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$84.7 \mathrm{ms} \pm 400 \mathrm{μs}\left({\color{gray}0.082 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$284 \mathrm{ms} \pm 661 \mathrm{μs}\left({\color{gray}0.001 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$14.6 \mathrm{ms} \pm 74.7 \mathrm{μs}\left({\color{gray}0.609 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$15.2 \mathrm{ms} \pm 78.2 \mathrm{μs}\left({\color{gray}3.06 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$15.2 \mathrm{ms} \pm 73.6 \mathrm{μs}\left({\color{gray}1.46 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$14.9 \mathrm{ms} \pm 73.5 \mathrm{μs}\left({\color{gray}1.83 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$18.3 \mathrm{ms} \pm 103 \mathrm{μs}\left({\color{gray}3.14 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$15.0 \mathrm{ms} \pm 68.4 \mathrm{μs}\left({\color{red}5.06 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$14.9 \mathrm{ms} \pm 74.6 \mathrm{μs}\left({\color{gray}2.09 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$14.9 \mathrm{ms} \pm 88.7 \mathrm{μs}\left({\color{gray}1.74 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$15.4 \mathrm{ms} \pm 95.5 \mathrm{μs}\left({\color{gray}-0.208 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$22.3 \mathrm{ms} \pm 179 \mathrm{μs}\left({\color{gray}0.510 \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.7 \mathrm{ms} \pm 299 \mathrm{μs}\left({\color{gray}2.50 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$29.3 \mathrm{ms} \pm 238 \mathrm{μs}\left({\color{gray}-3.247 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$29.7 \mathrm{ms} \pm 308 \mathrm{μs}\left({\color{gray}-0.017 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$29.3 \mathrm{ms} \pm 269 \mathrm{μs}\left({\color{gray}-2.698 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$29.2 \mathrm{ms} \pm 255 \mathrm{μs}\left({\color{gray}-2.819 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$29.2 \mathrm{ms} \pm 291 \mathrm{μs}\left({\color{gray}-2.934 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$30.5 \mathrm{ms} \pm 234 \mathrm{μs}\left({\color{gray}1.85 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$31.0 \mathrm{ms} \pm 276 \mathrm{μs}\left({\color{gray}0.139 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$29.7 \mathrm{ms} \pm 291 \mathrm{μs}\left({\color{gray}-1.538 \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.16 \mathrm{ms} \pm 30.7 \mathrm{μs}\left({\color{gray}0.194 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$45.9 \mathrm{ms} \pm 223 \mathrm{μs}\left({\color{gray}-1.608 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$96.8 \mathrm{ms} \pm 441 \mathrm{μs}\left({\color{gray}0.282 \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.8 \mathrm{ms} \pm 337 \mathrm{μs}\left({\color{gray}1.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 $$59.7 \mathrm{ms} \pm 268 \mathrm{μs}\left({\color{gray}-0.681 \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 285 \mathrm{μs}\left({\color{gray}-0.451 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$76.2 \mathrm{ms} \pm 377 \mathrm{μs}\left({\color{gray}-0.466 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$49.4 \mathrm{ms} \pm 256 \mathrm{μs}\left({\color{gray}-2.040 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$77.2 \mathrm{ms} \pm 354 \mathrm{μs}\left({\color{gray}0.005 \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.2 \mathrm{ms} \pm 395 \mathrm{μs}\left({\color{gray}-2.549 \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.8 \mathrm{ms} \pm 327 \mathrm{μs}\left({\color{gray}-2.261 \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.5 \mathrm{ms} \pm 491 \mathrm{μs}\left({\color{gray}0.120 \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.5 \mathrm{ms} \pm 407 \mathrm{μs}\left({\color{gray}0.190 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$137 \mathrm{ms} \pm 458 \mathrm{μs}\left({\color{gray}2.64 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$134 \mathrm{ms} \pm 469 \mathrm{μs}\left({\color{gray}0.382 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$38.9 \mathrm{ms} \pm 203 \mathrm{μs}\left({\color{lightgreen}-31.698 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$565 \mathrm{ms} \pm 1.04 \mathrm{ms}\left({\color{gray}-1.583 \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