From 606b80b5ddd29c404583de4ce39d061351155197 Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Mon, 1 Nov 2021 16:29:25 +0000 Subject: [PATCH 1/2] Initial pass at updated benchmarks for runtime 90X --- pallets/author-mapping/src/weights.rs | 25 ++-- pallets/parachain-staking/src/weights.rs | 179 +++++++++++------------ 2 files changed, 99 insertions(+), 105 deletions(-) diff --git a/pallets/author-mapping/src/weights.rs b/pallets/author-mapping/src/weights.rs index 21cf8ca988..9e84d30a44 100644 --- a/pallets/author-mapping/src/weights.rs +++ b/pallets/author-mapping/src/weights.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for pallet_author_mapping //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-14, STEPS: `[32, ]`, REPEAT: 64, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2021-11-01, STEPS: `32`, REPEAT: 64, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 // Executed Command: @@ -28,7 +28,7 @@ // --execution=wasm // --wasm-execution=compiled // --pallet -// pallet_author_mapping +// * // --extrinsic // * // --steps @@ -39,14 +39,13 @@ // --template=./benchmarking/frame-weight-template.hbs // --output // /tmp/ +// --record-proof + #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{ - traits::Get, - weights::{constants::RocksDbWeight, Weight}, -}; +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use sp_std::marker::PhantomData; /// Weight functions needed for pallet_author_mapping. @@ -60,17 +59,17 @@ pub trait WeightInfo { pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn add_association() -> Weight { - (44_032_000 as Weight) + (43_936_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn update_association() -> Weight { - (27_468_000 as Weight) + (28_626_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn clear_association() -> Weight { - (44_603_000 as Weight) + (44_909_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -79,17 +78,17 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { fn add_association() -> Weight { - (44_032_000 as Weight) + (43_936_000 as Weight) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } fn update_association() -> Weight { - (27_468_000 as Weight) + (28_626_000 as Weight) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } fn clear_association() -> Weight { - (44_603_000 as Weight) + (44_909_000 as Weight) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } diff --git a/pallets/parachain-staking/src/weights.rs b/pallets/parachain-staking/src/weights.rs index dac7a95efd..5242e9b388 100644 --- a/pallets/parachain-staking/src/weights.rs +++ b/pallets/parachain-staking/src/weights.rs @@ -16,8 +16,8 @@ //! Autogenerated weights for parachain_staking //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 -//! DATE: 2021-07-19, STEPS: `[32, ]`, REPEAT: 64, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2021-11-01, STEPS: `32`, REPEAT: 64, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 // Executed Command: @@ -28,7 +28,7 @@ // --execution=wasm // --wasm-execution=compiled // --pallet -// parachain_staking +// * // --extrinsic // * // --steps @@ -39,14 +39,13 @@ // --template=./benchmarking/frame-weight-template.hbs // --output // /tmp/ +// --record-proof + #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{ - traits::Get, - weights::{constants::RocksDbWeight, Weight}, -}; +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use sp_std::marker::PhantomData; /// Weight functions needed for parachain_staking. @@ -58,18 +57,18 @@ pub trait WeightInfo { fn set_total_selected() -> Weight; fn set_collator_commission() -> Weight; fn set_blocks_per_round() -> Weight; - fn join_candidates(x: u32) -> Weight; - fn leave_candidates(x: u32) -> Weight; + fn join_candidates(x: u32, ) -> Weight; + fn leave_candidates(x: u32, ) -> Weight; fn go_offline() -> Weight; fn go_online() -> Weight; fn candidate_bond_more() -> Weight; fn candidate_bond_less() -> Weight; - fn nominate(x: u32, y: u32) -> Weight; - fn leave_nominators(x: u32) -> Weight; + fn nominate(x: u32, y: u32, ) -> Weight; + fn leave_nominators(x: u32, ) -> Weight; fn revoke_nomination() -> Weight; fn nominator_bond_more() -> Weight; fn nominator_bond_less() -> Weight; - fn active_on_initialize(x: u32, y: u32) -> Weight; + fn active_on_initialize(x: u32, y: u32, ) -> Weight; fn passive_on_initialize() -> Weight; } @@ -77,241 +76,237 @@ pub trait WeightInfo { pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn set_staking_expectations() -> Weight { - (20_719_000 as Weight) + (21_357_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_inflation() -> Weight { - (63_011_000 as Weight) + (63_879_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_parachain_bond_account() -> Weight { - (20_434_000 as Weight) + (21_210_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_parachain_bond_reserve_percent() -> Weight { - (19_239_000 as Weight) + (20_072_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_total_selected() -> Weight { - (18_402_000 as Weight) + (19_854_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_collator_commission() -> Weight { - (18_178_000 as Weight) + (19_353_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } fn set_blocks_per_round() -> Weight { - (65_939_000 as Weight) + (66_975_000 as Weight) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } - fn join_candidates(x: u32) -> Weight { - (84_807_000 as Weight) + fn join_candidates(x: u32, ) -> Weight { + (76_710_000 as Weight) // Standard Error: 1_000 - .saturating_add((333_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((276_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } - fn leave_candidates(x: u32) -> Weight { - (64_426_000 as Weight) + fn leave_candidates(x: u32, ) -> Weight { + (73_060_000 as Weight) // Standard Error: 1_000 - .saturating_add((332_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((260_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } fn go_offline() -> Weight { - (36_577_000 as Weight) + (36_250_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn go_online() -> Weight { - (36_134_000 as Weight) + (35_562_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn candidate_bond_more() -> Weight { - (59_735_000 as Weight) + (58_748_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } fn candidate_bond_less() -> Weight { - (59_421_000 as Weight) + (58_578_000 as Weight) .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } - fn nominate(x: u32, y: u32) -> Weight { - (71_656_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_049_000 as Weight).saturating_mul(x as Weight)) - // Standard Error: 5_000 - .saturating_add((947_000 as Weight).saturating_mul(y as Weight)) + fn nominate(x: u32, y: u32, ) -> Weight { + (85_728_000 as Weight) + // Standard Error: 3_000 + .saturating_add((587_000 as Weight).saturating_mul(x as Weight)) + // Standard Error: 3_000 + .saturating_add((637_000 as Weight).saturating_mul(y as Weight)) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } - fn leave_nominators(x: u32) -> Weight { - (36_354_000 as Weight) + fn leave_nominators(x: u32, ) -> Weight { + (39_075_000 as Weight) // Standard Error: 2_000 - .saturating_add((694_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((374_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn revoke_nomination() -> Weight { - (37_580_000 as Weight) + (36_803_000 as Weight) .saturating_add(T::DbWeight::get().reads(7 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } fn nominator_bond_more() -> Weight { - (70_867_000 as Weight) + (68_870_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } fn nominator_bond_less() -> Weight { - (70_857_000 as Weight) + (68_980_000 as Weight) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } - // If this takes up too much block space, run again on code - // - #743 benchmarks post reward payout optimization were 3x lower per collator, - // 15x lower per nominator - fn active_on_initialize(x: u32, y: u32) -> Weight { + fn active_on_initialize(x: u32, y: u32, ) -> Weight { (0 as Weight) - // Standard Error: 299_000 - .saturating_add((208_550_000 as Weight).saturating_mul(x as Weight)) - // Standard Error: 27_000 - .saturating_add((15_580_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(T::DbWeight::get().reads(26 as Weight)) + // Standard Error: 725_000 + .saturating_add((129_379_000 as Weight).saturating_mul(x as Weight)) + // Standard Error: 6_000 + .saturating_add((840_000 as Weight).saturating_mul(y as Weight)) + .saturating_add(T::DbWeight::get().reads(101 as Weight)) .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(x as Weight))) - .saturating_add(T::DbWeight::get().writes(16 as Weight)) + .saturating_add(T::DbWeight::get().writes(90 as Weight)) .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(x as Weight))) } fn passive_on_initialize() -> Weight { - (4_913_000 as Weight).saturating_add(T::DbWeight::get().reads(1 as Weight)) + (5_302_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) } } // For backwards compatibility and tests impl WeightInfo for () { fn set_staking_expectations() -> Weight { - (20_719_000 as Weight) + (21_357_000 as Weight) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } fn set_inflation() -> Weight { - (63_011_000 as Weight) + (63_879_000 as Weight) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } fn set_parachain_bond_account() -> Weight { - (20_434_000 as Weight) + (21_210_000 as Weight) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } fn set_parachain_bond_reserve_percent() -> Weight { - (19_239_000 as Weight) + (20_072_000 as Weight) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } fn set_total_selected() -> Weight { - (18_402_000 as Weight) + (19_854_000 as Weight) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } fn set_collator_commission() -> Weight { - (18_178_000 as Weight) + (19_353_000 as Weight) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } fn set_blocks_per_round() -> Weight { - (65_939_000 as Weight) + (66_975_000 as Weight) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } - fn join_candidates(x: u32) -> Weight { - (84_807_000 as Weight) + fn join_candidates(x: u32, ) -> Weight { + (76_710_000 as Weight) // Standard Error: 1_000 - .saturating_add((333_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((276_000 as Weight).saturating_mul(x as Weight)) .saturating_add(RocksDbWeight::get().reads(9 as Weight)) .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } - fn leave_candidates(x: u32) -> Weight { - (64_426_000 as Weight) + fn leave_candidates(x: u32, ) -> Weight { + (73_060_000 as Weight) // Standard Error: 1_000 - .saturating_add((332_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((260_000 as Weight).saturating_mul(x as Weight)) .saturating_add(RocksDbWeight::get().reads(8 as Weight)) .saturating_add(RocksDbWeight::get().writes(5 as Weight)) } fn go_offline() -> Weight { - (36_577_000 as Weight) + (36_250_000 as Weight) .saturating_add(RocksDbWeight::get().reads(7 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } fn go_online() -> Weight { - (36_134_000 as Weight) + (35_562_000 as Weight) .saturating_add(RocksDbWeight::get().reads(7 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } fn candidate_bond_more() -> Weight { - (59_735_000 as Weight) + (58_748_000 as Weight) .saturating_add(RocksDbWeight::get().reads(8 as Weight)) .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } fn candidate_bond_less() -> Weight { - (59_421_000 as Weight) + (58_578_000 as Weight) .saturating_add(RocksDbWeight::get().reads(8 as Weight)) .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } - fn nominate(x: u32, y: u32) -> Weight { - (71_656_000 as Weight) - // Standard Error: 1_000 - .saturating_add((1_049_000 as Weight).saturating_mul(x as Weight)) - // Standard Error: 5_000 - .saturating_add((947_000 as Weight).saturating_mul(y as Weight)) + fn nominate(x: u32, y: u32, ) -> Weight { + (85_728_000 as Weight) + // Standard Error: 3_000 + .saturating_add((587_000 as Weight).saturating_mul(x as Weight)) + // Standard Error: 3_000 + .saturating_add((637_000 as Weight).saturating_mul(y as Weight)) .saturating_add(RocksDbWeight::get().reads(9 as Weight)) .saturating_add(RocksDbWeight::get().writes(7 as Weight)) } - fn leave_nominators(x: u32) -> Weight { - (36_354_000 as Weight) + fn leave_nominators(x: u32, ) -> Weight { + (39_075_000 as Weight) // Standard Error: 2_000 - .saturating_add((694_000 as Weight).saturating_mul(x as Weight)) + .saturating_add((374_000 as Weight).saturating_mul(x as Weight)) .saturating_add(RocksDbWeight::get().reads(7 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } fn revoke_nomination() -> Weight { - (37_580_000 as Weight) + (36_803_000 as Weight) .saturating_add(RocksDbWeight::get().reads(7 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } fn nominator_bond_more() -> Weight { - (70_867_000 as Weight) + (68_870_000 as Weight) .saturating_add(RocksDbWeight::get().reads(9 as Weight)) .saturating_add(RocksDbWeight::get().writes(7 as Weight)) } fn nominator_bond_less() -> Weight { - (70_857_000 as Weight) + (68_980_000 as Weight) .saturating_add(RocksDbWeight::get().reads(9 as Weight)) .saturating_add(RocksDbWeight::get().writes(7 as Weight)) } - // If this takes up too much block space, run again on code - // - #743 benchmarks post reward payout optimization were 3x lower per collator, - // 15x lower per nominator - fn active_on_initialize(x: u32, y: u32) -> Weight { + fn active_on_initialize(x: u32, y: u32, ) -> Weight { (0 as Weight) - // Standard Error: 299_000 - .saturating_add((208_550_000 as Weight).saturating_mul(x as Weight)) - // Standard Error: 27_000 - .saturating_add((15_580_000 as Weight).saturating_mul(y as Weight)) - .saturating_add(RocksDbWeight::get().reads(26 as Weight)) + // Standard Error: 725_000 + .saturating_add((129_379_000 as Weight).saturating_mul(x as Weight)) + // Standard Error: 6_000 + .saturating_add((840_000 as Weight).saturating_mul(y as Weight)) + .saturating_add(RocksDbWeight::get().reads(101 as Weight)) .saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(x as Weight))) - .saturating_add(RocksDbWeight::get().writes(16 as Weight)) + .saturating_add(RocksDbWeight::get().writes(90 as Weight)) .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(x as Weight))) } fn passive_on_initialize() -> Weight { - (4_913_000 as Weight).saturating_add(RocksDbWeight::get().reads(1 as Weight)) + (5_302_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) } } From f3f8e56f79190587f7133d279c1fa19c4d4246ad Mon Sep 17 00:00:00 2001 From: Stephen Shelton Date: Mon, 1 Nov 2021 17:47:43 +0000 Subject: [PATCH 2/2] cargo fmt --- pallets/author-mapping/src/weights.rs | 6 ++-- pallets/parachain-staking/src/weights.rs | 42 ++++++++++++------------ 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/pallets/author-mapping/src/weights.rs b/pallets/author-mapping/src/weights.rs index 9e84d30a44..7dddb942b5 100644 --- a/pallets/author-mapping/src/weights.rs +++ b/pallets/author-mapping/src/weights.rs @@ -41,11 +41,13 @@ // /tmp/ // --record-proof - #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{ + traits::Get, + weights::{constants::RocksDbWeight, Weight}, +}; use sp_std::marker::PhantomData; /// Weight functions needed for pallet_author_mapping. diff --git a/pallets/parachain-staking/src/weights.rs b/pallets/parachain-staking/src/weights.rs index 5242e9b388..25e1feb672 100644 --- a/pallets/parachain-staking/src/weights.rs +++ b/pallets/parachain-staking/src/weights.rs @@ -41,11 +41,13 @@ // /tmp/ // --record-proof - #![allow(unused_parens)] #![allow(unused_imports)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{ + traits::Get, + weights::{constants::RocksDbWeight, Weight}, +}; use sp_std::marker::PhantomData; /// Weight functions needed for parachain_staking. @@ -57,18 +59,18 @@ pub trait WeightInfo { fn set_total_selected() -> Weight; fn set_collator_commission() -> Weight; fn set_blocks_per_round() -> Weight; - fn join_candidates(x: u32, ) -> Weight; - fn leave_candidates(x: u32, ) -> Weight; + fn join_candidates(x: u32) -> Weight; + fn leave_candidates(x: u32) -> Weight; fn go_offline() -> Weight; fn go_online() -> Weight; fn candidate_bond_more() -> Weight; fn candidate_bond_less() -> Weight; - fn nominate(x: u32, y: u32, ) -> Weight; - fn leave_nominators(x: u32, ) -> Weight; + fn nominate(x: u32, y: u32) -> Weight; + fn leave_nominators(x: u32) -> Weight; fn revoke_nomination() -> Weight; fn nominator_bond_more() -> Weight; fn nominator_bond_less() -> Weight; - fn active_on_initialize(x: u32, y: u32, ) -> Weight; + fn active_on_initialize(x: u32, y: u32) -> Weight; fn passive_on_initialize() -> Weight; } @@ -110,14 +112,14 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } - fn join_candidates(x: u32, ) -> Weight { + fn join_candidates(x: u32) -> Weight { (76_710_000 as Weight) // Standard Error: 1_000 .saturating_add((276_000 as Weight).saturating_mul(x as Weight)) .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } - fn leave_candidates(x: u32, ) -> Weight { + fn leave_candidates(x: u32) -> Weight { (73_060_000 as Weight) // Standard Error: 1_000 .saturating_add((260_000 as Weight).saturating_mul(x as Weight)) @@ -144,7 +146,7 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().reads(8 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } - fn nominate(x: u32, y: u32, ) -> Weight { + fn nominate(x: u32, y: u32) -> Weight { (85_728_000 as Weight) // Standard Error: 3_000 .saturating_add((587_000 as Weight).saturating_mul(x as Weight)) @@ -153,7 +155,7 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } - fn leave_nominators(x: u32, ) -> Weight { + fn leave_nominators(x: u32) -> Weight { (39_075_000 as Weight) // Standard Error: 2_000 .saturating_add((374_000 as Weight).saturating_mul(x as Weight)) @@ -175,7 +177,7 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().reads(9 as Weight)) .saturating_add(T::DbWeight::get().writes(7 as Weight)) } - fn active_on_initialize(x: u32, y: u32, ) -> Weight { + fn active_on_initialize(x: u32, y: u32) -> Weight { (0 as Weight) // Standard Error: 725_000 .saturating_add((129_379_000 as Weight).saturating_mul(x as Weight)) @@ -187,8 +189,7 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(x as Weight))) } fn passive_on_initialize() -> Weight { - (5_302_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) + (5_302_000 as Weight).saturating_add(T::DbWeight::get().reads(1 as Weight)) } } @@ -229,14 +230,14 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } - fn join_candidates(x: u32, ) -> Weight { + fn join_candidates(x: u32) -> Weight { (76_710_000 as Weight) // Standard Error: 1_000 .saturating_add((276_000 as Weight).saturating_mul(x as Weight)) .saturating_add(RocksDbWeight::get().reads(9 as Weight)) .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } - fn leave_candidates(x: u32, ) -> Weight { + fn leave_candidates(x: u32) -> Weight { (73_060_000 as Weight) // Standard Error: 1_000 .saturating_add((260_000 as Weight).saturating_mul(x as Weight)) @@ -263,7 +264,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(8 as Weight)) .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } - fn nominate(x: u32, y: u32, ) -> Weight { + fn nominate(x: u32, y: u32) -> Weight { (85_728_000 as Weight) // Standard Error: 3_000 .saturating_add((587_000 as Weight).saturating_mul(x as Weight)) @@ -272,7 +273,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(9 as Weight)) .saturating_add(RocksDbWeight::get().writes(7 as Weight)) } - fn leave_nominators(x: u32, ) -> Weight { + fn leave_nominators(x: u32) -> Weight { (39_075_000 as Weight) // Standard Error: 2_000 .saturating_add((374_000 as Weight).saturating_mul(x as Weight)) @@ -294,7 +295,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(9 as Weight)) .saturating_add(RocksDbWeight::get().writes(7 as Weight)) } - fn active_on_initialize(x: u32, y: u32, ) -> Weight { + fn active_on_initialize(x: u32, y: u32) -> Weight { (0 as Weight) // Standard Error: 725_000 .saturating_add((129_379_000 as Weight).saturating_mul(x as Weight)) @@ -306,7 +307,6 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(x as Weight))) } fn passive_on_initialize() -> Weight { - (5_302_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + (5_302_000 as Weight).saturating_add(RocksDbWeight::get().reads(1 as Weight)) } }