pub trait BenchmarkConfig: Config {
// Provided method
fn setup_benchmark_environment() { ... }
}Expand description
Benchmark configuration trait.
This extends the pallet’s Config trait to allow runtimes to set up any required state before running benchmarks. For example, runtimes that distribute fees to block authors may need to set the author before the benchmark runs.
Provided Methods§
Sourcefn setup_benchmark_environment()
fn setup_benchmark_environment()
Called at the start of each benchmark to set up any required state.
The default implementation is a no-op. Runtimes can override this to perform setup like setting the block author for fee distribution.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.