mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 22:47: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:
@@ -820,15 +820,35 @@ impl_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<frame_benchmarking::BenchmarkResults>, RuntimeString> {
|
||||
use frame_benchmarking::Benchmarking;
|
||||
|
||||
let result = match module.as_slice() {
|
||||
b"pallet-balances" | b"balances" => Balances::run_benchmark(extrinsic, steps, repeat),
|
||||
b"pallet-identity" | b"identity" => Identity::run_benchmark(extrinsic, steps, repeat),
|
||||
b"pallet-timestamp" | b"timestamp" => Timestamp::run_benchmark(extrinsic, steps, repeat),
|
||||
b"pallet-balances" | b"balances" => Balances::run_benchmark(
|
||||
extrinsic,
|
||||
lowest_range_values,
|
||||
highest_range_values,
|
||||
steps,
|
||||
repeat,
|
||||
),
|
||||
b"pallet-identity" | b"identity" => Identity::run_benchmark(
|
||||
extrinsic,
|
||||
lowest_range_values,
|
||||
highest_range_values,
|
||||
steps,
|
||||
repeat,
|
||||
),
|
||||
b"pallet-timestamp" | b"timestamp" => Timestamp::run_benchmark(
|
||||
extrinsic,
|
||||
lowest_range_values,
|
||||
highest_range_values,
|
||||
steps,
|
||||
repeat,
|
||||
),
|
||||
_ => Err("Benchmark not found for this pallet."),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user