Trait frame_benchmarking::Benchmarking
source · [−]pub trait Benchmarking<T> {
fn benchmarks(extra: bool) -> Vec<&'static [u8]>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
fn run_benchmark(
name: &[u8],
lowest_range_values: &[u32],
highest_range_values: &[u32],
steps: &[u32],
repeat: u32,
whitelist: &[TrackedStorageKey],
verify: bool
) -> Result<Vec<T>, &'static str>;
}
Expand description
The pallet benchmarking trait.
Required methods
Get the benchmarks available for this pallet. Generally there is one benchmark per extrinsic, so these are sometimes just called “extrinsics”.
Parameters
extra
: Also return benchmarks marked “extra” which would otherwise not be needed for weight calculation.
Run the benchmarks for this pallet.
Parameters
name
: The name of extrinsic function or benchmark you want to benchmark encoded as bytes.steps
: The number of sample points you want to take across the range of parameters.lowest_range_values
: The lowest number for each range of parameters.highest_range_values
: The highest number for each range of parameters.repeat
: The number of times you want to repeat a benchmark.