Expand description
Macro for benchmarking a Substrate runtime. A fork of frame-benchmarking
pallet.
Modules§
- benchmarking
- Interface that provides functions for benchmarking the runtime.
Macros§
- add_
benchmark - This macro adds pallet benchmarks to a
Vec<BenchmarkBatch>
object. - cb_
add_ benchmarks - Callback for
define_benchmarks
to calladd_benchmark
. - cb_
list_ benchmarks - Callback for
define_benchmarks
to calllist_benchmark
. - define_
benchmarks - Defines pallet configs that
add_benchmarks
andlist_benchmarks
use. Should be preferred instead of having a repetitive list of configs inadd_benchmark
andlist_benchmark
. - impl_
benchmark_ test_ suite - This creates a test suite which runs the module’s benchmarks.
- list_
benchmark - This macro allows users to easily generate a list of benchmarks for the pallets configured in the runtime.
- runtime_
benchmarks - Construct pallet benchmarks for weighing dispatchables.
- runtime_
benchmarks_ instance - Same as [
benchmarks
] but for instantiable module. - whitelist_
account - Whitelist the given account.
Structs§
- Analysis
- Benchmark
Batch - The results of a single of benchmark.
- Benchmark
Config - Configuration used to setup and run runtime benchmarks.
- Benchmark
List - A list of benchmarks available for a particular pallet and instance.
- Benchmark
Metadata - Benchmark
Recording - Records the time and proof size of a single benchmark iteration.
- Benchmark
Result - Result from running benchmarks on a FRAME pallet. Contains duration of the function call in nanoseconds along with the benchmark parameters used for that benchmark result.
Enums§
- Benchmark
Error - Possible errors returned from the benchmarking pipeline.
- Benchmark
Parameter - An alphabet of possible parameters to use for benchmarking.
- Benchmark
Selector
Traits§
- Benchmarking
- The pallet benchmarking trait.
- Benchmarking
Setup - The required setup for creating a benchmark.
- Recording
- The recording trait used to mark the start and end of a benchmark.
Functions§
- show_
benchmark_ debug_ info - show error message and debugging info for the case of an error happening during a benchmark
- whitelisted_
caller - This caller account is automatically whitelisted for DB reads/writes by the benchmarking macro.