Skip to content

BE-522: HashQL: Expand stdlib type system with temporal types#8674

Merged
indietyp merged 4 commits into
mainfrom
bm/be-522-hashql-expand-stdlib-type-definitions
May 19, 2026
Merged

BE-522: HashQL: Expand stdlib type system with temporal types#8674
indietyp merged 4 commits into
mainfrom
bm/be-522-hashql-expand-stdlib-type-definitions

Conversation

@indietyp
Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

This PR expands the HashQL standard library's temporal type system and refactors how standard library types are defined and exposed. The QueryTemporalAxes type, previously a stub in the graph module, is replaced with a fully-specified temporal module containing a rich set of temporal bound and interval types (Timestamp, TemporalBound, Interval, LeftClosedTemporalInterval, RightBoundedTemporalInterval, PinnedTransactionTimeTemporalAxes, PinnedDecisionTimeTemporalAxes, QueryTemporalAxes, etc.). Entity types in the knowledge graph are updated to use real temporal metadata (using LeftClosedTemporalInterval) instead of opaque Unknown wrappers.

Alongside this, type construction logic is extracted into public types submodules for each standard library module, enabling external consumers to construct monomorphized type instances without going through the full module registration machinery. Several modules are made pub to support this. The ScratchPool allocator is introduced for multi-threaded bump allocation, and FromIn<&str, A> for Rc<str, A> is implemented. The RuntimeRepr symbol representation is refactored to use extern "C" unsized types and raw pointer field access to avoid provenance issues.

🔗 Related links

🔍 What does this change?

  • Introduces graph::temporal as a new standard library module with a full set of temporal types: Timestamp, DecisionTime, TransactionTime, UnboundedTemporalBound, InclusiveTemporalBound, ExclusiveTemporalBound, TemporalBound, FiniteTemporalBound, OpenTemporalBound, Interval, LeftClosedTemporalInterval, RightBoundedTemporalInterval, PinnedTransactionTimeTemporalAxes, PinnedDecisionTimeTemporalAxes, and QueryTemporalAxes.
  • Removes the stub QueryTemporalAxes (previously an empty opaque struct) from graph::Graph and moves it to the new temporal module.
  • Updates entity knowledge types to depend on graph::temporal::Temporal and use LeftClosedTemporalInterval for TemporalMetadata instead of an opaque Unknown wrapper.
  • Extracts type construction into public types submodules for core::option, core::url, core::uuid, graph::temporal, graph::types::ontology, graph::types::principal::actor_group, graph::types::principal::actor_group::web, and graph::types::knowledge::entity, each accepting optional dependency structs for injection.
  • Makes std_lib, std_lib::core, std_lib::graph, graph::types, graph::types::knowledge, graph::types::ontology, graph::types::principal, graph::types::principal::actor_group, graph::types::principal::actor_group::web, graph::temporal, module::std_lib, and module::std_lib::core::option/url/uuid public.
  • Adds ScratchPool and ScratchPoolGuard to the heap module, providing a Sync-capable pool of bump allocators backed by bump_scope::BumpPool.
  • Implements FromIn<&str, A> for Rc<str, A> with tests covering unicode, empty strings, and clone sharing.
  • Refactors RuntimeRepr to use an extern "C" unsized Unsize type and raw pointer field access (&raw const/mut) to avoid provenance narrowing issues, replacing str_from_raw_parts with str::from_utf8_unchecked and get_mut_unchecked/extern_types nightly features.
  • Migrates string literals used as symbol names and type paths to sym:: constants throughout, eliminating most heap.intern_symbol("...") calls.
  • Adds many new entries to the sym symbol table, including type names, field names, and fully-qualified path symbols for all new and existing types.

🛡 What tests cover this?

  • New unit tests for FromIn<&str, A> for Rc<str, A>: basic conversion, unicode, empty string, and clone pointer equality.
  • Existing standard library module integration tests cover the updated type definitions.

❓ How to test this?

  1. Run cargo test -p hashql-core and confirm all tests pass.
  2. Verify that the temporal module types are accessible and correctly structured via the standard library manifest.

@vercel vercel Bot temporarily deployed to Preview – petrinaut April 29, 2026 14:05 Inactive
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment May 18, 2026 8:51am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview May 18, 2026 8:51am
petrinaut Skipped Skipped May 18, 2026 8:51am

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 29, 2026

PR Summary

Medium Risk
Touches core type definitions and symbol memory representation, including new unsafe pointer/provenance handling, so regressions could affect type checking and symbol interning. Changes are well-scoped but impact foundational libraries used broadly across HashQL.

Overview
Expands HashQL’s stdlib type surface, introducing a new ::graph::temporal module that replaces the old stub QueryTemporalAxes and defines concrete timestamp/bound/interval/axes types used throughout graph queries.

Refactors stdlib type construction by extracting reusable types helper modules (e.g. core::option/url/uuid, graph::types::*, graph::temporal) and making several stdlib modules public, enabling external callers to build monomorphized types without full module registration.

Updates graph/entity types and tests to use the new temporal metadata structures (e.g. RecordId, TemporalMetadata, LeftClosedTemporalInterval) and adjusts many UI snapshot expectations accordingly.

Heap/runtime improvements add a thread-shareable bump allocator pool (ScratchPool) and allocator-aware Rc<str> conversion, while tightening symbol runtime representation (RuntimeRepr) to avoid provenance UB via a new layout and raw-pointer access patterns.

Reviewed by Cursor Bugbot for commit 5d01d1e. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Member Author

indietyp commented Apr 29, 2026

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

@vercel vercel Bot temporarily deployed to Preview – petrinaut April 29, 2026 14:09 Inactive
@github-actions github-actions Bot added the area/tests New or updated tests label Apr 29, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 29, 2026

Merging this PR will degrade performance by 16.09%

❌ 2 (👁 2) regressed benchmarks
✅ 78 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
👁 pattern_match_constant 180 ns 209.2 ns -13.94%
👁 unique[100] 20.1 µs 24.6 µs -18.18%

Comparing bm/be-522-hashql-expand-stdlib-type-definitions (5d01d1e) with main (56860d0)

Open in CodSpeed

Comment thread libs/@local/hashql/core/src/symbol/sym.rs
@indietyp indietyp changed the title BE-435: HashQL: Expand stdlib type system with temporal types BE-522: HashQL: Expand stdlib type system with temporal types Apr 29, 2026
@graphite-app graphite-app Bot requested review from a team April 29, 2026 14:16
TimDiekmann
TimDiekmann previously approved these changes May 15, 2026
Base automatically changed from bm/be-306-hashql-postgres-translation to main May 18, 2026 08:44
@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/apps area/apps > hash-graph labels May 18, 2026
indietyp added 4 commits May 18, 2026 08:45
feat: make Int size aware

feat: postgres serialization

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: errors

feat: psql codec

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: move bridge -> orchestrator

feat: move bridge -> orchestrator

feat: organize the runtime a bit more

feat: organize the runtime a bit more

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: checkpoint

feat: organize the runtime a bit more

feat: finish orchestrator first version

feat: finish orchestrator first version

feat: feat: move out suspension requests to own module

chore: clippy

feat: split out into more manageable functions

feat: split out into more manageable functions

chore: orchestrator docs

feat: organize the runtime a bit more

feat: test orchestrator

feat: better symbol repr

feat: orchestrator test harness

feat: orchestrator test harness

feat: orchestrator test harness

feat: orchestrator test harness

feat: orchestrator test harness

feat: test orchestrator

feat: pipeline

feat: bless snapshots

chore: tests

chore: masking

chore: tests

fix: SSA repair

chiore: ssa repair snapshots

feat: orchestrator test harness

chore: remove spec

fix: library features

chore: update snapshots

chore: update docs
@indietyp indietyp force-pushed the bm/be-522-hashql-expand-stdlib-type-definitions branch from 9047680 to 5d01d1e Compare May 18, 2026 08:45
@vercel vercel Bot temporarily deployed to Preview – petrinaut May 18, 2026 08:45 Inactive
@github-actions github-actions Bot removed area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/apps area/apps > hash-graph labels May 18, 2026
@github-actions github-actions Bot dismissed TimDiekmann’s stale review May 18, 2026 08:45

Latest approval commit 9047680 is not an ancestor of 5d01d1e, indicating rewritten history after approval

@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app Bot commented May 18, 2026

Merge activity

  • May 18, 8:45 AM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$26.1 \mathrm{ms} \pm 128 \mathrm{μs}\left({\color{gray}1.75 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.44 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{gray}0.945 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.4 \mathrm{ms} \pm 64.0 \mathrm{μs}\left({\color{gray}1.70 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$43.5 \mathrm{ms} \pm 279 \mathrm{μs}\left({\color{gray}2.19 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.7 \mathrm{ms} \pm 89.6 \mathrm{μs}\left({\color{gray}0.426 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$24.3 \mathrm{ms} \pm 128 \mathrm{μs}\left({\color{gray}2.41 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$26.7 \mathrm{ms} \pm 155 \mathrm{μs}\left({\color{gray}0.481 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.76 \mathrm{ms} \pm 15.5 \mathrm{μs}\left({\color{gray}1.68 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.8 \mathrm{ms} \pm 96.0 \mathrm{μs}\left({\color{gray}4.63 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.72 \mathrm{ms} \pm 17.8 \mathrm{μs}\left({\color{gray}-0.087 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.99 \mathrm{ms} \pm 12.6 \mathrm{μs}\left({\color{gray}-0.446 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.39 \mathrm{ms} \pm 23.2 \mathrm{μs}\left({\color{gray}1.61 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.13 \mathrm{ms} \pm 27.9 \mathrm{μs}\left({\color{gray}1.32 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.58 \mathrm{ms} \pm 16.2 \mathrm{μs}\left({\color{gray}0.394 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.16 \mathrm{ms} \pm 24.0 \mathrm{μs}\left({\color{gray}2.31 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.45 \mathrm{ms} \pm 29.5 \mathrm{μs}\left({\color{gray}0.866 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.50 \mathrm{ms} \pm 21.7 \mathrm{μs}\left({\color{gray}1.96 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.18 \mathrm{ms} \pm 21.3 \mathrm{μs}\left({\color{gray}4.09 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.73 \mathrm{ms} \pm 12.6 \mathrm{μs}\left({\color{gray}-0.661 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.76 \mathrm{ms} \pm 15.2 \mathrm{μs}\left({\color{gray}1.76 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.87 \mathrm{ms} \pm 17.9 \mathrm{μs}\left({\color{gray}1.29 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.10 \mathrm{ms} \pm 18.6 \mathrm{μs}\left({\color{gray}1.01 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.89 \mathrm{ms} \pm 9.58 \mathrm{μs}\left({\color{gray}0.247 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.21 \mathrm{ms} \pm 14.3 \mathrm{μs}\left({\color{gray}1.72 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.09 \mathrm{ms} \pm 17.1 \mathrm{μs}\left({\color{gray}0.176 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.79 \mathrm{ms} \pm 11.5 \mathrm{μs}\left({\color{gray}-1.258 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.97 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{gray}-0.711 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.50 \mathrm{ms} \pm 17.1 \mathrm{μs}\left({\color{gray}-0.318 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.08 \mathrm{ms} \pm 16.3 \mathrm{μs}\left({\color{gray}0.499 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.31 \mathrm{ms} \pm 17.7 \mathrm{μs}\left({\color{gray}-0.371 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.43 \mathrm{ms} \pm 16.2 \mathrm{μs}\left({\color{gray}-0.624 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.09 \mathrm{ms} \pm 20.8 \mathrm{μs}\left({\color{gray}0.133 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.35 \mathrm{ms} \pm 19.9 \mathrm{μs}\left({\color{gray}0.365 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$44.9 \mathrm{ms} \pm 176 \mathrm{μs}\left({\color{gray}-0.422 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$82.8 \mathrm{ms} \pm 440 \mathrm{μs}\left({\color{gray}1.92 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$51.0 \mathrm{ms} \pm 255 \mathrm{μs}\left({\color{gray}-0.268 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$50.7 \mathrm{ms} \pm 266 \mathrm{μs}\left({\color{gray}-0.937 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$63.5 \mathrm{ms} \pm 295 \mathrm{μs}\left({\color{gray}2.51 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$46.8 \mathrm{ms} \pm 209 \mathrm{μs}\left({\color{gray}1.37 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$420 \mathrm{ms} \pm 999 \mathrm{μs}\left({\color{gray}4.07 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$102 \mathrm{ms} \pm 404 \mathrm{μs}\left({\color{gray}-1.318 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$84.8 \mathrm{ms} \pm 392 \mathrm{μs}\left({\color{gray}0.311 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$325 \mathrm{ms} \pm 1.28 \mathrm{ms}\left({\color{gray}0.729 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$20.9 \mathrm{ms} \pm 133 \mathrm{μs}\left({\color{red}5.18 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$20.6 \mathrm{ms} \pm 127 \mathrm{μs}\left({\color{gray}-0.756 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$20.2 \mathrm{ms} \pm 127 \mathrm{μs}\left({\color{gray}-4.102 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$20.8 \mathrm{ms} \pm 135 \mathrm{μs}\left({\color{gray}1.71 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$24.9 \mathrm{ms} \pm 131 \mathrm{μs}\left({\color{gray}-1.400 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$19.8 \mathrm{ms} \pm 114 \mathrm{μs}\left({\color{gray}-0.517 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$19.9 \mathrm{ms} \pm 137 \mathrm{μs}\left({\color{gray}-0.251 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$19.7 \mathrm{ms} \pm 92.8 \mathrm{μs}\left({\color{gray}-1.457 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$20.1 \mathrm{ms} \pm 115 \mathrm{μs}\left({\color{gray}-3.330 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$26.0 \mathrm{ms} \pm 203 \mathrm{μs}\left({\color{gray}-1.277 \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 $$35.8 \mathrm{ms} \pm 267 \mathrm{μs}\left({\color{gray}2.24 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$34.4 \mathrm{ms} \pm 308 \mathrm{μs}\left({\color{gray}-1.349 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$36.7 \mathrm{ms} \pm 320 \mathrm{μs}\left({\color{red}8.15 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$34.2 \mathrm{ms} \pm 288 \mathrm{μs}\left({\color{gray}-0.997 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$34.8 \mathrm{ms} \pm 307 \mathrm{μs}\left({\color{gray}-1.167 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$33.6 \mathrm{ms} \pm 266 \mathrm{μs}\left({\color{gray}-1.183 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$33.8 \mathrm{ms} \pm 252 \mathrm{μs}\left({\color{gray}-1.968 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$34.6 \mathrm{ms} \pm 226 \mathrm{μs}\left({\color{gray}-1.300 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$34.1 \mathrm{ms} \pm 381 \mathrm{μs}\left({\color{gray}-3.220 \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.32 \mathrm{ms} \pm 32.1 \mathrm{μs}\left({\color{gray}-3.960 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$93.8 \mathrm{ms} \pm 527 \mathrm{μs}\left({\color{gray}-0.574 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$149 \mathrm{ms} \pm 494 \mathrm{μs}\left({\color{gray}-2.004 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$102 \mathrm{ms} \pm 481 \mathrm{μs}\left({\color{gray}-0.470 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$110 \mathrm{ms} \pm 751 \mathrm{μs}\left({\color{gray}0.448 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$119 \mathrm{ms} \pm 517 \mathrm{μs}\left({\color{gray}-1.893 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$128 \mathrm{ms} \pm 625 \mathrm{μs}\left({\color{gray}-1.304 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$104 \mathrm{ms} \pm 440 \mathrm{μs}\left({\color{gray}-2.162 \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 $$131 \mathrm{ms} \pm 517 \mathrm{μs}\left({\color{gray}-3.187 \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 $$111 \mathrm{ms} \pm 441 \mathrm{μs}\left({\color{gray}-2.087 \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 $$117 \mathrm{ms} \pm 449 \mathrm{μs}\left({\color{gray}-3.864 \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 $$119 \mathrm{ms} \pm 407 \mathrm{μs}\left({\color{gray}-4.096 \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 $$121 \mathrm{ms} \pm 394 \mathrm{μs}\left({\color{gray}-0.300 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$132 \mathrm{ms} \pm 626 \mathrm{μs}\left({\color{gray}-3.930 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$141 \mathrm{ms} \pm 580 \mathrm{μs}\left({\color{lightgreen}-5.318 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$110 \mathrm{ms} \pm 460 \mathrm{μs}\left({\color{gray}1.17 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$583 \mathrm{ms} \pm 3.26 \mathrm{ms}\left({\color{gray}2.09 \mathrm{\%}}\right) $$ Flame Graph

@indietyp indietyp requested a review from TimDiekmann May 19, 2026 08:34
@indietyp indietyp enabled auto-merge May 19, 2026 08:35
@indietyp indietyp added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit a474018 May 19, 2026
93 checks passed
@indietyp indietyp deleted the bm/be-522-hashql-expand-stdlib-type-definitions branch May 19, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/libs Relates to first-party libraries/crates/packages (area) 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