Skip to content

Conversation

@indietyp
Copy link
Member

🌟 What is the purpose of this PR?

Add benchmarks for the type system to measure performance of critical operations like subtyping, lattice operations, simplification, and type inference.

🔍 What does this change?

  • Adds a new benchmark suite for the type system using codspeed-criterion-compat
  • Creates benchmark groups for lattice operations, subtyping, simplification, and inference
  • Implements helper functions to properly manage heap allocations during benchmarking
  • Adds skeleton types to safely handle environment cleanup
  • Makes some previously test-only functions public to support benchmarking

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?

  • The benchmarks themselves serve as tests for the type system functionality

❓ How to test this?

  1. Run the benchmarks with cargo bench -p hashql-core
  2. Verify that all benchmark groups (lattice, subtyping, simplify, inference) execute successfully

@cursor
Copy link

cursor bot commented Dec 25, 2025

PR Summary

Introduces performance benchmarks for the type system and minimal runtime changes to support safe, allocation-aware runs.

  • Adds benches/type_system.rs with benchmark groups: lattice, subtyping, simplify, inference (uses codspeed-criterion-compat and per-iteration batching)
  • Updates Cargo.toml dev-deps and registers the type_system bench; adds build:codspeed and test:codspeed npm scripts
  • Introduces into_skeleton and *_Skeleton types for AnalysisEnvironment, SimplifyEnvironment, LatticeEnvironment, InferenceEnvironment, and VariableDependencyCollector to delay drops safely during benches
  • Makes Ident::synthetic and Variable::synthetic pub for non-test use; adds LatticeEnvironment::without_warnings
  • Replaces RefCell with LocalLock in ProvisionedScope to manage provisional mappings during simplification

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

Copy link
Member Author

indietyp commented Dec 25, 2025

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.

@vercel vercel bot temporarily deployed to Preview – petrinaut December 25, 2025 17:16 Inactive
@augmentcode
Copy link

augmentcode bot commented Dec 25, 2025

🤖 Augment PR Summary

Summary: Adds a dedicated benchmark suite for HashQL’s type system to measure performance of core operations (lattice, subtyping, simplification, inference).

Changes:

  • Adds a new hashql-core benchmark target (benches/type_system.rs) using codspeed-criterion-compat, with groups for join/meet, subtyping, simplification, and solver runs.
  • Introduces a heap/environment benchmarking harness that resets the arena each iteration (via iter_batched_ref + BatchSize::PerIteration) to avoid UAF while reusing allocations.
  • Adds “skeleton” types and into_skeleton() helpers on type environments to delay large drops and keep per-iteration teardown predictable.
  • Adds LatticeEnvironment::without_warnings() / warnings_enabled to suppress non-fatal diagnostics during benchmarking.
  • Refactors provisional mapping internals from RefCell to LocalLock in context/provision.rs.
  • Makes Ident::synthetic and Variable::synthetic public (and #[must_use]) so benches can construct synthetic values.

Technical Notes: The benchmark harness uses a small amount of unsafe (raw heap pointer) but documents the soundness assumptions (single-threaded + per-iteration batching).

🤖 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. No suggestions at this time.

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

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 25, 2025

CodSpeed Performance Report

Merging #8216 will not alter performance

Comparing bm/be-259-hashql-write-type-system-benchmarks (2722e89) with bm/be-227-hashql-implement-call-graph (964c8b2)

Summary

✅ 17 untouched
🆕 12 new

Benchmarks breakdown

Benchmark BASE HEAD Efficiency
🆕 contravariant_closure N/A 8.1 µs N/A
🆕 primitives N/A 6.1 µs N/A
🆕 full_solve/contravariant N/A 35.8 µs N/A
🆕 full_solve/simple N/A 36 µs N/A
🆕 union_with_duplicates N/A 18 µs N/A
🆕 meet/recursive N/A 320.6 µs N/A
🆕 nested_struct N/A 4 µs N/A
🆕 join/primitives N/A 6.6 µs N/A
🆕 join/recursive N/A 582 µs N/A
🆕 meet/primitives N/A 6.6 µs N/A
🆕 anti_symmetry N/A 44.7 µs N/A
🆕 full_solve/complex N/A 41.2 µs N/A

@codecov
Copy link

codecov bot commented Dec 25, 2025

Codecov Report

❌ Patch coverage is 43.24324% with 42 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.06%. Comparing base (964c8b2) to head (2722e89).

Files with missing lines Patch % Lines
...@local/hashql/core/src/type/environment/lattice.rs 31.57% 11 Missing and 2 partials ⚠️
...local/hashql/core/src/type/environment/analysis.rs 0.00% 9 Missing ⚠️
...s/@local/hashql/core/src/type/environment/infer.rs 0.00% 8 Missing ⚠️
...local/hashql/core/src/type/environment/simplify.rs 0.00% 6 Missing ⚠️
...ibs/@local/hashql/core/src/type/inference/visit.rs 0.00% 6 Missing ⚠️
Additional details and impacted files
@@                            Coverage Diff                            @@
##           bm/be-227-hashql-implement-call-graph    #8216      +/-   ##
=========================================================================
+ Coverage                                  59.37%   60.06%   +0.68%     
=========================================================================
  Files                                       1195     1054     -141     
  Lines                                     113796   106495    -7301     
  Branches                                    4986     4432     -554     
=========================================================================
- Hits                                       67572    63965    -3607     
+ Misses                                     45448    41808    -3640     
+ Partials                                     776      722      -54     
Flag Coverage Δ
apps.hash-ai-worker-py ?
apps.hash-ai-worker-ts 1.40% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
backend-integration-tests ?
blockprotocol.type-system 40.84% <ø> (ø)
deer ?
error-stack ?
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.24% <ø> (ø)
local.hash-backend-utils ?
local.hash-graph-sdk 10.88% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
local.hash-subgraph ?
rust.antsi 0.00% <ø> (ø)
rust.deer ?
rust.error-stack 90.88% <ø> (ø)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.18% <ø> (-0.02%) ⬇️
rust.harpc-tower 66.80% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 92.23% <ø> (ø)
rust.hash-codec 72.76% <ø> (ø)
rust.hash-graph-api 2.89% <ø> (ø)
rust.hash-graph-authorization 62.47% <ø> (ø)
rust.hash-graph-postgres-store 25.61% <ø> (ø)
rust.hash-graph-store 30.54% <ø> (ø)
rust.hash-graph-temporal-versioning 47.95% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 83.45% <ø> (ø)
rust.hashql-ast 87.25% <ø> (ø)
rust.hashql-compiletest 46.65% <ø> (ø)
rust.hashql-core 82.13% <43.24%> (-0.19%) ⬇️
rust.hashql-diagnostics 72.43% <ø> (ø)
rust.hashql-eval 68.54% <ø> (ø)
rust.hashql-hir 89.10% <ø> (ø)
rust.hashql-mir 88.51% <ø> (ø)
rust.hashql-syntax-jexpr 94.05% <ø> (ø)
rust.sarif ?
sarif ?
tests.hash-backend-integration ?
unit-tests ?

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.

@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 $$28.3 \mathrm{ms} \pm 226 \mathrm{μs}\left({\color{red}8.92 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.30 \mathrm{ms} \pm 30.2 \mathrm{μs}\left({\color{gray}1.41 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.0 \mathrm{ms} \pm 66.2 \mathrm{μs}\left({\color{gray}1.71 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$41.8 \mathrm{ms} \pm 273 \mathrm{μs}\left({\color{gray}-0.617 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$13.7 \mathrm{ms} \pm 77.0 \mathrm{μs}\left({\color{gray}-0.103 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$22.9 \mathrm{ms} \pm 138 \mathrm{μs}\left({\color{gray}-0.873 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$29.6 \mathrm{ms} \pm 197 \mathrm{μs}\left({\color{lightgreen}-30.599 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.62 \mathrm{ms} \pm 18.1 \mathrm{μs}\left({\color{lightgreen}-81.915 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.3 \mathrm{ms} \pm 74.6 \mathrm{μs}\left({\color{lightgreen}-52.215 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.63 \mathrm{ms} \pm 19.4 \mathrm{μs}\left({\color{gray}0.726 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.82 \mathrm{ms} \pm 9.53 \mathrm{μs}\left({\color{gray}0.061 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.19 \mathrm{ms} \pm 16.2 \mathrm{μs}\left({\color{gray}0.428 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$4.97 \mathrm{ms} \pm 25.7 \mathrm{μs}\left({\color{gray}0.808 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.39 \mathrm{ms} \pm 17.0 \mathrm{μs}\left({\color{gray}0.917 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$3.98 \mathrm{ms} \pm 23.1 \mathrm{μs}\left({\color{gray}0.516 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.25 \mathrm{ms} \pm 23.5 \mathrm{μs}\left({\color{gray}-0.040 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.28 \mathrm{ms} \pm 15.3 \mathrm{μs}\left({\color{gray}0.672 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.93 \mathrm{ms} \pm 27.3 \mathrm{μs}\left({\color{gray}1.58 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.64 \mathrm{ms} \pm 12.4 \mathrm{μs}\left({\color{red}11.8 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.59 \mathrm{ms} \pm 9.90 \mathrm{μs}\left({\color{red}11.0 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.69 \mathrm{ms} \pm 12.7 \mathrm{μs}\left({\color{red}10.2 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.84 \mathrm{ms} \pm 11.8 \mathrm{μs}\left({\color{red}7.92 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.74 \mathrm{ms} \pm 10.2 \mathrm{μs}\left({\color{red}9.20 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.94 \mathrm{ms} \pm 11.3 \mathrm{μs}\left({\color{red}9.22 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.94 \mathrm{ms} \pm 13.5 \mathrm{μs}\left({\color{red}6.53 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.63 \mathrm{ms} \pm 10.7 \mathrm{μs}\left({\color{red}9.06 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.80 \mathrm{ms} \pm 13.2 \mathrm{μs}\left({\color{red}9.20 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.27 \mathrm{ms} \pm 13.8 \mathrm{μs}\left({\color{red}5.81 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.88 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{red}7.78 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.07 \mathrm{ms} \pm 10.1 \mathrm{μs}\left({\color{red}6.64 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.18 \mathrm{ms} \pm 15.3 \mathrm{μs}\left({\color{red}6.27 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.84 \mathrm{ms} \pm 8.59 \mathrm{μs}\left({\color{red}8.04 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.07 \mathrm{ms} \pm 13.7 \mathrm{μs}\left({\color{red}6.91 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$38.5 \mathrm{ms} \pm 168 \mathrm{μs}\left({\color{gray}1.25 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$75.7 \mathrm{ms} \pm 278 \mathrm{μs}\left({\color{gray}-0.119 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$43.5 \mathrm{ms} \pm 184 \mathrm{μs}\left({\color{gray}4.34 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$45.1 \mathrm{ms} \pm 164 \mathrm{μs}\left({\color{gray}0.046 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$53.3 \mathrm{ms} \pm 267 \mathrm{μs}\left({\color{gray}2.17 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$39.5 \mathrm{ms} \pm 181 \mathrm{μs}\left({\color{gray}-0.807 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$417 \mathrm{ms} \pm 863 \mathrm{μs}\left({\color{gray}-0.343 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$94.4 \mathrm{ms} \pm 438 \mathrm{μs}\left({\color{gray}0.133 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$84.1 \mathrm{ms} \pm 368 \mathrm{μs}\left({\color{gray}-0.250 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$312 \mathrm{ms} \pm 1.68 \mathrm{ms}\left({\color{red}13.7 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$15.2 \mathrm{ms} \pm 79.7 \mathrm{μs}\left({\color{gray}3.86 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$14.9 \mathrm{ms} \pm 71.3 \mathrm{μs}\left({\color{gray}1.05 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$14.8 \mathrm{ms} \pm 68.6 \mathrm{μs}\left({\color{gray}-0.340 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$16.3 \mathrm{ms} \pm 425 \mathrm{μs}\left({\color{red}12.5 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$17.7 \mathrm{ms} \pm 81.4 \mathrm{μs}\left({\color{gray}1.79 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$14.5 \mathrm{ms} \pm 71.7 \mathrm{μs}\left({\color{gray}-2.497 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$14.7 \mathrm{ms} \pm 61.9 \mathrm{μs}\left({\color{gray}1.81 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$14.5 \mathrm{ms} \pm 52.0 \mathrm{μs}\left({\color{gray}1.02 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$15.2 \mathrm{ms} \pm 65.5 \mathrm{μs}\left({\color{gray}1.76 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$22.0 \mathrm{ms} \pm 139 \mathrm{μs}\left({\color{gray}0.860 \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.6 \mathrm{ms} \pm 281 \mathrm{μs}\left({\color{gray}0.049 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$29.7 \mathrm{ms} \pm 281 \mathrm{μs}\left({\color{gray}1.32 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$30.0 \mathrm{ms} \pm 253 \mathrm{μs}\left({\color{gray}4.44 \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 251 \mathrm{μs}\left({\color{gray}0.166 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$29.6 \mathrm{ms} \pm 275 \mathrm{μs}\left({\color{gray}3.98 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$29.3 \mathrm{ms} \pm 285 \mathrm{μs}\left({\color{gray}-0.206 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$28.4 \mathrm{ms} \pm 274 \mathrm{μs}\left({\color{gray}0.237 \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 252 \mathrm{μs}\left({\color{gray}2.13 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$28.8 \mathrm{ms} \pm 237 \mathrm{μs}\left({\color{gray}2.07 \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 35.2 \mathrm{μs}\left({\color{gray}1.07 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$46.9 \mathrm{ms} \pm 546 \mathrm{μs}\left({\color{red}5.16 \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.2 \mathrm{ms} \pm 374 \mathrm{μs}\left({\color{gray}1.36 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$52.3 \mathrm{ms} \pm 306 \mathrm{μs}\left({\color{gray}3.53 \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.2 \mathrm{ms} \pm 336 \mathrm{μs}\left({\color{gray}3.54 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$67.4 \mathrm{ms} \pm 350 \mathrm{μs}\left({\color{gray}1.28 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$74.2 \mathrm{ms} \pm 424 \mathrm{μs}\left({\color{gray}1.62 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$48.8 \mathrm{ms} \pm 197 \mathrm{μs}\left({\color{gray}0.611 \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 $$76.1 \mathrm{ms} \pm 348 \mathrm{μs}\left({\color{gray}1.13 \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 $$55.4 \mathrm{ms} \pm 247 \mathrm{μs}\left({\color{gray}-1.058 \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.6 \mathrm{ms} \pm 370 \mathrm{μs}\left({\color{gray}1.66 \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 $$65.5 \mathrm{ms} \pm 344 \mathrm{μs}\left({\color{gray}1.07 \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 $$65.4 \mathrm{ms} \pm 315 \mathrm{μs}\left({\color{gray}0.633 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$131 \mathrm{ms} \pm 394 \mathrm{μs}\left({\color{lightgreen}-5.024 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$131 \mathrm{ms} \pm 469 \mathrm{μs}\left({\color{gray}-3.124 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$38.5 \mathrm{ms} \pm 187 \mathrm{μs}\left({\color{lightgreen}-10.017 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$546 \mathrm{ms} \pm 854 \mathrm{μs}\left({\color{gray}-3.777 \mathrm{\%}}\right) $$ Flame Graph

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

Labels

area/deps Relates to third-party dependencies (area) 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.

2 participants