referrerpolicy=no-referrer-when-downgrade

Trait frame_benchmarking::Benchmark

source ·
pub trait Benchmark<Block: BlockT>: Core<Block> {
    // Provided methods
    fn benchmark_metadata(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        extra: bool,
    ) -> Result<(Vec<BenchmarkList>, Vec<StorageInfo>), ApiError> { ... }
    fn dispatch_benchmark(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        config: BenchmarkConfig,
    ) -> Result<Result<Vec<BenchmarkBatch>, String>, ApiError> { ... }
}
Expand description

Runtime api for benchmarking a FRAME runtime.

Provided Methods§

source

fn benchmark_metadata( &self, __runtime_api_at_param__: <Block as BlockT>::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.
source

fn dispatch_benchmark( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, config: BenchmarkConfig, ) -> Result<Result<Vec<BenchmarkBatch>, String>, ApiError>

Dispatch the given benchmark.

Trait Implementations§

source§

impl<Block: BlockT> RuntimeApiInfo for dyn Benchmark<Block>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 2u32

The version of the runtime api.

Implementors§