implement dispatch_as (#9934)

* implement dispatch_as

* fix

* fix

* weight for dispatch_as

* cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/utility/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* fix

* Update frame/utility/src/benchmarking.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* fix issues

Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Xiliang Chen
2021-11-05 03:34:29 +13:00
committed by GitHub
parent acc835acd3
commit 58a3ab2813
7 changed files with 71 additions and 13 deletions
+20 -13
View File
@@ -18,7 +18,7 @@
//! Autogenerated weights for pallet_utility
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2021-08-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2021-10-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
// Executed Command:
@@ -48,39 +48,46 @@ pub trait WeightInfo {
fn batch(c: u32, ) -> Weight;
fn as_derivative() -> Weight;
fn batch_all(c: u32, ) -> Weight;
fn dispatch_as() -> Weight;
}
/// Weights for pallet_utility using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
fn batch(c: u32, ) -> Weight {
(30_319_000 as Weight)
(18_293_000 as Weight)
// Standard Error: 3_000
.saturating_add((6_759_000 as Weight).saturating_mul(c as Weight))
.saturating_add((5_530_000 as Weight).saturating_mul(c as Weight))
}
fn as_derivative() -> Weight {
(4_030_000 as Weight)
(3_387_000 as Weight)
}
fn batch_all(c: u32, ) -> Weight {
(26_621_000 as Weight)
// Standard Error: 3_000
.saturating_add((7_251_000 as Weight).saturating_mul(c as Weight))
(19_223_000 as Weight)
// Standard Error: 4_000
.saturating_add((5_998_000 as Weight).saturating_mul(c as Weight))
}
fn dispatch_as() -> Weight {
(14_340_000 as Weight)
}
}
// For backwards compatibility and tests
impl WeightInfo for () {
fn batch(c: u32, ) -> Weight {
(30_319_000 as Weight)
(18_293_000 as Weight)
// Standard Error: 3_000
.saturating_add((6_759_000 as Weight).saturating_mul(c as Weight))
.saturating_add((5_530_000 as Weight).saturating_mul(c as Weight))
}
fn as_derivative() -> Weight {
(4_030_000 as Weight)
(3_387_000 as Weight)
}
fn batch_all(c: u32, ) -> Weight {
(26_621_000 as Weight)
// Standard Error: 3_000
.saturating_add((7_251_000 as Weight).saturating_mul(c as Weight))
(19_223_000 as Weight)
// Standard Error: 4_000
.saturating_add((5_998_000 as Weight).saturating_mul(c as Weight))
}
fn dispatch_as() -> Weight {
(14_340_000 as Weight)
}
}