Skip to content

SRE-946: Report why a mise download failed in .config/mise/install.sh - #9212

Merged
TimDiekmann merged 6 commits into
mainfrom
claude/sre-946-mise-install-error-output
Aug 13, 2026
Merged

SRE-946: Report why a mise download failed in .config/mise/install.sh#9212
TimDiekmann merged 6 commits into
mainfrom
claude/sre-946-mise-install-error-output

Conversation

@claude

@claude claude Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Requested by Tim Diekmann · Slack thread

🌟 What is the purpose of this PR?

Before. When a Vercel build for apps/hash-frontend or apps/petrinaut-website failed inside .config/mise/install.sh, the log said one of two things and nothing more:

curl: (22)
sha256sum: 'standard input': no properly formatted checksum lines found

No URL, no HTTP status code, no response body, no rate-limit headers — nothing to tell you which of the two downloads broke or why.

After. The same failure prints what actually happened:

error: failed to download https://github.com/jdx/mise/releases/download/v2026.7.14/mise-v2026.7.14-linux-x64.tar.gz
  curl exit code: 0
  http status:    403
  x-ratelimit-limit: 60
  x-ratelimit-remaining: 0
  x-ratelimit-reset: 1786580000
  retry-after: 60
  response body (first 2000 bytes):
    {"message":"API rate limit exceeded for 18.204.x.x.", ...}

and a checksum file that isn't a checksum file is named as such rather than being reported as a parse error:

error: no checksum entry for mise-v2026.7.14-linux-x64.tar.gz in https://github.com/jdx/mise/releases/download/v2026.7.14/SHASUMS256.txt
  received (first 2000 bytes):
    <html><head><title>429 Too Many Requests</title></head>
    ...

On top of that, transient failures are now retried instead of failing the build outright, and the fetches authenticate when a GitHub token is present.

How. Both downloads go through one fetch helper. It deliberately does not pass --fail, because -f is what threw GitHub's response body away in the first place; instead it records --write-out '%{http_code}' and --dump-header, checks the status itself, and on failure prints the URL, curl's exit code, the HTTP status, the final response's retry-after / x-ratelimit-* headers and the first 2000 bytes of the body. It adds --retry 5 --retry-all-errors --retry-delay 2 --retry-max-time 60 --connect-timeout 10 --max-time 300, and sends Authorization: Bearer … when MISE_GITHUB_TOKEN or GITHUB_TOKEN is non-empty — curl does not read those variables on its own, so nothing was authenticating them before. Unauthenticated installs keep working unchanged. The checksum step greps its entry into a file before running sha256sum -c on it, so a truncated or error-page response is diagnosed as a bad download rather than as a checksum parse failure.

This is not a confirmed root-cause fix. Rate limiting fits the evidence (unauthenticated fetches, a 6.6h burst of failures at 25% vs a 1.3% baseline, HTTP-error exit codes) but was never confirmed: the Vercel build logs are unreadable with the credentials available, and no rate-limit headers were ever captured — precisely because the script discarded them. The change is to make the next failure legible, so the cause can be read off the build log rather than inferred.

🔗 Related links

🚫 Blocked by

  • Nothing

🔍 What does this change?

Mostly .config/mise/install.shMISE_VERSION, the tar/extract step and everything else in that file are untouched. One related CI fix in .github/actions/install-tools/action.yml rides along; it is the last bullet below.

  • New fetch helper for both release-asset downloads. Keeps -sS -L, drops -f, adds --write-out '%{http_code}', --dump-header and --output, and reports failure itself so the body survives to be printed.
  • Retries and timeouts: --retry 5 --retry-all-errors --retry-delay 2 --retry-max-time 60 --connect-timeout 10 --max-time 300. curl already treats 408/429/5xx as transient, so a rate-limited or flapping response is retried; --retry-all-errors extends that to transport failures such as exit 56. --retry-max-time 60 is what actually bounds the wait — see Known issues. There was no existing precedent in the repo for different values (the only other retry logic, .github/actions/install-tools/install-rust.sh, wraps rustup rather than curl).
  • Only the final response's headers are printed. --dump-header appends across retries and redirect hops, so grepping the file printed the same x-ratelimit-* block once per attempt — six repetitions on a real 429, which defeats the readability this PR is for. An awk pass resets on each HTTP/ status line and prints only what followed the last one.
  • Only the numeric curl exit code is printed. An earlier revision mapped exit codes to English labels, but -S already makes curl print its own message for a transport failure, so the label restated it; on the HTTP-error path curl exits 0 and the label was the vacuous "no transport error". Dropped.
  • Authentication: Authorization: Bearer $MISE_GITHUB_TOKEN, falling back to $GITHUB_TOKEN, sent only when one of them is non-empty. Nothing is said or done when both are unset. MISE_GITHUB_TOKEN takes precedence to match mise's own resolution order.
  • Token is not leaked to the asset CDN. github.com 302s release assets to release-assets.githubusercontent.com; plain -L drops Authorization on a cross-host redirect, and only --location-trusted would forward it. Verified empirically against the curl in use rather than taken on trust — see the test note below.
  • Checksum pipeline split. grep -E "^[0-9a-f]{64} (\./)?${tarball}$" SHASUMS256.txt > "${tarball}.sha256" first; if nothing matches, an explicit error names the tarball and shows the head of what was actually received. Then sha256sum -c runs against that file. Verification semantics are unchanged — the checksum is still enforced and a mismatch still fails.
  • The (\./)? is deliberate future-proofing, and it does not weaken anything. The real SHASUMS256.txt for v2026.7.14 uses <sha> ./mise-v2026.7.14-linux-x64.tar.gz, so the old \./-requiring pattern is correct today; mise's own installer greps far more loosely and does not depend on the prefix, so the old pattern was tighter than upstream's actual contract and would break silently if mise ever switched from sha256sum ./* to sha256sum *. The new pattern also anchors both ends and requires a 64-hex-digit hash, which the old substring match did not.
  • Binary/partial bodies are passed through tr -c '[:print:]\n\t' '.' before printing, so a half-downloaded tarball cannot spray control characters into the build log.
  • mise install is now retried in .github/actions/install-tools/action.yml. Unrelated to the Vercel script, but the same class of bug and it broke this PR's own CI. The nick-fields/retry wrapper sits on Install Rust, yet the rustup download it protects is triggered earlier: idiomatic_version_file_enable_tools = ["rust"] makes mise install read rust-toolchain.toml, and mise's core:rust plugin installs the toolchain by shelling out to rustup rather than fetching anything itself. Attempt 1 of Package (@rust/hash-codec) died exactly there — a 63s TCP connect timeout to static.rust-lang.org fetching rustfmt inside the unwrapped jdx/mise-action step, after which Install Rust was skipped and never got to retry. mise's own http_retries cannot cover it (that setting applies to mise's HTTP client; rustup downloads in a subprocess), and install: false plus a wrapped mise install is not viable either — the action saves its ~543 MB tool cache only inside the branch that runs the install, so that would leave the cache permanently unwritten on a miss. Instead the action step is marked non-fatal and a following step retries mise install, skipped on the happy path. A guard step in between fails immediately if mise is not on PATH at all — continue-on-error absorbs a setup failure just as readily as the rustup one, and retrying mise install five times without a mise binary would only print command not found.

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

Note: .config/mise/** is a global turbo input, so this PR busts the remote cache for its own CI run. That is expected and does not persist past merge.

⚠️ Known issues

  • Setting GITHUB_TOKEN in the Vercel project environments is not part of this PR — it is a dashboard change, not a repo change. Until that happens the Vercel builds stay unauthenticated; the script handles that fine, it just does not get the higher rate limit. Worth doing separately if the improved output confirms rate limiting.
  • The retry window is bounded by --retry-max-time 60, not by --retry-delay. An earlier revision of this PR claimed --retry-delay 2 gave a bounded worst case of ~10s of waiting. That was wrong: curl honours a server Retry-After in preference to --retry-delay, and GitHub answers a rate limit with Retry-After: 60 — precisely the scenario these retries exist for. Measured against a stub returning 429 with Retry-After: 60, the original flags made six attempts at t=0, 60, 120, 180, 240, 300s — 300.3s per fetch, roughly ten minutes across the two downloads, and silent throughout. --max-time 300 does not help; it caps a single attempt, not the series. With --retry-max-time 60 the same stub now gives up after 60.0s and two attempts. When the server dictates no delay the fixed 2s still applies and all five retries fit inside the window, so transient blips are unaffected.
  • The wait is still silent. -s is kept deliberately, so curl's progress meter cannot end up in build logs — but it also suppresses curl's Warning: Transient problem … Will retry in N seconds notices, and -S only re-enables hard errors. Swapping -s for --no-progress-meter (curl ≥ 7.67) would surface the retry notices without the progress bar. Not done here, to keep this change to the diagnostics it is about; worth considering as a follow-up.
  • continue-on-error on the mise install step trades fail-fast for retries. A genuinely broken mise config no longer fails on the first attempt; it fails after five, with 60s between them. The guard step only catches a missing mise binary, not a config that makes every attempt fail identically. Left as is for consistency: the retry count and wait match the existing Install Rust wrapper in the same action.
  • --retry-all-errors requires curl ≥ 7.71. Vercel's Amazon Linux 2023 build image ships curl 8.x, so this is fine there, but it is a constraint if the script is ever run somewhere much older.

🐾 Next steps

  • Watch the next vercel-install.sh failure and read the printed status/headers. If it is a 429/403 with x-ratelimit-remaining: 0, add GITHUB_TOKEN to both Vercel projects and this is closed out.
  • The repo has no shell linter (no shellcheck or shfmt in .config/mise, .lefthook.yml or lint.yml). Adding one would be a reasonable small follow-up, given how much build-critical logic lives in .sh files.

🛡 What tests cover this?

None automated — the repo has no test harness for shell scripts. Verified manually; see below.

❓ How to test this?

bash -n passes, and shellcheck 0.11.0 reports zero findings at default severity (-o all produces only two SC2312 infos, both on pre-existing lines).

Exercised against a local stand-in for the GitHub release endpoint:

  1. 404 → prints URL, curl exit code: 0, http status: 404 and the JSON body. Exit 1.
  2. 429 with Retry-After: 60 and x-ratelimit-* → one copy of the five-line rate-limit block (six before the awk change), the JSON body, and the whole series bounded at 60.0s. Exit 1.
  3. 200 whose SHASUMS256.txt body is an HTML error pageerror: no checksum entry for mise-v…tar.gz in …, followed by the received HTML. Exit 1.
  4. Nothing listening → six attempts over 10s, then curl exit code: 7 and http status: 000, alongside curl's own (7) Failed to connect … Couldn't connect to server. Exit 1.
  5. Two 503s then a 200 → retried and recovered (3 requests, ~4s), exit 0. Confirms transient HTTP errors are retried without --fail.
  6. Tampered tarball./mise-v2026.7.14-linux-x64.tar.gz: FAILED + WARNING: 1 computed checksum did NOT match, exit 1. Verification is genuinely still enforced.
  7. Happy path against the genuine v2026.7.14 release artifacts (real 36 MB tarball and real 3688-byte SHASUMS256.txt, both pulled from GitHub) → checksum OK, extract succeeds, mise --version prints 2026.7.14 linux-x64. Run both with and without a token; the Authorization header was observed present in the first case and absent in the second.
  8. Real-world sanity check. Running the script unmodified in an environment whose proxy blocks jdx/mise produced exactly the intended output — http status: 403 plus the proxy's explanatory JSON body. On main that same failure would have printed curl: (22) and nothing else.

All of the above were re-run after the --retry-max-time, awk and exit-label changes; the checksum path still gives OK for a valid tarball and FAILED with a non-zero exit for a tampered one.

Also confirmed with the real SHASUMS256.txt: the new pattern matches exactly one line for both linux-x64 and linux-arm64, identical to the old pattern's behaviour.

And the cross-host token claim, tested rather than assumed (curl 8.5.0, redirect from localhost to 127.0.0.1):

header seen by redirect target
curl -L -H 'Authorization: …' (absent)
curl --location-trusted -H 'Authorization: …' Bearer SECRET

The install script gave no usable diagnostic when a Vercel build failed in it:
`-f` discarded GitHub's response body, so a 4xx surfaced as a bare
`curl: (22)` with no status or URL, and the `curl | grep | sha256sum -c -`
pipeline reported a non-checksum body as a checksum parse failure.

Route both downloads through a `fetch` helper that drops `-f`, records
`%{http_code}` and the response headers, and on failure prints the URL,
curl's exit code with a label, the HTTP status, any rate-limit headers and
the first 2000 bytes of the body. Add retries and timeouts so a transient
drop is retried rather than failing the build, and send an `Authorization`
header when `GITHUB_TOKEN`/`MISE_GITHUB_TOKEN` is set, since curl does not
read those variables itself.

The checksum entry is now grepped into a file before verification, so a
truncated or error-page response is reported as such. Verification itself
is unchanged.
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview Aug 13, 2026 1:31am
hashdotdesign-tokens Ready Ready Preview Aug 13, 2026 1:31am
petrinaut Ready Ready Preview Aug 13, 2026 1:31am

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.63%. Comparing base (38ab9fd) to head (2e363a5).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9212   +/-   ##
=======================================
  Coverage   59.63%   59.63%           
=======================================
  Files        1420     1421    +1     
  Lines      138767   138770    +3     
  Branches     6555     6555           
=======================================
+ Hits        82753    82755    +2     
- Misses      54950    54951    +1     
  Partials     1064     1064           
Flag Coverage Δ
apps.hash-ai-worker-ts 1.99% <ø> (ø)
apps.hash-api 14.00% <ø> (ø)
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.22% <ø> (ø)
rust.antsi 2.36% <ø> (ø)
rust.error-stack 90.81% <ø> (ø)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.19% <ø> (-0.02%) ⬇️
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-authentication 100.00% <ø> (?)
rust.hash-graph-authorization 62.59% <ø> (ø)
rust.hash-graph-embeddings 91.88% <ø> (ø)
rust.hash-graph-postgres-store 29.33% <ø> (ø)
rust.hash-graph-store 46.78% <ø> (ø)
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 13, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 15.38%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 2 regressed benchmarks
✅ 96 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
bit_matrix/dense/iter_row[64] 140.8 ns 170 ns -17.16%
bit_matrix/dense/iter_row[200] 185.8 ns 215 ns -13.57%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/sre-946-mise-install-error-output (2e363a5) with main (7409d46)

Open in CodSpeed

TimDiekmann
TimDiekmann previously approved these changes Aug 13, 2026
Comment thread .config/mise/install.sh Outdated
claude added 3 commits August 13, 2026 00:56
`--retry-delay 2` does not bound anything on the failure this change exists
for. curl honours a server `Retry-After` in preference to `--retry-delay`, and
GitHub answers a rate limit with `Retry-After: 60`, so the five retries stalled
each download for five minutes — silently, because `-s` suppresses curl's
"Will retry" notices and `-S` only re-enables hard errors. `--max-time 300`
caps a single attempt, not the series. Measured against a stub returning 429
with `Retry-After: 60`: six attempts at t=0,60,120,180,240,300s, 300.3s wall
per `fetch`. Add `--retry-max-time 60` so the series gives up after a minute
(measured: 60.0s, two attempts).

`--dump-header` appends across retries and redirect hops, so a real 429 printed
the same five-line `x-ratelimit-*` block once per attempt — six repetitions of
the detail the report is meant to make readable. Replace the `grep` with an awk
pass that resets on each status line and prints only the headers that followed
the last one.
`-S` already makes curl print its own diagnostic for a transport failure, so
the label table restated it: a connection failure emitted both
`curl: (7) Failed to connect to ... Couldn't connect to server` and
`curl exit code: 7 (could not connect to host)`. On the HTTP-error path curl
exits 0 and the label was the vacuous "no transport error". Keep the bare
numeric exit code, which curl does not always make obvious, and drop the table.
The `nick-fields/retry` wrapper on `Install Rust` never protected the download
it was added for. `idiomatic_version_file_enable_tools = ["rust"]` makes
`mise install` read `rust-toolchain.toml`, and mise's `core:rust` plugin
installs the toolchain by shelling out to `rustup` instead of fetching anything
itself, so the toolchain and its components are downloaded during the earlier,
unwrapped `jdx/mise-action` step. Attempt 1 of `Package (@rust/hash-codec)` on
this branch died exactly there: a 63s TCP connect timeout to
`static.rust-lang.org` fetching `rustfmt-nightly-x86_64-unknown-linux-gnu`,
after which `Install Rust` was skipped and never got to retry.

mise's own `http_retries` cannot cover this — it applies to mise's HTTP client,
and rustup does its own downloading in a subprocess. Setting `install: false`
and running `mise install` under the wrapper does not work either: the action
saves its tool cache only inside the branch that runs the install, so that
would leave the 543 MB cache permanently unwritten on a cache miss.

Instead let the action install and cache as before, mark it non-fatal, and
retry `mise install` in a following step. The retry is skipped on the happy
path, and its condition tests `!= 'success'` so an unresolved `outcome` retries
rather than swallowing the failure.
claude added 2 commits August 13, 2026 01:16
`continue-on-error` on `jdx/mise-action` absorbs every failure mode, not
only the rustup connect timeout it was added for. When the action fails
during its own setup, `mise` is never on `PATH` and the retry step spends
five attempts and ~4 minutes of `retry_wait_seconds` on `mise: command not
found` — less legible than the failure it replaced. Guard the retry with an
explicit check on the same condition.
The reasoning behind `--retry-max-time`, the `--dump-header` awk pass, the
cross-host redirect and the `continue-on-error` retry is all in the PR body;
restating it in the files put them well above the comment density of the
surrounding repo.
@claude
claude Bot marked this pull request as ready for review August 13, 2026 01:34
@cursor

cursor Bot commented Aug 13, 2026

Copy link
Copy Markdown

PR Summary

Cursor Bugbot is generating a summary for commit 2e363a5. Configure here.

@TimDiekmann
TimDiekmann added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit 1328fe4 Aug 13, 2026
255 of 257 checks passed
@TimDiekmann
TimDiekmann deleted the claude/sre-946-mise-install-error-output branch August 13, 2026 02:35
@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.7 \mathrm{ms} \pm 184 \mathrm{μs}\left({\color{gray}1.08 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.57 \mathrm{ms} \pm 22.8 \mathrm{μs}\left({\color{gray}1.23 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$13.7 \mathrm{ms} \pm 94.1 \mathrm{μs}\left({\color{gray}1.16 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$44.2 \mathrm{ms} \pm 378 \mathrm{μs}\left({\color{gray}0.338 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$16.7 \mathrm{ms} \pm 144 \mathrm{μs}\left({\color{gray}1.30 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$25.6 \mathrm{ms} \pm 169 \mathrm{μs}\left({\color{gray}0.629 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$27.5 \mathrm{ms} \pm 170 \mathrm{μs}\left({\color{gray}-0.033 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.90 \mathrm{ms} \pm 21.8 \mathrm{μs}\left({\color{gray}0.276 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.9 \mathrm{ms} \pm 106 \mathrm{μs}\left({\color{gray}0.673 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.74 \mathrm{ms} \pm 22.4 \mathrm{μs}\left({\color{gray}-0.976 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.10 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{gray}1.31 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.37 \mathrm{ms} \pm 15.8 \mathrm{μs}\left({\color{gray}-1.589 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.18 \mathrm{ms} \pm 35.6 \mathrm{μs}\left({\color{gray}0.027 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.59 \mathrm{ms} \pm 18.3 \mathrm{μs}\left({\color{gray}-0.327 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.17 \mathrm{ms} \pm 28.7 \mathrm{μs}\left({\color{gray}-0.568 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.42 \mathrm{ms} \pm 30.0 \mathrm{μs}\left({\color{gray}1.64 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.50 \mathrm{ms} \pm 23.1 \mathrm{μs}\left({\color{gray}-0.601 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.07 \mathrm{ms} \pm 24.2 \mathrm{μs}\left({\color{gray}-1.923 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.72 \mathrm{ms} \pm 15.7 \mathrm{μs}\left({\color{gray}1.51 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.55 \mathrm{ms} \pm 13.8 \mathrm{μs}\left({\color{gray}0.399 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.71 \mathrm{ms} \pm 16.9 \mathrm{μs}\left({\color{gray}1.90 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.99 \mathrm{ms} \pm 15.7 \mathrm{μs}\left({\color{gray}0.583 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.78 \mathrm{ms} \pm 17.7 \mathrm{μs}\left({\color{gray}1.65 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.98 \mathrm{ms} \pm 20.9 \mathrm{μs}\left({\color{gray}1.48 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.05 \mathrm{ms} \pm 17.6 \mathrm{μs}\left({\color{gray}-0.219 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.81 \mathrm{ms} \pm 14.3 \mathrm{μs}\left({\color{gray}0.851 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$3.04 \mathrm{ms} \pm 21.4 \mathrm{μs}\left({\color{gray}0.472 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.42 \mathrm{ms} \pm 20.5 \mathrm{μs}\left({\color{gray}0.040 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.04 \mathrm{ms} \pm 22.5 \mathrm{μs}\left({\color{gray}0.656 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.32 \mathrm{ms} \pm 18.1 \mathrm{μs}\left({\color{gray}-1.238 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.41 \mathrm{ms} \pm 22.3 \mathrm{μs}\left({\color{gray}1.12 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.02 \mathrm{ms} \pm 16.2 \mathrm{μs}\left({\color{gray}-0.499 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.34 \mathrm{ms} \pm 19.8 \mathrm{μs}\left({\color{gray}0.092 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$43.8 \mathrm{ms} \pm 275 \mathrm{μs}\left({\color{gray}0.479 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$34.5 \mathrm{ms} \pm 160 \mathrm{μs}\left({\color{gray}-0.952 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$37.2 \mathrm{ms} \pm 213 \mathrm{μs}\left({\color{gray}-1.870 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$33.4 \mathrm{ms} \pm 215 \mathrm{μs}\left({\color{gray}1.19 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$44.3 \mathrm{ms} \pm 257 \mathrm{μs}\left({\color{gray}0.625 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$51.0 \mathrm{ms} \pm 325 \mathrm{μs}\left({\color{gray}-0.828 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$41.5 \mathrm{ms} \pm 257 \mathrm{μs}\left({\color{gray}-1.192 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$93.4 \mathrm{ms} \pm 452 \mathrm{μs}\left({\color{gray}-0.894 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$35.1 \mathrm{ms} \pm 160 \mathrm{μs}\left({\color{gray}0.304 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$258 \mathrm{ms} \pm 848 \mathrm{μs}\left({\color{gray}-0.924 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$11.3 \mathrm{ms} \pm 61.0 \mathrm{μs}\left({\color{gray}-0.193 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$11.5 \mathrm{ms} \pm 75.9 \mathrm{μs}\left({\color{gray}1.00 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$11.4 \mathrm{ms} \pm 61.1 \mathrm{μs}\left({\color{gray}-0.569 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$11.3 \mathrm{ms} \pm 68.1 \mathrm{μs}\left({\color{gray}-0.563 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$11.5 \mathrm{ms} \pm 78.8 \mathrm{μs}\left({\color{gray}0.010 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$11.4 \mathrm{ms} \pm 69.2 \mathrm{μs}\left({\color{gray}1.38 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$11.5 \mathrm{ms} \pm 61.8 \mathrm{μs}\left({\color{gray}0.442 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$11.5 \mathrm{ms} \pm 62.2 \mathrm{μs}\left({\color{gray}0.512 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$11.5 \mathrm{ms} \pm 68.3 \mathrm{μs}\left({\color{gray}-2.873 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$12.1 \mathrm{ms} \pm 72.7 \mathrm{μs}\left({\color{gray}2.76 \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.7 \mathrm{ms} \pm 69.5 \mathrm{μs}\left({\color{gray}-0.026 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$12.0 \mathrm{ms} \pm 65.0 \mathrm{μs}\left({\color{gray}1.18 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$11.9 \mathrm{ms} \pm 69.9 \mathrm{μs}\left({\color{gray}1.67 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$11.9 \mathrm{ms} \pm 58.9 \mathrm{μs}\left({\color{gray}0.979 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$11.8 \mathrm{ms} \pm 91.4 \mathrm{μs}\left({\color{gray}1.31 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$11.8 \mathrm{ms} \pm 66.2 \mathrm{μs}\left({\color{gray}1.11 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$11.8 \mathrm{ms} \pm 90.8 \mathrm{μs}\left({\color{gray}-0.514 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$12.1 \mathrm{ms} \pm 89.5 \mathrm{μs}\left({\color{gray}2.70 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$11.7 \mathrm{ms} \pm 58.6 \mathrm{μs}\left({\color{gray}0.799 \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.62 \mathrm{ms} \pm 45.9 \mathrm{μs}\left({\color{gray}0.193 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$62.1 \mathrm{ms} \pm 409 \mathrm{μs}\left({\color{lightgreen}-6.014 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$114 \mathrm{ms} \pm 536 \mathrm{μs}\left({\color{gray}-3.236 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$70.2 \mathrm{ms} \pm 548 \mathrm{μs}\left({\color{gray}-3.772 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$79.9 \mathrm{ms} \pm 419 \mathrm{μs}\left({\color{gray}-3.099 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$87.9 \mathrm{ms} \pm 518 \mathrm{μs}\left({\color{lightgreen}-5.062 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$94.2 \mathrm{ms} \pm 577 \mathrm{μs}\left({\color{gray}-4.637 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$46.2 \mathrm{ms} \pm 358 \mathrm{μs}\left({\color{gray}0.079 \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 $$73.8 \mathrm{ms} \pm 362 \mathrm{μs}\left({\color{gray}-1.241 \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.2 \mathrm{ms} \pm 282 \mathrm{μs}\left({\color{gray}-0.300 \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.8 \mathrm{ms} \pm 378 \mathrm{μs}\left({\color{gray}-1.064 \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.4 \mathrm{ms} \pm 365 \mathrm{μs}\left({\color{gray}-0.844 \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.4 \mathrm{ms} \pm 403 \mathrm{μs}\left({\color{gray}-0.962 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$131 \mathrm{ms} \pm 527 \mathrm{μs}\left({\color{gray}4.94 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$142 \mathrm{ms} \pm 609 \mathrm{μs}\left({\color{gray}4.30 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$19.6 \mathrm{ms} \pm 101 \mathrm{μs}\left({\color{gray}-0.147 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$553 \mathrm{ms} \pm 1.05 \mathrm{ms}\left({\color{gray}1.85 \mathrm{\%}}\right) $$ Flame Graph

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

Labels

area/infra Relates to version control, CI, CD or IaC (area)

Development

Successfully merging this pull request may close these issues.

2 participants