Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/cerebral-bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Cerebral benchmark site
on:
pull_request:
paths:
- 'cerebral-src/**'
- 'visualization-wasm/**'
- 'third-party/**'
- 'scripts/build-gallery.mjs'
- 'scripts/gallery-contract.mjs'
- 'tests/cerebral-gallery.test.mjs'
- 'tests/gallery*'
- 'package.json'
- 'package-lock.json'
- 'scripts/*cerebral*'
- 'scripts/bench-data.mjs'
- 'tests/cerebral-bench.test.mjs'
- 'wrangler.cerebral.jsonc'
- '.github/workflows/cerebral-bench.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- run: npm ci --ignore-scripts --no-audit --no-fund
- run: cargo test --manifest-path visualization-wasm/Cargo.toml -- --test-threads=1
- run: node --test tests/cerebral-bench.test.mjs
- run: node scripts/build-cerebral.mjs
- run: npm run test:gallery
- run: npx playwright install --with-deps chromium
- run: npm run test:gallery:browser
- name: Validate Cerebral Worker without deployment
run: npx --yes wrangler@4.107.0 deploy --config wrangler.cerebral.jsonc --dry-run --outdir /tmp/cerebral-bench-worker
- name: Retain reviewable static artifact
uses: actions/upload-artifact@v4
with:
name: cerebral-bench
path: cerebral/
- name: Retain gallery browser evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: cerebral-gallery-browser
path: test-results/gallery/
if-no-files-found: ignore
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ node_modules/
# evals
evals/logs/
evals/.venv/

# Generated Cerebral benchmark site
/cerebral/

# Visualization kernel build artifacts
/visualization-wasm/target/

/test-results/
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog

## [Unreleased]

### Added

- Cerebral benchmark observatory for bench.cerebral.work, with the extracted Cerebral V2 visual system, Scorcher local measurements, Cortex reference coverage, Saga simulations and fixture controls, accessible result filters, latency/plan views and downloadable evidence.
- Data-integrity checks, a separate Worker configuration and a CI-built review artifact for the Cerebral site.
- Visualization lab with all 174 entries from the pinned D3 gallery, Three.js graphics, compiled Rust/WASM numeric kernels, maps and local GeoTIFF contours, searchable source attribution, accessible controls, data downloads, and automated full-gallery rendering checks.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,35 @@ Manual deploy (from a machine with `wrangler login`):
```bash
npm run deploy
```

## Cerebral benchmark observatory

`bench.cerebral.work` has its own source tree (`cerebral-src/`), generated artifact (`cerebral/`) and Worker config (`wrangler.cerebral.jsonc`). It presents Scorcher measurements, Cortex reference coverage and Saga simulation/fixture evidence in the Cerebral V2 visual system.

```sh
npm run test:cerebral
npm run build:cerebral
npm run check:cerebral
npm run dev:cerebral
```

See [the implementation and evidence guide](docs/bench-cerebral-work.md). The Cerebral PR workflow checks and packages the site; production deployment is a separate operator-approved step.

### Visualization lab

The Cerebral site includes `/visualizations/`: 174 entries from the pinned Observable D3 gallery, adapted to Three.js with Rust/WebAssembly data kernels. Local demonstration values are labeled separately from benchmark measurements; every entry links to its original author. The featured-libraries collection is linked alongside the attribution guide.

The Cerebral build now needs Node 22+ and a Rust toolchain with `wasm32-unknown-unknown` installed:

```sh
rustup target add wasm32-unknown-unknown
npm ci --ignore-scripts
npm run build:cerebral
npm run test:gallery
npx playwright install chromium
npm run test:gallery:browser
```

`CHROME_PATH=/usr/bin/google-chrome` can select an existing browser for the last command. Native kernel tests: `cargo test --manifest-path visualization-wasm/Cargo.toml -- --test-threads=1`.

See [the gallery implementation guide](docs/visualization-gallery.md) and [validation evidence](docs/qa/visualization-gallery-2026-10-26.md). No remote Observable iframe or notebook runtime is required.
1 change: 1 addition & 0 deletions cerebral-src/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="robots" content="noindex"><title>Page not found — Cerebral Bench</title><link rel="stylesheet" href="/styles.css"></head><body><main style="min-height:80vh;padding-top:15vh"><p class="eyebrow">Cerebral Bench / 404</p><h1 style="font-size:clamp(44px,7vw,100px);margin:30px 0">This page is absent.</h1><a href="/">Return to the benchmarks ↗</a></main></body></html>
18 changes: 18 additions & 0 deletions cerebral-src/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

254 changes: 254 additions & 0 deletions cerebral-src/data/benchmarks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
{
"schemaVersion": 1,
"snapshot": "2026-10-26",
"publisher": "Cerebral Work Institute",
"designSource": "https://cerebral.work/",
"systems": [
{
"id": "scorcher",
"name": "Scorcher",
"number": "01",
"type": "measured",
"subtitle": "The transport layer",
"summary": "Routing, shared memory, verified object storage. A local microbenchmark capture with the sample size beside every result.",
"record": "scorcher-local.json"
},
{
"id": "cortex",
"name": "Cortex",
"number": "02",
"type": "protocol",
"subtitle": "The coordination layer",
"summary": "The reference edge, cache and custody protocol. Coverage is documented; a separate result receipt is still to come.",
"record": "cortex-protocol.json"
},
{
"id": "saga",
"name": "Saga",
"number": "03",
"type": "simulation",
"subtitle": "The orchestration layer",
"summary": "Three scheduling strategies, four declared plans, one virtual clock. Plus the negative and reference controls behind the evaluation fixtures.",
"record": "saga-scheduler.json"
}
],
"measurements": [
{
"id": "scorcher-affinity",
"system": "scorcher",
"name": "Affinity routing",
"category": "routing",
"evidence": "measured",
"value": 257,
"unit": "ns",
"percentile": "p50",
"samples": 10000,
"source": "scorcher-local.json",
"pointer": "/bench/metrics/ring_p50_ns",
"samplePointer": "/bench/metrics/iters"
},
{
"id": "scorcher-cache",
"system": "scorcher",
"name": "Hot object-cache lookup",
"category": "cache",
"evidence": "measured",
"value": 92,
"unit": "ns",
"percentile": "p50",
"samples": 5000,
"source": "scorcher-local.json",
"pointer": "/bench/metrics/tier0_p50_ns",
"samplePointer": "/bench/metrics/tier0_iters"
},
{
"id": "scorcher-roundtrip",
"system": "scorcher",
"name": "8 KiB shared-memory roundtrip",
"category": "transport",
"evidence": "measured",
"value": 9.138,
"unit": "\u00b5s",
"percentile": "p50",
"samples": 100,
"source": "scorcher-local.json",
"pointer": "/shm_roundtrip/latency_p50_us",
"samplePointer": "/shm_roundtrip/round_trips"
},
{
"id": "scorcher-coalescing",
"system": "scorcher",
"name": "Upstream calls for 64 concurrent misses",
"category": "coalescing",
"evidence": "measured",
"value": 1,
"unit": "calls",
"samples": 64,
"source": "scorcher-local.json",
"pointer": "/bench/metrics/actual_calls",
"samplePointer": "/bench/metrics/concurrency"
},
{
"id": "saga-bench-diamond-cpm",
"system": "saga",
"name": "diamond / CPM",
"category": "scheduling",
"evidence": "simulation",
"value": 31,
"unit": "plan units",
"source": "saga-scheduler.json",
"plan": "bench-diamond",
"strategy": "cpm"
},
{
"id": "saga-bench-diamond-dbr",
"system": "saga",
"name": "diamond / DBR",
"category": "scheduling",
"evidence": "simulation",
"value": 31,
"unit": "plan units",
"source": "saga-scheduler.json",
"plan": "bench-diamond",
"strategy": "dbr"
},
{
"id": "saga-bench-diamond-dsm",
"system": "saga",
"name": "diamond / DSM",
"category": "scheduling",
"evidence": "simulation",
"value": 31,
"unit": "plan units",
"source": "saga-scheduler.json",
"plan": "bench-diamond",
"strategy": "dsm"
},
{
"id": "saga-bench-chain-stragglers-cpm",
"system": "saga",
"name": "chain-stragglers / CPM",
"category": "scheduling",
"evidence": "simulation",
"value": 31,
"unit": "plan units",
"source": "saga-scheduler.json",
"plan": "bench-chain-stragglers",
"strategy": "cpm"
},
{
"id": "saga-bench-chain-stragglers-dbr",
"system": "saga",
"name": "chain-stragglers / DBR",
"category": "scheduling",
"evidence": "simulation",
"value": 32,
"unit": "plan units",
"source": "saga-scheduler.json",
"plan": "bench-chain-stragglers",
"strategy": "dbr"
},
{
"id": "saga-bench-chain-stragglers-dsm",
"system": "saga",
"name": "chain-stragglers / DSM",
"category": "scheduling",
"evidence": "simulation",
"value": 31,
"unit": "plan units",
"source": "saga-scheduler.json",
"plan": "bench-chain-stragglers",
"strategy": "dsm"
},
{
"id": "saga-bench-lock-bound-cpm",
"system": "saga",
"name": "lock-bound / CPM",
"category": "scheduling",
"evidence": "simulation",
"value": 36,
"unit": "plan units",
"source": "saga-scheduler.json",
"plan": "bench-lock-bound",
"strategy": "cpm"
},
{
"id": "saga-bench-lock-bound-dbr",
"system": "saga",
"name": "lock-bound / DBR",
"category": "scheduling",
"evidence": "simulation",
"value": 31,
"unit": "plan units",
"source": "saga-scheduler.json",
"plan": "bench-lock-bound",
"strategy": "dbr"
},
{
"id": "saga-bench-lock-bound-dsm",
"system": "saga",
"name": "lock-bound / DSM",
"category": "scheduling",
"evidence": "simulation",
"value": 36,
"unit": "plan units",
"source": "saga-scheduler.json",
"plan": "bench-lock-bound",
"strategy": "dsm"
},
{
"id": "saga-bench-probe-fanout-cpm",
"system": "saga",
"name": "probe-fanout / CPM",
"category": "scheduling",
"evidence": "simulation",
"value": 41,
"unit": "plan units",
"source": "saga-scheduler.json",
"plan": "bench-probe-fanout",
"strategy": "cpm"
},
{
"id": "saga-bench-probe-fanout-dbr",
"system": "saga",
"name": "probe-fanout / DBR",
"category": "scheduling",
"evidence": "simulation",
"value": 41,
"unit": "plan units",
"source": "saga-scheduler.json",
"plan": "bench-probe-fanout",
"strategy": "dbr"
},
{
"id": "saga-bench-probe-fanout-dsm",
"system": "saga",
"name": "probe-fanout / DSM",
"category": "scheduling",
"evidence": "simulation",
"value": 41,
"unit": "plan units",
"source": "saga-scheduler.json",
"plan": "bench-probe-fanout",
"strategy": "dsm"
}
],
"artifacts": [
{
"file": "scorcher-local.json",
"sha256": "bfc189c52c6e80ba63ad1dc10cdbbe8bb8c1728a27a7a9feb135926f3c822767"
},
{
"file": "cortex-protocol.json",
"sha256": "db4d450d075d8a64b14f40084627ba2a861590c132eaad9df3d5aa7602967b22"
},
{
"file": "saga-scheduler.json",
"sha256": "ef6961755beec759958eef1b5704f4efe5986acd0f2f62a1348901fa89761c44"
},
{
"file": "saga-controls.json",
"sha256": "d98bb59fa86c82eabda47c6aaab7c51f7a93aaf79c152f941afc967ef3bdf8a8"
}
]
}
Loading
Loading