Benchmark dashboard with 32+ benchmarks, JSON Lines streaming, P5.js visualizations, and coverage across PSBT, protocol, gossip, MPC, and consensus.
The benchmark dashboard is a standalone developer tool for measuring and visualizing protocol performance. It runs 32+ benchmarks across every critical subsystem with real-time streaming and P5.js animated visualizations.
# Start the benchmark dashboard
pnpm bench:dashboard
# Opens on http://localhost:4400The dashboard provides a live UI with benchmark selection, real-time progress bars, animated visualizations, and failure analysis panels.
The benchmark platform has three layers:
/Users/ravonus/Documents/agorix-benchmark-standalone/benchmark-dashboard/__benchmarks__/. Project-owned tasks in this repo live in bench.project.json.Benchmarks emit structured output using the JSON Lines protocol (one JSON object per line). The dashboard reads this stream in real time:
{"type":"start","benchmark":"ed25519-signing","timestamp":1679500000}
{"type":"progress","benchmark":"ed25519-signing","percent":45,"ops_per_sec":12500}
{"type":"result","benchmark":"ed25519-signing","mean_ms":0.08,"p99_ms":0.12,"ops_per_sec":12500}
{"type":"end","benchmark":"ed25519-signing","passed":true,"duration_ms":5000}This protocol enables live progress tracking, streaming results to the dashboard without polling, and machine-readable output for CI integration.
| Benchmark | What It Measures |
|---|---|
| bitcoin-address-derivation | BIP-32/44/84 key derivation throughput |
| psbt-coverage-analysis | Shard distribution coverage across node sets |
| Benchmark | What It Measures |
|---|---|
| ed25519-signing | Ed25519 sign/verify throughput (TweetNaCl) |
| signature-verification | Batch signature verification performance |
| Benchmark | What It Measures |
|---|---|
| event-serialization | Protocol event serialize/deserialize throughput |
| listing-state-machine | State machine transition performance under load |
| Benchmark | What It Measures |
|---|---|
| gossip-sync-engine | Gossip push/pull sync convergence speed |
| heartbeat-processing | Heartbeat processing throughput at scale |
| neighbor-selection | Mesh neighbor selection algorithm performance |
| Benchmark | What It Measures |
|---|---|
| governance-vote-tally | Vote counting and delegation chain resolution |
| delegation-chain | Deep delegation chain traversal performance |
| Benchmark | What It Measures |
|---|---|
| mpc-threshold-security | MPC key share operations and threshold signing simulation |
| Benchmark | What It Measures |
|---|---|
| cache-stampede | Redis cache stampede resistance under concurrent load |
| rate-limiter-throughput | Rate limiter decision throughput at scale |
| shard-ring-scaling | Consistent hash ring performance as node count grows |
| Benchmark | What It Measures |
|---|---|
| rogue-node-detection | Time to detect and evict misbehaving nodes |
| self-heal-convergence | Network convergence time after node failures |
Each benchmark category has animated P5.js visualizations in the dashboard:
Visualizations update live as benchmark data streams in.
The dashboard UI is built with React and includes:
Create a new directory under /Users/ravonus/Documents/agorix-benchmark-standalone/benchmark-dashboard/__benchmarks__/:
benchmarks/
└── my-new-benchmark/
├── index.ts # Benchmark entry point
├── benchmark.ts # Core benchmark logic
└── visualization.ts # Optional P5.js visualizationThe benchmark module must export a standard interface:
export interface Benchmark {
name: string;
description: string;
category: string;
run(): AsyncGenerator<BenchmarkEvent>;
}The run() method yields JSON Lines events as the benchmark progresses. The dashboard picks these up automatically.
Benchmarks can run in CI by capturing the JSON Lines output:
pnpm bench:run --json > benchmark-results.jsonlResults can be compared across commits to detect performance regressions. The dashboard also supports loading historical results for comparison.