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
@@ -36,8 +36,8 @@ pub struct BenchmarkCmd {
pub extrinsic: String,
/// Select how many samples we should take across the variable components.
#[structopt(short, long, default_value = "1")]
pub steps: u32,
#[structopt(short, long, use_delimiter = true)]
pub steps: Vec<u32>,
/// Select how many repetitions of this benchmark should run.
#[structopt(short, long, default_value = "1")]
@@ -97,13 +97,14 @@ impl BenchmarkCmd {
wasm_method,
None, // heap pages
);
let result = StateMachine::<_, _, NumberFor<BB>, _>::new(
&state,
None,
&mut changes,
&executor,
"Benchmark_dispatch_benchmark",
&(&self.pallet, &self.extrinsic, self.steps, self.repeat).encode(),
&(&self.pallet, &self.extrinsic, self.steps.clone(), self.repeat).encode(),
Default::default(),
)
.execute(strategy.into())