mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 23:57:56 +00:00
Add options to overwrite range bounds in benchmark command. (#5072)
* Add --mins --maxs to benchmark command. * Apply review suggestions.
This commit is contained in:
@@ -41,6 +41,8 @@ sp_api::decl_runtime_apis! {
|
||||
fn dispatch_benchmark(
|
||||
module: Vec<u8>,
|
||||
extrinsic: Vec<u8>,
|
||||
lowest_range_values: Vec<u32>,
|
||||
highest_range_values: Vec<u32>,
|
||||
steps: Vec<u32>,
|
||||
repeat: u32,
|
||||
) -> Result<Vec<BenchmarkResults>, RuntimeString>;
|
||||
@@ -78,8 +80,16 @@ pub trait Benchmarking<T> {
|
||||
/// Parameters
|
||||
/// - `extrinsic`: The name of extrinsic function 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.
|
||||
fn run_benchmark(extrinsic: Vec<u8>, steps: Vec<u32>, repeat: u32) -> Result<Vec<T>, &'static str>;
|
||||
fn run_benchmark(
|
||||
extrinsic: Vec<u8>,
|
||||
lowest_range_values: Vec<u32>,
|
||||
highest_range_values: Vec<u32>,
|
||||
steps: Vec<u32>,
|
||||
repeat: u32,
|
||||
) -> Result<Vec<T>, &'static str>;
|
||||
}
|
||||
|
||||
/// The required setup for creating a benchmark.
|
||||
|
||||
Reference in New Issue
Block a user