cuprate-benchmark

Cuprate has 2 custom crates for general benchmarking:

  • cuprate-benchmark; the actual binary crate ran
  • cuprate-benchmark-lib; the library that other crates hook into

The abstract purpose of cuprate-benchmark is very simple:

  1. Set-up the benchmark
  2. Start timer
  3. Run benchmark
  4. Output data

cuprate-benchmark runs the benchmarks found in benches/benchmark/cuprate-*.

cuprate-benchmark-lib defines the Benchmark trait that all benchmark crates implement to "plug-in" to the benchmarking harness.

Diagram

A diagram displaying the relation between cuprate-benchmark and related crates.

                    ┌─────────────────────┐
                    │ cuprate_benchmark   │
                    │ (actual binary ran) │
                    └──────────┬──────────┘
            ┌──────────────────┴───────────────────┐
            │ cuprate_benchmark_lib                │
            │ ┌───────────────────────────────────┐│
            │ │ trait Benchmark                   ││
            │ └───────────────────────────────────┘│
            └──────────────────┬───────────────────┘
┌───────────────────────────┐  │   ┌───────────────────────────┐
│ cuprate_benchmark_example ├──┼───┤ cuprate_benchmark_*       │
└───────────────────────────┘  │   └───────────────────────────┘
┌───────────────────────────┐  │   ┌───────────────────────────┐
│ cuprate_benchmark_*       ├──┴───┤ cuprate_benchmark_*       │
└───────────────────────────┘      └───────────────────────────┘
Last change: 2024-11-28, commit: 38541db