A single-page TypeScript application for visualizing benchmark results.
- Install dependencies:
npm install - Start development server:
npm run dev - Build for production:
npm run build
The app is automatically built and deployed to GitHub Pages on pushes to the master branch via GitHub Actions.
The static app fetches benchmark data from public/data/ at runtime. index.json contains compact
metadata and median history for charts. Each entry links to the complete minified record under
public/data/runs/, which is loaded when that runner is selected. The record keeps every raw
sample, iteration result and failure the harness wrote; the index is a derived compact view.
Records use schema 2, written by Golem's golem-test-framework/src/benchmark/results.rs. The
reader accepts nothing else. Each record requires harness_version, and each entry requires
entry_version, iterations, measurement_environment and series_key. The key is the
SHA-256 of the UTF-8 JSON tuple [harness_version, entry_version, runner_id, hardware_fingerprint, storage_profile, sockets_enabled]; the publisher recomputes it and rejects a mismatch. Workload
parameters and the entry name select observations within a series. Source commits, artifact hashes
and per-agent bounds never enter it. Optional fields, such as ceiling, pass through unchanged.
History published before schema 2 was converted once with node scripts/convert-history.mjs public/data/index.json. Converted runs have harness and entry version 0, which the publisher
refuses for new runs. Their hardware fingerprint hashes the recorded CPU lines and the total
memory rounded up to a power of two, because reported memory varies within one machine class (113
to 124 Gb counts as 128). The OS, kernel and hostname are excluded; the CPU architecture was not
recorded. Runs without a
recorded runner are attributed to github-actions-blacksmith-32vcpu, as the reader did before.
Storage profile and sockets were not recorded; historical_unavailable lists such fields, and the
sockets placeholder is not evidence that sockets were disabled. An unknown iteration count is 0.
Running the conversion again changes nothing.
The schema-2 reader and the converted history deploy together; neither works without the other. Roll out in this order:
- Pause the schema-1 publisher, or land the Golem schema-2 writer first. The publisher rejects schema-1 runs.
- Rebase the reader commit onto the current
master. Do not merge or rebase the conversion commit: rerun the converter on the rebased history, so runs appended in the meantime are converted too, and commit the result. - Push both commits together, then resume schema-2 publishing.
Completed runs are appended with the validated, idempotent publisher:
npm run append-results -- /path/to/run.jsonTo check the same publication contract without reading or writing the history index:
npm run append-results -- --validate-only /path/to/run.jsonGolem's merge job uses this read-only mode even when publication is disabled.
The input must contain exactly one complete schema-2 suite run with runner and source metadata, and every iteration result for each configuration. Replaying the identical runner, suite, and timestamp is a no-op; conflicting data for that identity is rejected. The command writes one immutable run file, then atomically updates the history index. An interrupted write can leave an unreferenced run file, but never a history entry without its detail file; retrying safely completes the append.
To analyze regressions for the latest Amp orb run:
npm run analyze-regressions -- public/data/index.json --runner amp-orb-a1.xxlargeThe analyzer deterministically replays runs from the same runner and suite. A series is a series key,
a benchmark name, its complete key-sorted run configuration, and a measurement. Its baseline is the median of the
last 3–5 observations since the latest automatic rebase. The regression threshold is 25% with 3–4
observations; with 5 it is the larger of 25% and three scaled median absolute deviations
(3 * 1.4826 * MAD / median).
An alert is immediate when candidates comprise at least 20% of comparable series and span at least two benchmark names. Otherwise, consecutive runs must contain the same candidate series against a frozen pre-event baseline; confirmation requires two configurations from one benchmark/measurement family, or one series at least 50% above baseline. Active episodes do not alert repeatedly. An update alerts only for a confirmed new benchmark or when the worst ratio grows by at least 25% relative to the previously alerted worst ratio. Two candidate-free runs recover an episode.
An episode automatically rebases after three stable runs including onset (two transitions). A
transition is stable when at least 90% of comparable exact series change by less than 25% in
absolute terms from the previous run. Those three runs seed the new history. JSON status describes
the state (new-regression, regression-update, active-regression, candidates-only,
no-candidates, insufficient-history, recovered, or rebased), while shouldAlert is the
authoritative notification signal. candidates always contains every candidate and its baseline
details, including the source commit of each baseline observation; topCandidates is limited to
five. Pass --timestamp <exact UTC timestamp> to replay only through a particular published run.
To analyze the newest published CI run for an exact Golem commit without measuring or publishing:
node scripts/analyze-ci-benchmarks.mjs <results-checkout> <40-char Golem SHA> <runner-id> <output-dir>It verifies the selected detail record against its index entry, runs the analyzer through that run,
and writes selection.json (record path, SHA-256 and recorded failures) and analysis.json to the
output directory, refusing to overwrite either. Without a matching run, analysis.json has status
missing-ci-result and shouldAlert: false. Golem's analyze_ci_benchmarks.sh launcher calls it
from a fresh clone of this repository.
scripts/regression-state-cli.mjs operates on saved records only. calibrate takes a reviewed
cohort file, { "toolchain": "<externally verified compiler>", "artifacts": { "<run ID>": "<SHA-256>" } },
and four matching same-toolchain R3 collections. It emits descriptive adverse envelopes with artifact
hashes. These are not production bands. The nominal-log-t95-n3 method weights each complete
iteration equally. The interval is conditional within a run; the shared service context and small
sample do not establish coverage across CI jobs. The method is shadow-only until separately
approved per full series key. Durations increase adversely; scalar throughput decreases adversely.
For other counts, observed-count-range-n3 checks both directions against the accepted reference.
It uses the range of the three iteration medians, not a confidence interval. A count outside the
band is a change to investigate, not evidence that increasing or decreasing that counter is worse.
An explicitly declared exact byte count uses integer comparison, including an observed zero.
Use replay <index> <source-checkout> <settings.json> to emit a shadow ledger without modifying
the checkout. A source checkout is the Golem Git repository, not this results repository. Provide
the complete graph for the input and stored source commits; a shallow boundary is unknown. The
settings object has optional timing, exact and variants maps keyed by the full key returned
by replay (including repository, runner, suite, entry, configuration, metric, PF1 key and kind).
Timing entries name method, band, seedFile (a detail path from the index) and approved.
Exact entries name unit; their retained count metric must be an explicit single value per
iteration in the named unit. variants declares { "parallel": true } or { "replaces": "<key>" }
when a new key shares a slot. Invalid, skipped and missing observations cannot alter accepted state.
The optional newSeries policy names the repository, ref, runner, suite, and after cutoff
timestamp for automatic coverage. After that cutoff, a matching run's first valid observation of
an unconfigured series sets a fixed reference and a provisional band from the adverse iteration
spread. It does not replace any other PF1 key. An explicit per-series policy takes precedence.
Run preview-initialization <index> <source-checkout> <settings.json> and review its output.
After approval, initialize <index> <source-checkout> <settings.json> <reviewed-ledger-sha256>
requires the digest of that exact output, binding the settings, index and raw detail bytes. Do not
publish it until the new Golem adapter is in place. Once the file exists, old append commands fail
before writing; the adapter commits the manifest, index, detail and one immutable run disposition
together. The manifest references the dispositions in public/data/regression-runs/ by digest.
A state/index or disposition digest mismatch
is an error. Read-only analysis uses the opening events of the selected run and preserves
shouldAlert; consumers still deduplicate by runner, suite and timestamp. Before activation the
existing notification behavior remains in effect.
For GOL-1193, use query <index> <source-checkout> <source-repository> <commit> <coverage.json>
against one pinned snapshot. Coverage is an array of { "runner": "…", "suite": "…", "keys": ["…"], "fullMatrix": true } requirements. coverage is unmeasured, incomplete or complete.
open is independent of coverage. Full-matrix requests require one qualifying attempt per runner
and suite; qualifyingAttempts lists the retained files. Conflicting exact values are incomplete.
A release consumer may only treat clean: true as passing.
GOL-1200 owns the size writer and mapping from deployed fixture/SDK size to an exact count cell;
an invalid or missing fixture does not emit zero bytes or satisfy required coverage.
An acceptance request is { "id": "stable-id", "kind": "waiver", "date": "<UTC instant>", "reason": "…", "targets": [{ "key": "…", "regression": "…", "file": "runs/…", "revision": 2 }] }. Copy revision from the reviewed series[key]. New observations on the
same lineage and accepted changes advance it, including observations at the same source SHA.
Query and acceptance verify the retained evidence against the recorded detail digests.
Use the protected performance-acceptance environment
with required reviewers and a scoped results write token; the workflow adds the GitHub actor.
Enable PERFORMANCE_ACCEPTANCE_ENABLED only after protection and credentials are reviewed. The
same ID and payload retry safely; a stale target rejects the entire batch. A proven timing
improvement uses kind: "improvement" and no regression ID. A reasoned optimisation outcome
goes in public/data/optimisation-candidates.json with title, outcome, reason and an HTTPS
evidence link; it is not a regression waiver and does not change a reference.