agorix
AirdropMarketsCollectionsLeaderboardActivity
Agorix · Decentralized Marketplace
Independent · Resilient · Community-Run

A cross-chain marketplace, run by the community.

Discover, list, and trade across Bitcoin, Ethereum, and Solana on an open, community-run network.

Marketplace
CollectionsMarketsLeaderboardActivity
Network
GovernanceExplorerAirdropDocs
Account
ProfileSettings
Legal
Terms of ServicePrivacy PolicyYour Privacy Choices
agorix.io — Lasting Access
CID: 0xA60R1X · v0.1
AirdropMarketsCollections
D
Protocol Docs
Public APISmart ContractsSecurity ModelOpen SourceRust Node CoreGetting Started (Developer)Benchmarks
Docs/Developer/Benchmarks
Developer

Benchmarks

Benchmark dashboard with 32+ benchmarks, JSON Lines streaming, P5.js visualizations, and coverage across PSBT, protocol, gossip, MPC, and consensus.

#Benchmarks

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.

#Quick Start

bash
# Start the benchmark dashboard
pnpm bench:dashboard

# Opens on http://localhost:4400

The dashboard provides a live UI with benchmark selection, real-time progress bars, animated visualizations, and failure analysis panels.

#Architecture

The benchmark platform has three layers:

  • Benchmark modules. Each benchmark is a self-contained module in the standalone benchmark repo at /Users/ravonus/Documents/agorix-benchmark-standalone/benchmark-dashboard/__benchmarks__/. Project-owned tasks in this repo live in bench.project.json.
  • Test runner. Executes benchmarks, captures output, and streams results via the JSON Lines protocol.
  • Dashboard UI. React frontend with P5.js visualizations, live streaming updates, and a sidebar for benchmark navigation.

#JSON Lines Streaming Protocol

Benchmarks emit structured output using the JSON Lines protocol (one JSON object per line). The dashboard reads this stream in real time:

jsonl
{"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 Categories

#Bitcoin & PSBT

BenchmarkWhat It Measures
bitcoin-address-derivationBIP-32/44/84 key derivation throughput
psbt-coverage-analysisShard distribution coverage across node sets

#Cryptographic Primitives

BenchmarkWhat It Measures
ed25519-signingEd25519 sign/verify throughput (TweetNaCl)
signature-verificationBatch signature verification performance

#Protocol & Serialization

BenchmarkWhat It Measures
event-serializationProtocol event serialize/deserialize throughput
listing-state-machineState machine transition performance under load

#Gossip & Networking

BenchmarkWhat It Measures
gossip-sync-engineGossip push/pull sync convergence speed
heartbeat-processingHeartbeat processing throughput at scale
neighbor-selectionMesh neighbor selection algorithm performance

#Consensus & Governance

BenchmarkWhat It Measures
governance-vote-tallyVote counting and delegation chain resolution
delegation-chainDeep delegation chain traversal performance

#MPC & Security

BenchmarkWhat It Measures
mpc-threshold-securityMPC key share operations and threshold signing simulation

#Infrastructure & Scaling

BenchmarkWhat It Measures
cache-stampedeRedis cache stampede resistance under concurrent load
rate-limiter-throughputRate limiter decision throughput at scale
shard-ring-scalingConsistent hash ring performance as node count grows

#Network Resilience

BenchmarkWhat It Measures
rogue-node-detectionTime to detect and evict misbehaving nodes
self-heal-convergenceNetwork convergence time after node failures

#P5.js Visualizations

Each benchmark category has animated P5.js visualizations in the dashboard:

  • Network graphs showing gossip propagation in real time.
  • Ring diagrams for consistent hash ring shard distribution.
  • Convergence plots for self-healing and sync benchmarks.
  • Throughput meters for cryptographic primitive benchmarks.
  • State machine diagrams for listing lifecycle benchmarks.

Visualizations update live as benchmark data streams in.

#Dashboard UI Components

The dashboard UI is built with React and includes:

  • TopNav — Benchmark suite controls and global status.
  • TestSidebar — Tree view of all benchmark categories and individual benchmarks.
  • TestProgressBar — Real-time progress for the running benchmark.
  • TestCounters — Pass/fail/skip counters.
  • TestFailurePanel — Detailed failure analysis with stack traces and expected vs. actual comparisons.
  • TestDashboard — Main content area with results and visualizations.

#Adding a New Benchmark

Create a new directory under /Users/ravonus/Documents/agorix-benchmark-standalone/benchmark-dashboard/__benchmarks__/:

text
benchmarks/
└── my-new-benchmark/
    ├── index.ts          # Benchmark entry point
    ├── benchmark.ts      # Core benchmark logic
    └── visualization.ts  # Optional P5.js visualization

The benchmark module must export a standard interface:

typescript
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.

#CI Integration

Benchmarks can run in CI by capturing the JSON Lines output:

bash
pnpm bench:run --json > benchmark-results.jsonl

Results can be compared across commits to detect performance regressions. The dashboard also supports loading historical results for comparison.

PreviousGetting Started (Developer)

On this page

  • Benchmarks
  • Quick Start
  • Architecture
  • JSON Lines Streaming Protocol
  • Benchmark Categories
  • Bitcoin & PSBT
  • Cryptographic Primitives
  • Protocol & Serialization
  • Gossip & Networking
  • Consensus & Governance
  • MPC & Security
  • Infrastructure & Scaling
  • Network Resilience
  • P5.js Visualizations
  • Dashboard UI Components
  • Adding a New Benchmark
  • CI Integration