Skip to content

BE-860: Add Problem and error-stack integration - #9760

Merged
TimDiekmann merged 2 commits into
t/be-353-connect-problem-types-and-detailsfrom
t/be-353-add-problem-trait
Sep 16, 2026
Merged

TimDiekmann merged 2 commits into
t/be-353-connect-problem-types-and-detailsfrom
t/be-353-add-problem-trait

Conversation

@TimDiekmann

@TimDiekmann TimDiekmann commented Sep 16, 2026

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

Let failures provide typed problem details and attach those public details to an error-stack report. An attached problem remains available after change_context, so an API boundary can retrieve it independently of the report's current context.

🔗 Related links

Ignore BE-353

🚫 Blocked by

🔍 What does this change?

  • Add Problem::details() with a generic associated extension type that can borrow from the failure. The core trait works without optional features.
  • Implement Problem for ProblemDetails, borrowing its strings and extensions, and for ProblemType, borrowing its metadata with empty extensions. Problem definitions can be attached directly to reports.
  • Add the optional error-stack feature, which includes serde. Its ReportExt trait attaches problems and retrieves their details; ResultExt adds eager and lazy attachment methods for results containing ordinary errors or existing reports.
  • Store the original problem and erase its extension type with erased-serde when retrieving details. Serialization and extension validation happen when the caller serializes those details.
  • Select the most recently attached problem in a single context chain. For appended reports, use the first attachment in frame traversal order. Reports without an attached problem return None.
  • Document the APIs and feature dependencies, and regenerate the crate's workspace dependency wiring and task dependency documentation.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies a Cargo-publishable library, but it is not yet ready to publish

📜 Does this require a change to the docs?

The changes in this PR:

  • require changes to docs which are made as part of this PR

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • affect the execution graph, and the generated package dependency wiring and task dependency documentation have been updated.

The new workspace dependency is @rust/error-stack; the existing turbo.json task configuration applies unchanged.

⚠️ Known issues

Attaching a problem requires an owned Send + Sync + 'static problem whose projected extensions implement Serialize. The core Problem trait has none of these bounds. Retrieving attached details allocates a box for the projected extensions.

🐾 Next steps

Use these APIs in authentication and rate-limit middleware, then add HTTP response conversion and Aide documentation for the public /v1 API.

🛡 What tests cover this?

  • Core tests cover borrowing strings and extension members, including extension types without Clone or Serialize.
  • Error-stack tests cover context changes, multiple attachments, appended reports, heterogeneous extensions, missing attachments, and deferred serialization errors.
  • Result tests cover ordinary errors, preservation of existing report frames, caller locations, and lazy factories that run exactly once on error and never on success.
  • All 43 crate tests and eight doctests pass. Clippy, Rustdoc, formatting, and feature-combination checks also pass.

❓ How to test this?

Run from the repository root with the pinned toolchain:

cargo nextest run -p problematic --all-features
cargo test -p problematic --all-features --doc
cargo clippy -p problematic --all-features --all-targets --no-deps -- -D warnings
RUSTDOCFLAGS='-D warnings' cargo doc -p problematic --all-features --no-deps
cargo fmt -p problematic --check
cargo hack check -p problematic --feature-powerset --no-dev-deps

📹 Demo

use std::{borrow::Cow, io};

use error_stack::ResultExt as _;
use problematic::{
    ProblemType, StatusCode,
    error_stack::{ReportExt as _, ResultExt as _},
};

const INVALID_PARAMETER: ProblemType = ProblemType {
    type_uri: Cow::Borrowed("https://example.com/problems/invalid-parameter"),
    title: Cow::Borrowed("Invalid parameter"),
    status: StatusCode::BAD_REQUEST,
};

let input = "zero";
let report = input
    .parse::<u64>()
    .attach_problem_with(|| {
        INVALID_PARAMETER.detail(format!("The limit `{input}` is not an integer."))
    })
    .change_context(io::Error::other("request failed"))
    .expect_err("the input should fail to parse");

let details = report.problem_details().expect("the problem is attached");
assert_eq!(details.status, 400);

@TimDiekmann
TimDiekmann added this pull request to stack #9757 September 16, 2026 14:05
@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

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

4 Skipped Deployments
Project Deployment Actions Updated
hash Ignored Ignored Preview Sep 16, 2026 2:26pm UTC
hashdotdesign-tokens Ignored Ignored Preview Sep 16, 2026 2:26pm UTC
petrinaut Skipped Skipped Sep 16, 2026 2:26pm UTC
petrinaut-docs Skipped Skipped Sep 16, 2026 2:26pm UTC

Request Review

@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) 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 labels Sep 16, 2026
@TimDiekmann TimDiekmann self-assigned this Sep 16, 2026
@TimDiekmann TimDiekmann changed the title Add Problem trait and error-stack attachments BE-353: Add Problem and error-stack integration Sep 16, 2026
@TimDiekmann TimDiekmann changed the title BE-353: Add Problem and error-stack integration BE-860: Add Problem and error-stack integration Sep 16, 2026
@TimDiekmann
TimDiekmann marked this pull request as ready for review September 16, 2026 14:12
@TimDiekmann
TimDiekmann requested a review from a team as a code owner September 16, 2026 14:12
@cursor

cursor Bot commented Sep 16, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
New public API in a publishable library affects how API boundaries surface errors to clients; behavior around report merging and attachment precedence must be correct at HTTP boundaries.

Overview
Introduces a Problem trait so failures can expose RFC 7807-style ProblemDetails (including typed extension members that may borrow from the failure), with ProblemType and ProblemDetails gaining Problem implementations.

Adds an optional error-stack feature (pulls in serde) with ReportExt / ResultExt: attach a public problem to a report or result, read it back via problem_details() after change_context, and defer extension serialization until the returned details are serialized (type-erased via erased-serde). Most recent attachment wins in a single chain; appended reports use first-match frame order.

Workspace and package wiring, README feature docs, and broad integration tests cover context changes, lazy attach_problem_with, and serialization validation through erasure.

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

@TimDiekmann
TimDiekmann requested a review from a team September 16, 2026 14:12
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.51163% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.91%. Comparing base (a05f516) to head (f90a433).

Files with missing lines Patch % Lines
libs/problematic/rust/src/problem_type.rs 66.66% 0 Missing and 2 partials ⚠️
libs/problematic/rust/src/problem.rs 97.36% 1 Missing ⚠️
Additional details and impacted files
@@                              Coverage Diff                               @@
##           t/be-353-connect-problem-types-and-details    #9760      +/-   ##
==============================================================================
+ Coverage                                       65.90%   65.91%   +0.01%     
==============================================================================
  Files                                            1892     1894       +2     
  Lines                                          198765   198845      +80     
  Branches                                         8251     8251              
==============================================================================
+ Hits                                           130987   131070      +83     
+ Misses                                          66246    66243       -3     
  Partials                                         1532     1532              
Flag Coverage Δ
rust.problematic 73.88% <96.51%> (+8.04%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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

codspeed Bot commented Sep 16, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 6 benchmarks measured no execution time

Nothing ran under measurement, usually because the compiler removed the code under test. These results are not comparable, so they count as unchanged.

Preventing compiler optimizations

✅ 98 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚠️ as_constant < 1 ns < 1 ns N/A
⚠️ constant_equal < 1 ns < 1 ns N/A
⚠️ constant_not_equal < 1 ns < 1 ns N/A
⚠️ access < 1 ns < 1 ns N/A
⚠️ runtime_equal < 1 ns < 1 ns N/A
⚠️ runtime_not_equal < 1 ns < 1 ns N/A

Comparing t/be-353-add-problem-trait (f90a433) with main (8f70c35)1

Open in CodSpeed

Footnotes

  1. No successful run was found on t/be-353-connect-problem-types-and-details (a05f516) during the generation of this report, so main (8f70c35) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 16, 2026 14:26 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 16, 2026 14:26 Inactive
@TimDiekmann
TimDiekmann added this pull request to the merge queue Sep 16, 2026
Merged via the queue into main with commit 9b4d0a1 Sep 16, 2026
240 checks passed
@TimDiekmann
TimDiekmann deleted the t/be-353-add-problem-trait branch September 16, 2026 15:19
@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 $$29.4 \mathrm{ms} \pm 247 \mathrm{μs}\left({\color{gray}4.78 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.57 \mathrm{ms} \pm 22.4 \mathrm{μs}\left({\color{gray}1.16 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$14.5 \mathrm{ms} \pm 141 \mathrm{μs}\left({\color{red}13.1 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$46.7 \mathrm{ms} \pm 458 \mathrm{μs}\left({\color{gray}4.94 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.4 \mathrm{ms} \pm 138 \mathrm{μs}\left({\color{red}6.40 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$25.4 \mathrm{ms} \pm 211 \mathrm{μs}\left({\color{gray}-0.692 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$30.7 \mathrm{ms} \pm 228 \mathrm{μs}\left({\color{red}6.21 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.93 \mathrm{ms} \pm 29.1 \mathrm{μs}\left({\color{gray}2.31 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$15.8 \mathrm{ms} \pm 122 \mathrm{μs}\left({\color{red}13.4 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.94 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{gray}-1.096 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.05 \mathrm{ms} \pm 22.0 \mathrm{μs}\left({\color{gray}-0.940 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.44 \mathrm{ms} \pm 19.9 \mathrm{μs}\left({\color{gray}-1.434 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.39 \mathrm{ms} \pm 38.9 \mathrm{μs}\left({\color{gray}1.34 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.69 \mathrm{ms} \pm 30.3 \mathrm{μs}\left({\color{gray}2.28 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.35 \mathrm{ms} \pm 33.0 \mathrm{μs}\left({\color{gray}1.01 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.67 \mathrm{ms} \pm 35.3 \mathrm{μs}\left({\color{gray}0.957 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.55 \mathrm{ms} \pm 23.6 \mathrm{μs}\left({\color{gray}-1.336 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.22 \mathrm{ms} \pm 33.1 \mathrm{μs}\left({\color{gray}-3.225 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.76 \mathrm{ms} \pm 17.3 \mathrm{μs}\left({\color{gray}-1.287 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.71 \mathrm{ms} \pm 16.1 \mathrm{μs}\left({\color{gray}-1.291 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.82 \mathrm{ms} \pm 13.3 \mathrm{μs}\left({\color{gray}-0.246 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.12 \mathrm{ms} \pm 18.4 \mathrm{μs}\left({\color{gray}-0.327 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.91 \mathrm{ms} \pm 16.2 \mathrm{μs}\left({\color{gray}0.081 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.19 \mathrm{ms} \pm 22.1 \mathrm{μs}\left({\color{gray}-0.571 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.17 \mathrm{ms} \pm 22.2 \mathrm{μs}\left({\color{gray}0.400 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.82 \mathrm{ms} \pm 20.2 \mathrm{μs}\left({\color{gray}0.244 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$3.02 \mathrm{ms} \pm 22.0 \mathrm{μs}\left({\color{gray}-0.028 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.62 \mathrm{ms} \pm 22.9 \mathrm{μs}\left({\color{gray}-0.005 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.13 \mathrm{ms} \pm 19.7 \mathrm{μs}\left({\color{gray}0.511 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.38 \mathrm{ms} \pm 21.9 \mathrm{μs}\left({\color{gray}-0.117 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.54 \mathrm{ms} \pm 22.1 \mathrm{μs}\left({\color{gray}-1.120 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.12 \mathrm{ms} \pm 23.4 \mathrm{μs}\left({\color{gray}0.940 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.42 \mathrm{ms} \pm 22.2 \mathrm{μs}\left({\color{gray}-0.715 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$32.0 \mathrm{ms} \pm 152 \mathrm{μs}\left({\color{gray}-1.763 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$71.2 \mathrm{ms} \pm 550 \mathrm{μs}\left({\color{gray}0.373 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$36.2 \mathrm{ms} \pm 211 \mathrm{μs}\left({\color{gray}1.87 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$39.9 \mathrm{ms} \pm 258 \mathrm{μs}\left({\color{gray}0.257 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$42.8 \mathrm{ms} \pm 264 \mathrm{μs}\left({\color{gray}-1.213 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$34.3 \mathrm{ms} \pm 200 \mathrm{μs}\left({\color{gray}1.78 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$421 \mathrm{ms} \pm 1.42 \mathrm{ms}\left({\color{gray}-0.866 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$92.1 \mathrm{ms} \pm 523 \mathrm{μs}\left({\color{gray}-0.623 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$79.9 \mathrm{ms} \pm 485 \mathrm{μs}\left({\color{gray}0.300 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$280 \mathrm{ms} \pm 1.30 \mathrm{ms}\left({\color{lightgreen}-12.020 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$10.4 \mathrm{ms} \pm 60.1 \mathrm{μs}\left({\color{gray}-2.455 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$10.6 \mathrm{ms} \pm 53.0 \mathrm{μs}\left({\color{gray}-1.420 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$10.7 \mathrm{ms} \pm 62.8 \mathrm{μs}\left({\color{gray}-2.268 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$10.6 \mathrm{ms} \pm 73.2 \mathrm{μs}\left({\color{gray}-2.265 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$10.7 \mathrm{ms} \pm 58.4 \mathrm{μs}\left({\color{gray}-1.131 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$10.7 \mathrm{ms} \pm 72.8 \mathrm{μs}\left({\color{gray}-0.227 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$10.5 \mathrm{ms} \pm 62.6 \mathrm{μs}\left({\color{gray}-1.289 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$10.5 \mathrm{ms} \pm 56.3 \mathrm{μs}\left({\color{gray}-2.944 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$10.8 \mathrm{ms} \pm 74.3 \mathrm{μs}\left({\color{gray}-0.120 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$10.9 \mathrm{ms} \pm 67.4 \mathrm{μs}\left({\color{gray}-0.673 \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 $$11.0 \mathrm{ms} \pm 79.6 \mathrm{μs}\left({\color{gray}-1.719 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$10.9 \mathrm{ms} \pm 79.4 \mathrm{μs}\left({\color{gray}-0.703 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$11.0 \mathrm{ms} \pm 82.7 \mathrm{μs}\left({\color{gray}-1.914 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$10.9 \mathrm{ms} \pm 65.9 \mathrm{μs}\left({\color{gray}-4.405 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$10.9 \mathrm{ms} \pm 87.0 \mathrm{μs}\left({\color{gray}-1.834 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$11.0 \mathrm{ms} \pm 76.8 \mathrm{μs}\left({\color{gray}0.086 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$11.1 \mathrm{ms} \pm 71.4 \mathrm{μs}\left({\color{gray}-0.322 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$10.9 \mathrm{ms} \pm 81.7 \mathrm{μs}\left({\color{gray}-1.126 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$11.0 \mathrm{ms} \pm 79.7 \mathrm{μs}\left({\color{gray}-2.601 \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.09 \mathrm{ms} \pm 61.5 \mathrm{μs}\left({\color{gray}0.833 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$59.6 \mathrm{ms} \pm 524 \mathrm{μs}\left({\color{gray}1.19 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$110 \mathrm{ms} \pm 597 \mathrm{μs}\left({\color{gray}-1.996 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$65.2 \mathrm{ms} \pm 528 \mathrm{μs}\left({\color{gray}1.06 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$73.5 \mathrm{ms} \pm 470 \mathrm{μs}\left({\color{gray}-3.456 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$81.2 \mathrm{ms} \pm 569 \mathrm{μs}\left({\color{gray}-2.968 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$89.6 \mathrm{ms} \pm 511 \mathrm{μs}\left({\color{gray}-0.411 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$47.2 \mathrm{ms} \pm 367 \mathrm{μs}\left({\color{gray}-0.964 \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 $$74.5 \mathrm{ms} \pm 421 \mathrm{μs}\left({\color{gray}-0.785 \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 $$52.9 \mathrm{ms} \pm 377 \mathrm{μs}\left({\color{gray}1.06 \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 $$61.5 \mathrm{ms} \pm 506 \mathrm{μs}\left({\color{gray}0.753 \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 $$63.3 \mathrm{ms} \pm 379 \mathrm{μs}\left({\color{gray}0.206 \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 $$63.5 \mathrm{ms} \pm 410 \mathrm{μs}\left({\color{gray}0.020 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$115 \mathrm{ms} \pm 651 \mathrm{μs}\left({\color{gray}-3.462 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$127 \mathrm{ms} \pm 731 \mathrm{μs}\left({\color{gray}-3.181 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$23.6 \mathrm{ms} \pm 231 \mathrm{μs}\left({\color{gray}-0.146 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$536 \mathrm{ms} \pm 1.68 \mathrm{ms}\left({\color{red}6.69 \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/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

Development

Successfully merging this pull request may close these issues.

2 participants