Add production profile to substrate-wasm-builder (#10747)

* Add production profile to wasm builder

* Fix profile detection

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Replace panic! by println! + exit

* Default to `release` for wasm on debug builds

* Replaced unwrap by expect

* Update all weights

Rerun on the bm2 server.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
Alexander Theißen
2022-01-31 15:16:26 +01:00
committed by GitHub
parent 21d5573b25
commit f3168c3fa0
35 changed files with 1943 additions and 1833 deletions
+117 -113
View File
@@ -18,11 +18,11 @@
//! Autogenerated weights for pallet_staking
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-01-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-01-31, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/lto-fat-cg1/substrate
// ./target/production/substrate
// benchmark
// --chain=dev
// --steps=50
@@ -34,7 +34,7 @@
// --heap-pages=4096
// --output=./frame/staking/src/weights.rs
// --template=.maintain/frame-weight-template.hbs
// --header=LICENSE-APACHE2
// --header=HEADER-APACHE2
// --raw
#![cfg_attr(rustfmt, rustfmt_skip)]
@@ -86,7 +86,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Balances Locks (r:1 w:1)
// Storage: Staking Payee (r:0 w:1)
fn bond() -> Weight {
(38_457_000 as Weight)
(37_688_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
@@ -96,7 +96,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: BagsList ListNodes (r:3 w:3)
// Storage: BagsList ListBags (r:2 w:2)
fn bond_extra() -> Weight {
(65_678_000 as Weight)
(63_507_000 as Weight)
.saturating_add(T::DbWeight::get().reads(8 as Weight))
.saturating_add(T::DbWeight::get().writes(7 as Weight))
}
@@ -110,7 +110,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Bonded (r:1 w:0)
// Storage: BagsList ListBags (r:2 w:2)
fn unbond() -> Weight {
(71_544_000 as Weight)
(70_634_000 as Weight)
.saturating_add(T::DbWeight::get().reads(12 as Weight))
.saturating_add(T::DbWeight::get().writes(8 as Weight))
}
@@ -119,9 +119,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn withdraw_unbonded_update(s: u32, ) -> Weight {
(30_127_000 as Weight)
(30_002_000 as Weight)
// Standard Error: 0
.saturating_add((59_000 as Weight).saturating_mul(s as Weight))
.saturating_add((55_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
@@ -139,7 +139,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Balances Locks (r:1 w:1)
// Storage: Staking Payee (r:0 w:1)
fn withdraw_unbonded_kill(_s: u32, ) -> Weight {
(59_131_000 as Weight)
(58_077_000 as Weight)
.saturating_add(T::DbWeight::get().reads(13 as Weight))
.saturating_add(T::DbWeight::get().writes(11 as Weight))
}
@@ -155,16 +155,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: Staking CounterForValidators (r:1 w:1)
fn validate() -> Weight {
(45_519_000 as Weight)
(44_603_000 as Weight)
.saturating_add(T::DbWeight::get().reads(12 as Weight))
.saturating_add(T::DbWeight::get().writes(8 as Weight))
}
// Storage: Staking Ledger (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
fn kick(k: u32, ) -> Weight {
(16_645_000 as Weight)
// Standard Error: 12_000
.saturating_add((8_194_000 as Weight).saturating_mul(k as Weight))
(14_580_000 as Weight)
// Standard Error: 13_000
.saturating_add((8_076_000 as Weight).saturating_mul(k as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
@@ -181,9 +181,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: Staking CounterForNominators (r:1 w:1)
fn nominate(n: u32, ) -> Weight {
(50_227_000 as Weight)
// Standard Error: 12_000
.saturating_add((3_546_000 as Weight).saturating_mul(n as Weight))
(49_856_000 as Weight)
// Standard Error: 8_000
.saturating_add((3_430_000 as Weight).saturating_mul(n as Weight))
.saturating_add(T::DbWeight::get().reads(12 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
@@ -196,49 +196,49 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
fn chill() -> Weight {
(44_294_000 as Weight)
(43_815_000 as Weight)
.saturating_add(T::DbWeight::get().reads(8 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
// Storage: Staking Ledger (r:1 w:0)
// Storage: Staking Payee (r:0 w:1)
fn set_payee() -> Weight {
(7_556_000 as Weight)
(7_553_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Staking Bonded (r:1 w:1)
// Storage: Staking Ledger (r:2 w:2)
fn set_controller() -> Weight {
(15_826_000 as Weight)
(15_177_000 as Weight)
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
// Storage: Staking ValidatorCount (r:0 w:1)
fn set_validator_count() -> Weight {
(1_141_000 as Weight)
(1_090_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_no_eras() -> Weight {
(1_152_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_new_era() -> Weight {
(1_169_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_new_era() -> Weight {
(1_089_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_new_era_always() -> Weight {
(1_134_000 as Weight)
(1_144_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Staking Invulnerables (r:0 w:1)
fn set_invulnerables(v: u32, ) -> Weight {
(1_641_000 as Weight)
(1_612_000 as Weight)
// Standard Error: 0
.saturating_add((52_000 as Weight).saturating_mul(v as Weight))
.saturating_add((50_000 as Weight).saturating_mul(v as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
// Storage: Staking Bonded (r:1 w:1)
@@ -255,18 +255,18 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Payee (r:0 w:1)
// Storage: Staking SpanSlash (r:0 w:2)
fn force_unstake(s: u32, ) -> Weight {
(57_227_000 as Weight)
(56_103_000 as Weight)
// Standard Error: 1_000
.saturating_add((817_000 as Weight).saturating_mul(s as Weight))
.saturating_add((798_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(11 as Weight))
.saturating_add(T::DbWeight::get().writes(12 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
}
// Storage: Staking UnappliedSlashes (r:1 w:1)
fn cancel_deferred_slash(s: u32, ) -> Weight {
(950_241_000 as Weight)
// Standard Error: 56_000
.saturating_add((4_960_000 as Weight).saturating_mul(s as Weight))
(942_911_000 as Weight)
// Standard Error: 55_000
.saturating_add((4_973_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
@@ -281,9 +281,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Payee (r:2 w:0)
// Storage: System Account (r:2 w:2)
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
(73_561_000 as Weight)
(77_948_000 as Weight)
// Standard Error: 13_000
.saturating_add((24_039_000 as Weight).saturating_mul(n as Weight))
.saturating_add((23_507_000 as Weight).saturating_mul(n as Weight))
.saturating_add(T::DbWeight::get().reads(10 as Weight))
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
@@ -301,9 +301,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: System Account (r:2 w:2)
// Storage: Balances Locks (r:2 w:2)
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
(105_296_000 as Weight)
// Standard Error: 18_000
.saturating_add((33_989_000 as Weight).saturating_mul(n as Weight))
(94_386_000 as Weight)
// Standard Error: 19_000
.saturating_add((32_763_000 as Weight).saturating_mul(n as Weight))
.saturating_add(T::DbWeight::get().reads(11 as Weight))
.saturating_add(T::DbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
@@ -316,9 +316,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Bonded (r:1 w:0)
// Storage: BagsList ListBags (r:2 w:2)
fn rebond(l: u32, ) -> Weight {
(65_108_000 as Weight)
// Standard Error: 3_000
.saturating_add((72_000 as Weight).saturating_mul(l as Weight))
(63_577_000 as Weight)
// Standard Error: 2_000
.saturating_add((47_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(9 as Weight))
.saturating_add(T::DbWeight::get().writes(8 as Weight))
}
@@ -333,8 +333,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
fn set_history_depth(e: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 54_000
.saturating_add((19_731_000 as Weight).saturating_mul(e as Weight))
// Standard Error: 57_000
.saturating_add((19_691_000 as Weight).saturating_mul(e as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(T::DbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
@@ -353,9 +353,9 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Payee (r:0 w:1)
// Storage: Staking SpanSlash (r:0 w:1)
fn reap_stash(s: u32, ) -> Weight {
(63_115_000 as Weight)
(61_871_000 as Weight)
// Standard Error: 0
.saturating_add((812_000 as Weight).saturating_mul(s as Weight))
.saturating_add((796_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(12 as Weight))
.saturating_add(T::DbWeight::get().writes(12 as Weight))
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
@@ -380,10 +380,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
fn new_era(v: u32, n: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 800_000
.saturating_add((219_877_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 40_000
.saturating_add((31_701_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 823_000
.saturating_add((218_725_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 41_000
.saturating_add((31_349_000 as Weight).saturating_mul(n as Weight))
.saturating_add(T::DbWeight::get().reads(208 as Weight))
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight)))
@@ -401,10 +401,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Nominators (r:1000 w:0)
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 88_000
.saturating_add((18_183_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 88_000
.saturating_add((21_345_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 86_000
.saturating_add((18_168_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 86_000
.saturating_add((21_061_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 2_951_000
.saturating_add((8_164_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(204 as Weight))
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight)))
@@ -413,8 +415,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking Validators (r:501 w:0)
fn get_npos_targets(v: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 25_000
.saturating_add((7_691_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 29_000
.saturating_add((7_761_000 as Weight).saturating_mul(v as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
}
@@ -425,12 +427,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Staking MaxNominatorsCount (r:0 w:1)
// Storage: Staking MinNominatorBond (r:0 w:1)
fn set_staking_configs() -> Weight {
(3_324_000 as Weight)
(3_586_000 as Weight)
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
// Storage: Staking Ledger (r:1 w:0)
// Storage: Staking ChillThreshold (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
// Storage: Staking ChillThreshold (r:1 w:0)
// Storage: Staking MaxNominatorsCount (r:1 w:0)
// Storage: Staking CounterForNominators (r:1 w:1)
// Storage: Staking MinNominatorBond (r:1 w:0)
@@ -439,7 +441,7 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
fn chill_other() -> Weight {
(54_254_000 as Weight)
(54_681_000 as Weight)
.saturating_add(T::DbWeight::get().reads(11 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
@@ -454,7 +456,7 @@ impl WeightInfo for () {
// Storage: Balances Locks (r:1 w:1)
// Storage: Staking Payee (r:0 w:1)
fn bond() -> Weight {
(38_457_000 as Weight)
(37_688_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(5 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
}
@@ -464,7 +466,7 @@ impl WeightInfo for () {
// Storage: BagsList ListNodes (r:3 w:3)
// Storage: BagsList ListBags (r:2 w:2)
fn bond_extra() -> Weight {
(65_678_000 as Weight)
(63_507_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(8 as Weight))
.saturating_add(RocksDbWeight::get().writes(7 as Weight))
}
@@ -478,7 +480,7 @@ impl WeightInfo for () {
// Storage: Staking Bonded (r:1 w:0)
// Storage: BagsList ListBags (r:2 w:2)
fn unbond() -> Weight {
(71_544_000 as Weight)
(70_634_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(12 as Weight))
.saturating_add(RocksDbWeight::get().writes(8 as Weight))
}
@@ -487,9 +489,9 @@ impl WeightInfo for () {
// Storage: Balances Locks (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn withdraw_unbonded_update(s: u32, ) -> Weight {
(30_127_000 as Weight)
(30_002_000 as Weight)
// Standard Error: 0
.saturating_add((59_000 as Weight).saturating_mul(s as Weight))
.saturating_add((55_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(4 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
@@ -507,7 +509,7 @@ impl WeightInfo for () {
// Storage: Balances Locks (r:1 w:1)
// Storage: Staking Payee (r:0 w:1)
fn withdraw_unbonded_kill(_s: u32, ) -> Weight {
(59_131_000 as Weight)
(58_077_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(13 as Weight))
.saturating_add(RocksDbWeight::get().writes(11 as Weight))
}
@@ -523,16 +525,16 @@ impl WeightInfo for () {
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: Staking CounterForValidators (r:1 w:1)
fn validate() -> Weight {
(45_519_000 as Weight)
(44_603_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(12 as Weight))
.saturating_add(RocksDbWeight::get().writes(8 as Weight))
}
// Storage: Staking Ledger (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
fn kick(k: u32, ) -> Weight {
(16_645_000 as Weight)
// Standard Error: 12_000
.saturating_add((8_194_000 as Weight).saturating_mul(k as Weight))
(14_580_000 as Weight)
// Standard Error: 13_000
.saturating_add((8_076_000 as Weight).saturating_mul(k as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(k as Weight)))
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(k as Weight)))
@@ -549,9 +551,9 @@ impl WeightInfo for () {
// Storage: BagsList CounterForListNodes (r:1 w:1)
// Storage: Staking CounterForNominators (r:1 w:1)
fn nominate(n: u32, ) -> Weight {
(50_227_000 as Weight)
// Standard Error: 12_000
.saturating_add((3_546_000 as Weight).saturating_mul(n as Weight))
(49_856_000 as Weight)
// Standard Error: 8_000
.saturating_add((3_430_000 as Weight).saturating_mul(n as Weight))
.saturating_add(RocksDbWeight::get().reads(12 as Weight))
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(n as Weight)))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
@@ -564,49 +566,49 @@ impl WeightInfo for () {
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
fn chill() -> Weight {
(44_294_000 as Weight)
(43_815_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(8 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}
// Storage: Staking Ledger (r:1 w:0)
// Storage: Staking Payee (r:0 w:1)
fn set_payee() -> Weight {
(7_556_000 as Weight)
(7_553_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Staking Bonded (r:1 w:1)
// Storage: Staking Ledger (r:2 w:2)
fn set_controller() -> Weight {
(15_826_000 as Weight)
(15_177_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
}
// Storage: Staking ValidatorCount (r:0 w:1)
fn set_validator_count() -> Weight {
(1_141_000 as Weight)
(1_090_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_no_eras() -> Weight {
(1_152_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_new_era() -> Weight {
(1_169_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_new_era() -> Weight {
(1_089_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Staking ForceEra (r:0 w:1)
fn force_new_era_always() -> Weight {
(1_134_000 as Weight)
(1_144_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Staking Invulnerables (r:0 w:1)
fn set_invulnerables(v: u32, ) -> Weight {
(1_641_000 as Weight)
(1_612_000 as Weight)
// Standard Error: 0
.saturating_add((52_000 as Weight).saturating_mul(v as Weight))
.saturating_add((50_000 as Weight).saturating_mul(v as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
// Storage: Staking Bonded (r:1 w:1)
@@ -623,18 +625,18 @@ impl WeightInfo for () {
// Storage: Staking Payee (r:0 w:1)
// Storage: Staking SpanSlash (r:0 w:2)
fn force_unstake(s: u32, ) -> Weight {
(57_227_000 as Weight)
(56_103_000 as Weight)
// Standard Error: 1_000
.saturating_add((817_000 as Weight).saturating_mul(s as Weight))
.saturating_add((798_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(11 as Weight))
.saturating_add(RocksDbWeight::get().writes(12 as Weight))
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
}
// Storage: Staking UnappliedSlashes (r:1 w:1)
fn cancel_deferred_slash(s: u32, ) -> Weight {
(950_241_000 as Weight)
// Standard Error: 56_000
.saturating_add((4_960_000 as Weight).saturating_mul(s as Weight))
(942_911_000 as Weight)
// Standard Error: 55_000
.saturating_add((4_973_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
}
@@ -649,9 +651,9 @@ impl WeightInfo for () {
// Storage: Staking Payee (r:2 w:0)
// Storage: System Account (r:2 w:2)
fn payout_stakers_dead_controller(n: u32, ) -> Weight {
(73_561_000 as Weight)
(77_948_000 as Weight)
// Standard Error: 13_000
.saturating_add((24_039_000 as Weight).saturating_mul(n as Weight))
.saturating_add((23_507_000 as Weight).saturating_mul(n as Weight))
.saturating_add(RocksDbWeight::get().reads(10 as Weight))
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(n as Weight)))
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
@@ -669,9 +671,9 @@ impl WeightInfo for () {
// Storage: System Account (r:2 w:2)
// Storage: Balances Locks (r:2 w:2)
fn payout_stakers_alive_staked(n: u32, ) -> Weight {
(105_296_000 as Weight)
// Standard Error: 18_000
.saturating_add((33_989_000 as Weight).saturating_mul(n as Weight))
(94_386_000 as Weight)
// Standard Error: 19_000
.saturating_add((32_763_000 as Weight).saturating_mul(n as Weight))
.saturating_add(RocksDbWeight::get().reads(11 as Weight))
.saturating_add(RocksDbWeight::get().reads((5 as Weight).saturating_mul(n as Weight)))
.saturating_add(RocksDbWeight::get().writes(3 as Weight))
@@ -684,9 +686,9 @@ impl WeightInfo for () {
// Storage: Staking Bonded (r:1 w:0)
// Storage: BagsList ListBags (r:2 w:2)
fn rebond(l: u32, ) -> Weight {
(65_108_000 as Weight)
// Standard Error: 3_000
.saturating_add((72_000 as Weight).saturating_mul(l as Weight))
(63_577_000 as Weight)
// Standard Error: 2_000
.saturating_add((47_000 as Weight).saturating_mul(l as Weight))
.saturating_add(RocksDbWeight::get().reads(9 as Weight))
.saturating_add(RocksDbWeight::get().writes(8 as Weight))
}
@@ -701,8 +703,8 @@ impl WeightInfo for () {
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
fn set_history_depth(e: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 54_000
.saturating_add((19_731_000 as Weight).saturating_mul(e as Weight))
// Standard Error: 57_000
.saturating_add((19_691_000 as Weight).saturating_mul(e as Weight))
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
.saturating_add(RocksDbWeight::get().writes(4 as Weight))
.saturating_add(RocksDbWeight::get().writes((7 as Weight).saturating_mul(e as Weight)))
@@ -721,9 +723,9 @@ impl WeightInfo for () {
// Storage: Staking Payee (r:0 w:1)
// Storage: Staking SpanSlash (r:0 w:1)
fn reap_stash(s: u32, ) -> Weight {
(63_115_000 as Weight)
(61_871_000 as Weight)
// Standard Error: 0
.saturating_add((812_000 as Weight).saturating_mul(s as Weight))
.saturating_add((796_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(12 as Weight))
.saturating_add(RocksDbWeight::get().writes(12 as Weight))
.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight)))
@@ -748,10 +750,10 @@ impl WeightInfo for () {
// Storage: Staking ErasStartSessionIndex (r:0 w:1)
fn new_era(v: u32, n: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 800_000
.saturating_add((219_877_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 40_000
.saturating_add((31_701_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 823_000
.saturating_add((218_725_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 41_000
.saturating_add((31_349_000 as Weight).saturating_mul(n as Weight))
.saturating_add(RocksDbWeight::get().reads(208 as Weight))
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
.saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(n as Weight)))
@@ -769,10 +771,12 @@ impl WeightInfo for () {
// Storage: Staking Nominators (r:1000 w:0)
fn get_npos_voters(v: u32, n: u32, s: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 88_000
.saturating_add((18_183_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 88_000
.saturating_add((21_345_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 86_000
.saturating_add((18_168_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 86_000
.saturating_add((21_061_000 as Weight).saturating_mul(n as Weight))
// Standard Error: 2_951_000
.saturating_add((8_164_000 as Weight).saturating_mul(s as Weight))
.saturating_add(RocksDbWeight::get().reads(204 as Weight))
.saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
.saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(n as Weight)))
@@ -781,8 +785,8 @@ impl WeightInfo for () {
// Storage: Staking Validators (r:501 w:0)
fn get_npos_targets(v: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 25_000
.saturating_add((7_691_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 29_000
.saturating_add((7_761_000 as Weight).saturating_mul(v as Weight))
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
}
@@ -793,12 +797,12 @@ impl WeightInfo for () {
// Storage: Staking MaxNominatorsCount (r:0 w:1)
// Storage: Staking MinNominatorBond (r:0 w:1)
fn set_staking_configs() -> Weight {
(3_324_000 as Weight)
(3_586_000 as Weight)
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}
// Storage: Staking Ledger (r:1 w:0)
// Storage: Staking ChillThreshold (r:1 w:0)
// Storage: Staking Nominators (r:1 w:1)
// Storage: Staking ChillThreshold (r:1 w:0)
// Storage: Staking MaxNominatorsCount (r:1 w:0)
// Storage: Staking CounterForNominators (r:1 w:1)
// Storage: Staking MinNominatorBond (r:1 w:0)
@@ -807,7 +811,7 @@ impl WeightInfo for () {
// Storage: BagsList ListBags (r:1 w:1)
// Storage: BagsList CounterForListNodes (r:1 w:1)
fn chill_other() -> Weight {
(54_254_000 as Weight)
(54_681_000 as Weight)
.saturating_add(RocksDbWeight::get().reads(11 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}