Add steps setting to benchmarking CLI (#5033)

* Add steps setting to CLI, use max value to hit worst case.

* Bump impl_version.

* Apply review suggestion.
This commit is contained in:
Marcio Diaz
2020-02-25 15:51:25 +01:00
committed by GitHub
parent 36770979bb
commit d024364503
4 changed files with 20 additions and 13 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ sp_api::decl_runtime_apis! {
fn dispatch_benchmark(
module: Vec<u8>,
extrinsic: Vec<u8>,
steps: u32,
steps: Vec<u32>,
repeat: u32,
) -> Option<Vec<BenchmarkResults>>;
}
@@ -78,7 +78,7 @@ pub trait Benchmarking<T> {
/// - `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.
/// - `repeat`: The number of times you want to repeat a benchmark.
fn run_benchmark(extrinsic: Vec<u8>, steps: u32, repeat: u32) -> Result<Vec<T>, &'static str>;
fn run_benchmark(extrinsic: Vec<u8>, steps: Vec<u32>, repeat: u32) -> Result<Vec<T>, &'static str>;
}
/// The required setup for creating a benchmark.