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 full MIR size estimation system and supporting infrastructure.

  • Add size_estimation analysis: static type-based sizing and dynamic forward dataflow; models sizes as Footprint { units, cardinality } with Estimate::{Constant, Affine} over parameter coefficients
  • New lattice/range/unit primitives: InformationUnit, Cardinal, InformationRange, Cardinality, AffineEquation, and BodyFootprint{Semilattice}; snapshot and unit tests
  • Extend dataflow framework: metadata hooks (initialize_metadata, should_process_block, should_propagate_between), adjusted trait bounds, and fixpoint driver changes
  • Generalize lattice traits (JoinSemiLattice<T, Rhs=T>, HasBottom, HasTop) and implement numeric semiring bottoms/tops
  • Add GlobalAnalysisPass and wire SizeEstimationAnalysis into analysis::mod
  • MIR builder/docs: support ? (unknown) and [List T] types; export ArgSlice
  • Core utilities: small_vec_from_elem, optimized Vec clone-into; IdVec iterator and cross-allocator Eq/Ord
  • Add tests and snapshots under tests/ui/pass/size-estimation/

Written by Cursor Bugbot for commit 9594e78. 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 (9594e78).

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-ast 87.25% <ø> (ø)
rust.hashql-compiletest 46.65% <ø> (ø)
rust.hashql-core 81.75% <0.00%> (-0.02%) ⬇️
rust.hashql-hir 89.10% <ø> (ø)
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 (9594e78) 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
TimDiekmann
TimDiekmann previously approved these changes Jan 23, 2026
Copy link
Member

Choose a reason for hiding this comment

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

We have something similar for temporal versioning. I guess we cannot easily use one or the other?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really no, it's just for isolation purposes. I thought about doing a trait, but thought that'd be overkill (hence the macro to just scaffold the types). Was inspired by the text-size crate.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, a trait would be overkill. I know I put quite a lot of work into the bound comparisons for temporal versioning, but I guess this became a lot easier nowadays. I guess it makes sense to move out common things like this but I always struggle to find a good location.
Let's leave it as it is.

@vercel vercel bot temporarily deployed to Preview – petrinaut January 23, 2026 08:37 Inactive
@github-actions github-actions bot dismissed TimDiekmann’s stale review January 23, 2026 08:37

Your organization requires reapproval when changes are made, so Graphite has dismissed approvals. See the output of git range-diff at https://github.com/hashintel/hash/actions/runs/21279903124

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, a trait would be overkill. I know I put quite a lot of work into the bound comparisons for temporal versioning, but I guess this became a lot easier nowadays. I guess it makes sense to move out common things like this but I always struggle to find a good location.
Let's leave it as it is.

@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 $$26.1 \mathrm{ms} \pm 155 \mathrm{μs}\left({\color{gray}-2.182 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.29 \mathrm{ms} \pm 14.0 \mathrm{μs}\left({\color{gray}1.97 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$11.8 \mathrm{ms} \pm 62.9 \mathrm{μs}\left({\color{gray}-4.923 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$41.8 \mathrm{ms} \pm 266 \mathrm{μs}\left({\color{gray}-2.522 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.2 \mathrm{ms} \pm 106 \mathrm{μs}\left({\color{red}5.83 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$23.6 \mathrm{ms} \pm 135 \mathrm{μs}\left({\color{gray}-1.485 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$26.3 \mathrm{ms} \pm 136 \mathrm{μs}\left({\color{lightgreen}-38.701 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.63 \mathrm{ms} \pm 16.9 \mathrm{μs}\left({\color{lightgreen}-82.326 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.1 \mathrm{ms} \pm 90.8 \mathrm{μs}\left({\color{lightgreen}-50.450 \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 14.6 \mathrm{μs}\left({\color{gray}0.884 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.81 \mathrm{ms} \pm 12.3 \mathrm{μs}\left({\color{gray}0.104 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.16 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{gray}0.284 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$4.92 \mathrm{ms} \pm 23.4 \mathrm{μs}\left({\color{gray}-0.626 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.38 \mathrm{ms} \pm 13.3 \mathrm{μs}\left({\color{gray}-0.332 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$3.92 \mathrm{ms} \pm 19.7 \mathrm{μs}\left({\color{gray}-0.291 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.25 \mathrm{ms} \pm 25.5 \mathrm{μs}\left({\color{gray}0.838 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.24 \mathrm{ms} \pm 10.8 \mathrm{μs}\left({\color{gray}0.824 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.84 \mathrm{ms} \pm 30.0 \mathrm{μs}\left({\color{gray}0.154 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.54 \mathrm{ms} \pm 11.9 \mathrm{μs}\left({\color{red}7.85 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.49 \mathrm{ms} \pm 12.1 \mathrm{μs}\left({\color{red}7.21 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.57 \mathrm{ms} \pm 10.6 \mathrm{μs}\left({\color{red}7.29 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.77 \mathrm{ms} \pm 13.2 \mathrm{μs}\left({\color{red}5.95 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.68 \mathrm{ms} \pm 11.6 \mathrm{μs}\left({\color{red}7.09 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.85 \mathrm{ms} \pm 12.0 \mathrm{μs}\left({\color{red}5.70 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.89 \mathrm{ms} \pm 14.2 \mathrm{μs}\left({\color{gray}4.80 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.63 \mathrm{ms} \pm 13.9 \mathrm{μs}\left({\color{red}9.06 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.81 \mathrm{ms} \pm 14.6 \mathrm{μs}\left({\color{red}9.97 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.25 \mathrm{ms} \pm 18.3 \mathrm{μs}\left({\color{red}6.50 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.83 \mathrm{ms} \pm 11.7 \mathrm{μs}\left({\color{red}7.12 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.04 \mathrm{ms} \pm 15.9 \mathrm{μs}\left({\color{red}5.78 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.13 \mathrm{ms} \pm 14.2 \mathrm{μs}\left({\color{gray}3.85 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.80 \mathrm{ms} \pm 11.9 \mathrm{μs}\left({\color{red}6.79 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.02 \mathrm{ms} \pm 14.6 \mathrm{μs}\left({\color{red}5.78 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$38.7 \mathrm{ms} \pm 155 \mathrm{μs}\left({\color{gray}-0.057 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$77.4 \mathrm{ms} \pm 307 \mathrm{μs}\left({\color{gray}1.93 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$44.2 \mathrm{ms} \pm 211 \mathrm{μs}\left({\color{gray}1.99 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$45.5 \mathrm{ms} \pm 174 \mathrm{μs}\left({\color{gray}-0.607 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$53.5 \mathrm{ms} \pm 239 \mathrm{μs}\left({\color{gray}1.37 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$40.2 \mathrm{ms} \pm 148 \mathrm{μs}\left({\color{gray}2.17 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$425 \mathrm{ms} \pm 736 \mathrm{μs}\left({\color{gray}2.91 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$97.2 \mathrm{ms} \pm 412 \mathrm{μs}\left({\color{gray}4.64 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$85.7 \mathrm{ms} \pm 310 \mathrm{μs}\left({\color{gray}0.893 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$284 \mathrm{ms} \pm 763 \mathrm{μs}\left({\color{lightgreen}-8.891 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$14.9 \mathrm{ms} \pm 90.1 \mathrm{μs}\left({\color{red}5.60 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$14.8 \mathrm{ms} \pm 70.7 \mathrm{μs}\left({\color{gray}1.32 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$15.0 \mathrm{ms} \pm 62.9 \mathrm{μs}\left({\color{gray}0.406 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$14.7 \mathrm{ms} \pm 70.8 \mathrm{μs}\left({\color{gray}2.55 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$18.0 \mathrm{ms} \pm 102 \mathrm{μs}\left({\color{gray}0.623 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$14.7 \mathrm{ms} \pm 64.8 \mathrm{μs}\left({\color{gray}-0.301 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$14.9 \mathrm{ms} \pm 53.5 \mathrm{μs}\left({\color{gray}1.46 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$14.9 \mathrm{ms} \pm 81.9 \mathrm{μs}\left({\color{gray}2.61 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$15.4 \mathrm{ms} \pm 78.6 \mathrm{μs}\left({\color{gray}0.922 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$22.6 \mathrm{ms} \pm 159 \mathrm{μs}\left({\color{gray}2.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 $$29.7 \mathrm{ms} \pm 293 \mathrm{μs}\left({\color{gray}2.90 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$30.4 \mathrm{ms} \pm 278 \mathrm{μs}\left({\color{gray}1.86 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$30.2 \mathrm{ms} \pm 275 \mathrm{μs}\left({\color{gray}2.29 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$29.8 \mathrm{ms} \pm 297 \mathrm{μs}\left({\color{gray}3.78 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$29.8 \mathrm{ms} \pm 281 \mathrm{μs}\left({\color{gray}-1.113 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$30.2 \mathrm{ms} \pm 259 \mathrm{μs}\left({\color{gray}3.74 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$29.8 \mathrm{ms} \pm 258 \mathrm{μs}\left({\color{gray}0.040 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$30.1 \mathrm{ms} \pm 289 \mathrm{μs}\left({\color{red}5.71 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$29.6 \mathrm{ms} \pm 303 \mathrm{μs}\left({\color{gray}-0.194 \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.17 \mathrm{ms} \pm 35.9 \mathrm{μs}\left({\color{gray}2.83 \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 229 \mathrm{μs}\left({\color{gray}2.86 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$94.0 \mathrm{ms} \pm 334 \mathrm{μs}\left({\color{gray}-0.122 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$53.4 \mathrm{ms} \pm 275 \mathrm{μs}\left({\color{gray}-0.398 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$62.2 \mathrm{ms} \pm 244 \mathrm{μs}\left({\color{gray}0.866 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$69.2 \mathrm{ms} \pm 373 \mathrm{μs}\left({\color{gray}-2.278 \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.2 \mathrm{ms} \pm 395 \mathrm{μs}\left({\color{gray}-1.984 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$50.7 \mathrm{ms} \pm 307 \mathrm{μs}\left({\color{gray}1.54 \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 $$78.2 \mathrm{ms} \pm 363 \mathrm{μs}\left({\color{gray}2.10 \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 $$57.8 \mathrm{ms} \pm 262 \mathrm{μs}\left({\color{gray}1.61 \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 $$64.6 \mathrm{ms} \pm 247 \mathrm{μs}\left({\color{gray}-0.572 \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 $$67.0 \mathrm{ms} \pm 366 \mathrm{μs}\left({\color{gray}-1.636 \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 $$67.5 \mathrm{ms} \pm 326 \mathrm{μs}\left({\color{gray}2.53 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$137 \mathrm{ms} \pm 641 \mathrm{μs}\left({\color{gray}1.05 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$137 \mathrm{ms} \pm 462 \mathrm{μs}\left({\color{gray}-0.219 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$39.1 \mathrm{ms} \pm 172 \mathrm{μs}\left({\color{lightgreen}-62.386 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$584 \mathrm{ms} \pm 1.31 \mathrm{ms}\left({\color{gray}-4.962 \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.

3 participants