Trait frame_benchmarking::Benchmark
source · pub trait Benchmark<Block: BlockT>: Core<Block> {
fn benchmark_metadata(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extra: bool
) -> Result<(Vec<BenchmarkList>, Vec<StorageInfo>), ApiError> { ... }
fn benchmark_metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extra: bool
) -> Result<(Vec<BenchmarkList>, Vec<StorageInfo>), ApiError> { ... }
fn dispatch_benchmark(
&self,
__runtime_api_at_param__: &BlockId<Block>,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch>, RuntimeString>, ApiError> { ... }
fn dispatch_benchmark_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch>, RuntimeString>, ApiError> { ... }
}
Expand description
Runtime api for benchmarking a FRAME runtime.
Provided Methods§
sourcefn benchmark_metadata(
&self,
__runtime_api_at_param__: &BlockId<Block>,
extra: bool
) -> Result<(Vec<BenchmarkList>, Vec<StorageInfo>), ApiError>
fn benchmark_metadata(
&self,
__runtime_api_at_param__: &BlockId<Block>,
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.
sourcefn benchmark_metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
extra: bool
) -> Result<(Vec<BenchmarkList>, Vec<StorageInfo>), ApiError>
fn benchmark_metadata_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
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.
sourcefn dispatch_benchmark(
&self,
__runtime_api_at_param__: &BlockId<Block>,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch>, RuntimeString>, ApiError>
fn dispatch_benchmark(
&self,
__runtime_api_at_param__: &BlockId<Block>,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch>, RuntimeString>, ApiError>
Dispatch the given benchmark.
sourcefn dispatch_benchmark_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch>, RuntimeString>, ApiError>
fn dispatch_benchmark_with_context(
&self,
__runtime_api_at_param__: &BlockId<Block>,
context: ExecutionContext,
config: BenchmarkConfig
) -> Result<Result<Vec<BenchmarkBatch>, RuntimeString>, ApiError>
Dispatch the given benchmark.