Trait pallet_staking::benchmarking::v1::v2::Benchmark
pub trait Benchmark<Block>: Core<Block>where
Block: Block,{
// Provided methods
fn benchmark_metadata(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
extra: bool,
) -> Result<(Vec<BenchmarkList>, Vec<StorageInfo>), ApiError> { ... }
fn dispatch_benchmark(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
config: BenchmarkConfig,
) -> Result<Result<Vec<BenchmarkBatch>, String>, ApiError> { ... }
}
Expand description
Runtime api for benchmarking a FRAME runtime.
Provided Methods§
fn benchmark_metadata(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
extra: bool,
) -> Result<(Vec<BenchmarkList>, Vec<StorageInfo>), ApiError>
fn benchmark_metadata( &self, __runtime_api_at_param__: <Block as Block>::Hash, extra: bool, ) -> Result<(Vec<BenchmarkList>, Vec<StorageInfo>), ApiError>
Get the benchmark metadata available for this runtime.
Parameters
extra
: Also list benchmarks marked “extra” which would otherwise not be needed for weight calculation.
fn dispatch_benchmark(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
config: BenchmarkConfig,
) -> Result<Result<Vec<BenchmarkBatch>, String>, ApiError>
fn dispatch_benchmark( &self, __runtime_api_at_param__: <Block as Block>::Hash, config: BenchmarkConfig, ) -> Result<Result<Vec<BenchmarkBatch>, String>, ApiError>
Dispatch the given benchmark.