Crate orml_benchmarking

Source
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 call add_benchmark.
cb_list_benchmarks
Callback for define_benchmarks to call list_benchmark.
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.
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
BenchmarkBatch
The results of a single of benchmark.
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§

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

Traits§

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§

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.