Skip to main content

Benchmarks

Performance benchmarks for Mina components using Criterion.

Building benchmarks​

Build all benchmarks without running them:

scripts/benchmarks/build-benchmarks.sh
#!/usr/bin/env bash
# Build all benchmarks

make build-benches

Running benchmarks​

Run all benchmarks:

scripts/benchmarks/run-all-benchmarks.sh
#!/usr/bin/env bash
# Run all benchmarks

make bench

Ledger​

Database benchmarks​

Benchmarks for ledger database operations including account generation and merkle root computation. Tests performance with 1,000, 10,000, and 120,000 accounts.

Run the database benchmark:

scripts/benchmarks/run-database-benchmark.sh
#!/usr/bin/env bash
# Run ledger database benchmark

make bench-database

Benchmark groups:

  • account_generation: Measures time to generate random accounts and insert them into the database
  • merkle_root_computation: Measures time to compute the merkle root for a populated database

Results are saved to target/criterion/ with detailed HTML reports.