Module v1
Expand description
Macros for benchmarking a FRAME runtime.
Modules§
- 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 
benchmarksbut for instantiable module. - benchmarks_
instance_ pallet  - Same as 
benchmarksbut for instantiable pallet declaredframe_support::pallet. - define_
benchmarks  - Defines pallet configs that 
add_benchmarksandlist_benchmarksuse. Should be preferred instead of having a repetitive list of configs inadd_benchmarkandlist_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
 - Benchmark
Batch  - The results of a single of benchmark.
 - Benchmark
Batch Split Results  - The results of a single of benchmark, where time and db results are separated.
 - 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§
- Analysis
Choice  - Benchmark
Error  - Possible errors returned from the benchmarking pipeline.
 - Benchmark
Parameter  - An alphabet of possible parameters to use for benchmarking.
 - Benchmark
Selector  
Traits§
- Benchmark
 - Runtime api for benchmarking a FRAME runtime.
 - 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§
- account
 - Grab an account, seeded by a name and index.
 - current_
time  - Get the number of nanoseconds passed since the UNIX epoch
 - 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.