51 releases (33 major breaking)

35.0.0 Mar 19, 2024
34.0.0 Feb 27, 2024
33.0.0 Feb 13, 2024
32.0.0 Jan 24, 2024
2.0.0-alpha.5 Mar 24, 2020

#514 in Magic Beans

Download history 644/week @ 2023-12-06 955/week @ 2023-12-13 761/week @ 2023-12-20 426/week @ 2023-12-27 604/week @ 2024-01-03 919/week @ 2024-01-10 846/week @ 2024-01-17 828/week @ 2024-01-24 626/week @ 2024-01-31 1437/week @ 2024-02-07 1383/week @ 2024-02-14 1736/week @ 2024-02-21 1856/week @ 2024-02-28 1464/week @ 2024-03-06 1568/week @ 2024-03-13 1814/week @ 2024-03-20

7,217 downloads per month
Used in 15 crates (7 directly)

Apache-2.0 and GPL-3.0-or-later…

5.5MB
84K SLoC

The Benchmarking CLI

This crate contains commands to benchmark various aspects of Substrate and the hardware. All commands are exposed by the Substrate node but can be exposed by any Substrate client. The goal is to have a comprehensive suite of benchmarks that cover all aspects of Substrate and the hardware that its running on.

Invoking the root benchmark command prints a help menu:

$ cargo run --profile=production -- benchmark

Sub-commands concerned with benchmarking.

USAGE:
    substrate benchmark <SUBCOMMAND>

OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information

SUBCOMMANDS:
    block       Benchmark the execution time of historic blocks
    machine     Command to benchmark the hardware.
    overhead    Benchmark the execution overhead per-block and per-extrinsic
    pallet      Benchmark the extrinsic weight of FRAME Pallets
    storage     Benchmark the storage speed of a chain snapshot

All examples use the production profile for correctness which makes the compilation very slow; for testing you can use --release. For the final results the production profile and reference hardware should be used, otherwise the results are not comparable.

The sub-commands are explained in depth here:

  • block Compare the weight of a historic block to its actual resource usage
  • machine Gauges the speed of the hardware
  • overhead Creates weight files for the Block- and Extrinsic-base weights
  • pallet Creates weight files for a Pallet
  • storage Creates weight files for Read and Write storage operations

License: Apache-2.0

Dependencies

~68–120MB
~2M SLoC