Companion for Substrate #6929 (Execute verify logic when running benchmarks) (#1623)

* Update for substrate changes

* cargo update -p sp-io

* cargo update -p sp-io
This commit is contained in:
Shawn Tabrizi
2020-08-24 16:35:03 +02:00
committed by GitHub
parent 430cf6e6f2
commit 4f72f246a5
4 changed files with 143 additions and 185 deletions
+2 -17
View File
@@ -1203,13 +1203,7 @@ sp_api::impl_runtime_apis! {
#[cfg(feature = "runtime-benchmarks")]
impl frame_benchmarking::Benchmark<Block> for Runtime {
fn dispatch_benchmark(
pallet: Vec<u8>,
benchmark: Vec<u8>,
lowest_range_values: Vec<u32>,
highest_range_values: Vec<u32>,
steps: Vec<u32>,
repeat: u32,
extra: bool,
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, RuntimeString> {
use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
// Trying to add benchmarks directly to the Session Pallet caused cyclic dependency issues.
@@ -1239,16 +1233,7 @@ sp_api::impl_runtime_apis! {
];
let mut batches = Vec::<BenchmarkBatch>::new();
let params = (
&pallet,
&benchmark,
&lowest_range_values,
&highest_range_values,
&steps,
repeat,
&whitelist,
extra,
);
let params = (&config, &whitelist);
// Polkadot
add_benchmark!(params, batches, claims, Claims);
// Substrate