Crate frame_benchmarking

Source
Expand description

Macro for benchmarking a FRAME runtime.

Re-exports§

pub use v1::*;

Modules§

benchmarking
Interface that provides functions for benchmarking the runtime.
v1
Macros for benchmarking a FRAME runtime.
v2
Contains macros, structs, and traits associated with v2 of the pallet benchmarking syntax.

Macros§

add_benchmark
This macro adds pallet benchmarks to a Vec<BenchmarkBatch> object.
benchmarks
Construct pallet benchmarks for weighing dispatchables.
benchmarks_instance
Same as benchmarks but for instantiable module.
benchmarks_instance_pallet
Same as benchmarks but for instantiable pallet declared frame_support::pallet.
define_benchmarks
Defines pallet configs that add_benchmarks and list_benchmarks use. Should be preferred instead of having a repetitive list of configs in add_benchmark and list_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.
validate_pov_mode
Validates the passed pov_modes.
whitelist
Whitelist the given account.
whitelist_account

Structs§

Analysis
BenchmarkBatch
The results of a single of benchmark.
BenchmarkBatchSplitResults
The results of a single of benchmark, where time and db results are separated.
BenchmarkConfig
Configuration used to setup and run runtime benchmarks.
BenchmarkList
A list of benchmarks available for a particular pallet and instance.
BenchmarkMetadata
BenchmarkRecording
Records the time and proof size of a single benchmark iteration.
BenchmarkResult
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§

AnalysisChoice
BenchmarkError
Possible errors returned from the benchmarking pipeline.
BenchmarkParameter
An alphabet of possible parameters to use for benchmarking.
BenchmarkSelector

Traits§

Benchmark
Runtime api for benchmarking a FRAME runtime.
Benchmarking
The pallet benchmarking trait.
BenchmarkingSetup
The required setup for creating a benchmark.
Recording
The recording trait used to mark the start and end of a benchmark.

Functions§

account
Grab an account, seeded by a name and index.
whitelisted_caller
This caller account is automatically whitelisted for DB reads/writes by the benchmarking macro.