Skip to content

FE-1309: Stop committing generated Petrinaut optimizer client types - #9147

Merged
TimDiekmann merged 1 commit into
mainfrom
claude/fe-1309-stop-committing-generated-optimizer-client-types
Aug 3, 2026
Merged

FE-1309: Stop committing generated Petrinaut optimizer client types#9147
TimDiekmann merged 1 commit into
mainfrom
claude/fe-1309-stop-committing-generated-optimizer-client-types

Conversation

@claude

@claude claude Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Requested by Chris Feijoo · Slack thread

🌟 What is the purpose of this PR?

libs/@local/petrinaut-optimizer-client/src/openapi.gen.ts is a generated file that was nonetheless tracked in git. It is the only tracked *.gen.* in the repo — the root .gitignore has covered *.gen.* since long before this file existed, and it was force-added past that rule.

Before. You clone the repo and the generated client types are already sitting there in your worktree. Change anything about the optimizer's OpenAPI spec and you get two diffs to review: the one you wrote, and 500-odd lines of mechanical TypeScript underneath it. Rebase two branches that both touched the spec and you conflict in the generated file as well as the real one. Meanwhile the check that was supposed to keep the file honest — yarn codegen && git diff --exit-code -- src/openapi.gen.ts, wired into the package's test:unit — could never fail, because turbo already runs codegen before test:unit in that package, so the working tree is regenerated before the diff is taken.

After. You clone the repo and the file is not there. The first turbo task that needs it builds it, because codegen is already a declared dependency of build, lint:tsc and test:unit, with the spec as its input and the file as its output — so turbo caches it and rebuilds it exactly when the spec changes. Spec changes now produce one diff. The optimizer spec itself and the generated architecture diagrams are marked linguist-generated, so GitHub collapses them by default too.

This is the arrangement @local/hash-graph-client already uses: commit the spec, mark it generated, gitignore the TypeScript derived from it.

🔗 Related links

🔍 What does this change?

  • Untrack src/openapi.gen.ts via git rm --cached. The file stays on disk; .gitignore:130 (*.gen.*) already covers it, so no new ignore rule was needed.
  • Drop the vacuous guard from the client's test:unit, leaving vitest --run src. The git diff --exit-code clause is now a no-op on an untracked file, and was already a no-op before that for the reason above. The equivalent clause in apps/petrinaut-opt/package.json is deliberately left alone — that one guards the committed spec, which is a real source of truth and does need to stay in sync with the Python app.
  • Add a lint:tsc task to apps/petrinaut-website/turbo.json depending on ^build. This is the load-bearing part: the root turbo.json defines lint:tsc.dependsOn = ["codegen", "build:types"], but @apps/petrinaut-website has neither script and nothing in its chain provides build:types, so the literal CI command (turbo run lint:tsc --filter "@apps/petrinaut-website", .github/workflows/lint.yml:130) never scheduled the client's codegen. On a clean checkout it would have typechecked against a missing file. ^build reaches @local/petrinaut-optimizer-client#build, which depends on that package's codegen.
  • Mark remaining generated Petrinaut artefacts in the root .gitattributes: apps/petrinaut-opt/openapi/openapi.json, and the .d2/.svg files under libs/@hashintel/petrinaut-core/docs/architecture/ produced by scripts/generate-dependency-diagrams.mjs.

⚠️ Known issues

This PR will run CI completely cold, and unrelated flakes may surface. The root turbo.json lists .* in globalDependencies, so editing .gitattributes invalidates the entire turbo cache — every task in the repo rebuilds from scratch on this branch. A red check here is worth a second look before it is attributed to the diff; compare against the same job on main.

On a fresh clone the generated file is absent until something builds it. libs/@local/petrinaut-optimizer-client/src/openapi.gen.ts does not exist until the first turbo build, lint or test run produces it, so until then an editor's language server reports unresolved imports in that package and in apps/petrinaut-website. This is the cost of not tracking the file; running any of those tasks once resolves it for good.

🛡 What tests cover this?

Nothing new. The removed git diff --exit-code clause was not providing coverage — it could not fail. Real drift protection lives in apps/petrinaut-opt's test:unit, which regenerates the spec from the Python app and diffs it, and is untouched here.

❓ How to test this?

  1. Check out the branch and confirm the generated file is gone from git but present locally:
    git ls-files libs/@local/petrinaut-optimizer-client/src/openapi.gen.ts   # no output
    git check-ignore -v libs/@local/petrinaut-optimizer-client/src/openapi.gen.ts
    
  2. Delete it and confirm turbo brings it back:
    rm libs/@local/petrinaut-optimizer-client/src/openapi.gen.ts
    turbo run lint:tsc --filter "@apps/petrinaut-website"
    
  3. Confirm the .gitattributes globs match the four intended files and nothing else:
    git ls-files 'libs/@hashintel/petrinaut-core/docs/architecture/' | xargs git check-attr linguist-generated --
    

Verified locally: re-running the exact codegen command by hand (openapi-typescript@7.13.0 + oxfmt@0.50.0, matching the pinned devDependencies) reproduces the previously committed file byte-for-byte.

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:

  • affected the execution graph, and the turbo.json's have been updated to reflect this

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
petrinaut Ready Ready Preview Aug 3, 2026 2:00pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hash Ignored Ignored Preview Aug 3, 2026 2:00pm
hashdotdesign-tokens Ignored Ignored Preview Aug 3, 2026 2:00pm

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.57%. Comparing base (8648154) to head (0250f58).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9147      +/-   ##
==========================================
- Coverage   59.57%   59.57%   -0.01%     
==========================================
  Files        1413     1413              
  Lines      138053   138053              
  Branches     6510     6510              
==========================================
- Hits        82242    82240       -2     
- Misses      54769    54771       +2     
  Partials     1042     1042              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.99% <ø> (ø)
apps.hash-api 12.56% <ø> (ø)
blockprotocol.type-system 40.84% <ø> (ø)
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.49% <ø> (ø)
local.hash-backend-utils 3.27% <ø> (ø)
local.hash-graph-sdk 10.02% <ø> (ø)
local.hash-isomorphic-utils 12.25% <ø> (ø)
rust.antsi 2.36% <ø> (ø)
rust.error-stack 90.81% <ø> (ø)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.19% <ø> (-0.04%) ⬇️
rust.harpc-tower 67.03% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 92.23% <ø> (ø)
rust.hash-codec 72.76% <ø> (ø)
rust.hash-graph-api 7.36% <ø> (ø)
rust.hash-graph-authorization 62.59% <ø> (ø)
rust.hash-graph-embeddings 91.88% <ø> (ø)
rust.hash-graph-postgres-store 29.66% <ø> (ø)
rust.hash-graph-store 42.16% <ø> (ø)
rust.hash-graph-temporal-versioning 47.95% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 84.71% <ø> (ø)
rust.hashql-ast 89.63% <ø> (ø)
rust.hashql-compiletest 28.39% <ø> (ø)
rust.hashql-core 78.98% <ø> (ø)
rust.hashql-diagnostics 72.51% <ø> (ø)
rust.hashql-eval 79.82% <ø> (ø)
rust.hashql-hir 89.09% <ø> (ø)
rust.hashql-mir 87.92% <ø> (ø)
rust.hashql-syntax-jexpr 94.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-hq

codspeed-hq Bot commented Aug 3, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 98 untouched benchmarks


Comparing claude/fe-1309-stop-committing-generated-optimizer-client-types (0250f58) with main (3f6e8a5)

Open in CodSpeed

@claude
claude Bot marked this pull request as ready for review August 3, 2026 10:23
@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes CI/build graph ordering for typecheck on clean clones; a misconfigured turbo dependency could leave lint:tsc running without generated types, but scope is tooling and generated artefacts only.

Overview
Stops tracking openapi.gen.ts in @local/petrinaut-optimizer-client so OpenAPI spec changes no longer produce large mechanical TypeScript diffs; the file is still produced by existing codegen (turbo inputs/outputs unchanged) and covered by *.gen.* in .gitignore.

test:unit on that package now runs Vitest only—the git diff --exit-code guard against a committed generated file is removed. A postinstall turbo task depends on codegen so a fresh install regenerates types locally.

apps/petrinaut-website gains lint:tsc with dependsOn: ["^build"] so CI typecheck pulls in the optimizer client build (and thus codegen) on clean checkouts where the generated file is absent.

Root .gitattributes marks the optimizer OpenAPI JSON and Petrinaut architecture .d2/.svg as linguist-generated for collapsed GitHub diffs.

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

TimDiekmann
TimDiekmann previously approved these changes Aug 3, 2026
`src/openapi.gen.ts` is derived entirely from the committed spec at
`apps/petrinaut-opt/openapi/openapi.json` by the package's `codegen`
script, and was force-added past the root `.gitignore` rule for
`*.gen.*`. Untrack it; the ignore rule already covers it, and every
task that reads it depends on `codegen`.

The `git diff --exit-code` clause in the client's `test:unit` ran
after `yarn codegen` in a package where turbo already sequences
`codegen` first, so it could never report a difference. Drop it. The
equivalent clause in `apps/petrinaut-opt` guards the committed spec
and stays.

Give `@apps/petrinaut-website` a `lint:tsc` task depending on
`^build`. The root definition depends on `codegen` and `build:types`,
neither of which the website has anywhere in its chain, so
`turbo run lint:tsc --filter "@apps/petrinaut-website"` never
scheduled the client's `codegen`.

Mark the optimizer OpenAPI spec and the generated architecture
diagrams as `linguist-generated` so they collapse in diffs.
@TimDiekmann
TimDiekmann added this pull request to the merge queue Aug 3, 2026
Merged via the queue into main with commit ac5ec9c Aug 3, 2026
452 of 456 checks passed
@TimDiekmann
TimDiekmann deleted the claude/fe-1309-stop-committing-generated-optimizer-client-types branch August 3, 2026 15:04
@github-actions

github-actions Bot commented Aug 3, 2026

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.9 \mathrm{ms} \pm 233 \mathrm{μs}\left({\color{red}8.43 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.90 \mathrm{ms} \pm 23.0 \mathrm{μs}\left({\color{red}11.1 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$15.5 \mathrm{ms} \pm 113 \mathrm{μs}\left({\color{red}20.5 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$47.1 \mathrm{ms} \pm 495 \mathrm{μs}\left({\color{red}6.88 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$16.0 \mathrm{ms} \pm 149 \mathrm{μs}\left({\color{red}9.39 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$28.2 \mathrm{ms} \pm 236 \mathrm{μs}\left({\color{red}10.8 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$31.5 \mathrm{ms} \pm 217 \mathrm{μs}\left({\color{red}9.12 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$4.22 \mathrm{ms} \pm 36.8 \mathrm{μs}\left({\color{red}10.7 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$16.2 \mathrm{ms} \pm 128 \mathrm{μs}\left({\color{red}16.0 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.88 \mathrm{ms} \pm 25.8 \mathrm{μs}\left({\color{gray}1.16 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.04 \mathrm{ms} \pm 18.2 \mathrm{μs}\left({\color{gray}1.36 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.44 \mathrm{ms} \pm 20.4 \mathrm{μs}\left({\color{gray}0.890 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.23 \mathrm{ms} \pm 33.7 \mathrm{μs}\left({\color{gray}-0.479 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.62 \mathrm{ms} \pm 22.7 \mathrm{μs}\left({\color{gray}1.40 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.26 \mathrm{ms} \pm 37.2 \mathrm{μs}\left({\color{gray}1.72 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.53 \mathrm{ms} \pm 41.3 \mathrm{μs}\left({\color{gray}1.67 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.51 \mathrm{ms} \pm 20.0 \mathrm{μs}\left({\color{gray}0.510 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.19 \mathrm{ms} \pm 28.8 \mathrm{μs}\left({\color{gray}1.07 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.77 \mathrm{ms} \pm 17.1 \mathrm{μs}\left({\color{gray}2.50 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.67 \mathrm{ms} \pm 17.6 \mathrm{μs}\left({\color{gray}4.78 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.74 \mathrm{ms} \pm 18.2 \mathrm{μs}\left({\color{gray}2.23 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.98 \mathrm{ms} \pm 21.5 \mathrm{μs}\left({\color{gray}0.566 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.81 \mathrm{ms} \pm 16.6 \mathrm{μs}\left({\color{gray}1.68 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.97 \mathrm{ms} \pm 16.9 \mathrm{μs}\left({\color{gray}0.188 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.32 \mathrm{ms} \pm 30.3 \mathrm{μs}\left({\color{red}7.11 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.96 \mathrm{ms} \pm 21.1 \mathrm{μs}\left({\color{red}6.64 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$3.31 \mathrm{ms} \pm 24.6 \mathrm{μs}\left({\color{red}9.23 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.70 \mathrm{ms} \pm 27.8 \mathrm{μs}\left({\color{red}6.23 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.31 \mathrm{ms} \pm 27.9 \mathrm{μs}\left({\color{red}9.63 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.69 \mathrm{ms} \pm 23.9 \mathrm{μs}\left({\color{red}10.4 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.73 \mathrm{ms} \pm 35.9 \mathrm{μs}\left({\color{red}9.38 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.22 \mathrm{ms} \pm 20.4 \mathrm{μs}\left({\color{red}6.87 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.61 \mathrm{ms} \pm 24.9 \mathrm{μs}\left({\color{red}7.18 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$48.5 \mathrm{ms} \pm 248 \mathrm{μs}\left({\color{red}9.11 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$38.5 \mathrm{ms} \pm 251 \mathrm{μs}\left({\color{red}11.0 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$40.3 \mathrm{ms} \pm 244 \mathrm{μs}\left({\color{red}8.36 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$36.9 \mathrm{ms} \pm 271 \mathrm{μs}\left({\color{lightgreen}-9.201 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$48.4 \mathrm{ms} \pm 361 \mathrm{μs}\left({\color{red}11.7 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$55.6 \mathrm{ms} \pm 375 \mathrm{μs}\left({\color{red}9.64 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$45.6 \mathrm{ms} \pm 289 \mathrm{μs}\left({\color{red}9.67 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$100 \mathrm{ms} \pm 516 \mathrm{μs}\left({\color{red}7.47 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$39.1 \mathrm{ms} \pm 225 \mathrm{μs}\left({\color{gray}4.94 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$298 \mathrm{ms} \pm 876 \mathrm{μs}\left({\color{gray}2.30 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$12.7 \mathrm{ms} \pm 88.0 \mathrm{μs}\left({\color{red}11.3 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$13.0 \mathrm{ms} \pm 114 \mathrm{μs}\left({\color{red}10.1 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$13.3 \mathrm{ms} \pm 90.6 \mathrm{μs}\left({\color{red}9.74 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$13.2 \mathrm{ms} \pm 65.3 \mathrm{μs}\left({\color{red}11.3 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$12.7 \mathrm{ms} \pm 75.5 \mathrm{μs}\left({\color{red}8.55 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$13.0 \mathrm{ms} \pm 114 \mathrm{μs}\left({\color{red}11.9 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$13.2 \mathrm{ms} \pm 74.8 \mathrm{μs}\left({\color{red}9.26 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$12.9 \mathrm{ms} \pm 86.0 \mathrm{μs}\left({\color{red}8.20 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$13.3 \mathrm{ms} \pm 84.6 \mathrm{μs}\left({\color{red}11.2 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$14.3 \mathrm{ms} \pm 126 \mathrm{μs}\left({\color{red}15.4 \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 $$12.9 \mathrm{ms} \pm 85.9 \mathrm{μs}\left({\color{red}6.34 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$13.2 \mathrm{ms} \pm 91.5 \mathrm{μs}\left({\color{red}9.14 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$13.3 \mathrm{ms} \pm 91.7 \mathrm{μs}\left({\color{red}9.93 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$12.9 \mathrm{ms} \pm 83.3 \mathrm{μs}\left({\color{red}6.80 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$13.8 \mathrm{ms} \pm 120 \mathrm{μs}\left({\color{red}13.9 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$12.7 \mathrm{ms} \pm 84.5 \mathrm{μs}\left({\color{red}5.41 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$13.1 \mathrm{ms} \pm 82.9 \mathrm{μs}\left({\color{red}7.09 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$13.4 \mathrm{ms} \pm 98.4 \mathrm{μs}\left({\color{red}10.1 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$12.6 \mathrm{ms} \pm 77.2 \mathrm{μs}\left({\color{gray}1.59 \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 $$9.24 \mathrm{ms} \pm 65.8 \mathrm{μs}\left({\color{gray}3.93 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$66.0 \mathrm{ms} \pm 529 \mathrm{μs}\left({\color{gray}0.617 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$121 \mathrm{ms} \pm 698 \mathrm{μs}\left({\color{gray}2.96 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$74.2 \mathrm{ms} \pm 572 \mathrm{μs}\left({\color{gray}4.82 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$84.0 \mathrm{ms} \pm 540 \mathrm{μs}\left({\color{gray}3.20 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$93.5 \mathrm{ms} \pm 618 \mathrm{μs}\left({\color{gray}2.02 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$100 \mathrm{ms} \pm 754 \mathrm{μs}\left({\color{gray}3.02 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$48.2 \mathrm{ms} \pm 285 \mathrm{μs}\left({\color{red}5.55 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$77.7 \mathrm{ms} \pm 422 \mathrm{μs}\left({\color{gray}3.81 \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 $$54.2 \mathrm{ms} \pm 350 \mathrm{μs}\left({\color{red}6.31 \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.9 \mathrm{ms} \pm 441 \mathrm{μs}\left({\color{red}5.17 \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.8 \mathrm{ms} \pm 435 \mathrm{μs}\left({\color{red}7.57 \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.8 \mathrm{ms} \pm 497 \mathrm{μs}\left({\color{gray}4.81 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$120 \mathrm{ms} \pm 836 \mathrm{μs}\left({\color{gray}-0.433 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$131 \mathrm{ms} \pm 578 \mathrm{μs}\left({\color{gray}0.460 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$19.9 \mathrm{ms} \pm 138 \mathrm{μs}\left({\color{gray}2.44 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$538 \mathrm{ms} \pm 1.31 \mathrm{ms}\left({\color{gray}-0.245 \mathrm{\%}}\right) $$ Flame Graph

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

Labels

area/apps 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.

3 participants