Companion of paritytech/substrate#12157 (#5964)

* Remove RefTimeWeight

* Fixes

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
This commit is contained in:
Keith Yeung
2022-09-03 03:12:06 +08:00
committed by GitHub
parent f0c74f6bc5
commit 41eff346cb
138 changed files with 4123 additions and 4123 deletions
@@ -38,7 +38,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{RefTimeWeight, Weight}};
use frame_support::{traits::Get, weights::Weight};
use sp_std::marker::PhantomData;
/// Weight functions for `pallet_elections_phragmen`.
@@ -51,11 +51,11 @@ impl<T: frame_system::Config> pallet_elections_phragmen::WeightInfo for WeightIn
// Storage: Balances Locks (r:1 w:1)
/// The range of component `v` is `[1, 16]`.
fn vote_equal(v: u32, ) -> Weight {
Weight::from_ref_time(24_107_000 as RefTimeWeight)
Weight::from_ref_time(24_107_000 as u64)
// Standard Error: 2_000
.saturating_add(Weight::from_ref_time(184_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(184_000 as u64).saturating_mul(v as u64))
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: PhragmenElection Candidates (r:1 w:0)
// Storage: PhragmenElection Members (r:1 w:0)
@@ -64,11 +64,11 @@ impl<T: frame_system::Config> pallet_elections_phragmen::WeightInfo for WeightIn
// Storage: Balances Locks (r:1 w:1)
/// The range of component `v` is `[2, 16]`.
fn vote_more(v: u32, ) -> Weight {
Weight::from_ref_time(36_869_000 as RefTimeWeight)
Weight::from_ref_time(36_869_000 as u64)
// Standard Error: 5_000
.saturating_add(Weight::from_ref_time(165_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(165_000 as u64).saturating_mul(v as u64))
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: PhragmenElection Candidates (r:1 w:0)
// Storage: PhragmenElection Members (r:1 w:0)
@@ -77,38 +77,38 @@ impl<T: frame_system::Config> pallet_elections_phragmen::WeightInfo for WeightIn
// Storage: Balances Locks (r:1 w:1)
/// The range of component `v` is `[2, 16]`.
fn vote_less(v: u32, ) -> Weight {
Weight::from_ref_time(36_445_000 as RefTimeWeight)
Weight::from_ref_time(36_445_000 as u64)
// Standard Error: 4_000
.saturating_add(Weight::from_ref_time(199_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(199_000 as u64).saturating_mul(v as u64))
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: PhragmenElection Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
fn remove_voter() -> Weight {
Weight::from_ref_time(33_035_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(33_035_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: PhragmenElection Candidates (r:1 w:1)
// Storage: PhragmenElection Members (r:1 w:0)
// Storage: PhragmenElection RunnersUp (r:1 w:0)
/// The range of component `c` is `[1, 1000]`.
fn submit_candidacy(c: u32, ) -> Weight {
Weight::from_ref_time(25_946_000 as RefTimeWeight)
Weight::from_ref_time(25_946_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(101_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(101_000 as u64).saturating_mul(c as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: PhragmenElection Candidates (r:1 w:1)
/// The range of component `c` is `[1, 1000]`.
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
Weight::from_ref_time(22_945_000 as RefTimeWeight)
Weight::from_ref_time(22_945_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(69_000 as RefTimeWeight).saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(69_000 as u64).saturating_mul(c as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: PhragmenElection Members (r:1 w:1)
// Storage: PhragmenElection RunnersUp (r:1 w:1)
@@ -116,19 +116,19 @@ impl<T: frame_system::Config> pallet_elections_phragmen::WeightInfo for WeightIn
// Storage: Council Proposals (r:1 w:0)
// Storage: Council Members (r:0 w:1)
fn renounce_candidacy_members() -> Weight {
Weight::from_ref_time(41_502_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
Weight::from_ref_time(41_502_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
// Storage: PhragmenElection RunnersUp (r:1 w:1)
fn renounce_candidacy_runners_up() -> Weight {
Weight::from_ref_time(30_791_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(30_791_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Benchmark Override (r:0 w:0)
fn remove_member_without_replacement() -> Weight {
Weight::from_ref_time(2_000_000_000_000 as RefTimeWeight)
Weight::from_ref_time(2_000_000_000_000 as u64)
}
// Storage: PhragmenElection Members (r:1 w:1)
// Storage: System Account (r:1 w:1)
@@ -137,9 +137,9 @@ impl<T: frame_system::Config> pallet_elections_phragmen::WeightInfo for WeightIn
// Storage: Council Proposals (r:1 w:0)
// Storage: Council Members (r:0 w:1)
fn remove_member_with_replacement() -> Weight {
Weight::from_ref_time(57_184_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
Weight::from_ref_time(57_184_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: PhragmenElection Voting (r:5001 w:5000)
// Storage: PhragmenElection Members (r:1 w:0)
@@ -150,12 +150,12 @@ impl<T: frame_system::Config> pallet_elections_phragmen::WeightInfo for WeightIn
/// The range of component `v` is `[5000, 10000]`.
/// The range of component `d` is `[1, 5000]`.
fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 85_000
.saturating_add(Weight::from_ref_time(61_507_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((3 as RefTimeWeight).saturating_mul(v as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((3 as RefTimeWeight).saturating_mul(v as RefTimeWeight)))
.saturating_add(Weight::from_ref_time(61_507_000 as u64).saturating_mul(v as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(v as u64)))
.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64)))
}
// Storage: PhragmenElection Candidates (r:1 w:1)
// Storage: PhragmenElection Members (r:1 w:1)
@@ -170,14 +170,14 @@ impl<T: frame_system::Config> pallet_elections_phragmen::WeightInfo for WeightIn
/// The range of component `v` is `[1, 10000]`.
/// The range of component `e` is `[10000, 160000]`.
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
Weight::from_ref_time(0 as RefTimeWeight)
Weight::from_ref_time(0 as u64)
// Standard Error: 1_864_000
.saturating_add(Weight::from_ref_time(167_385_000 as RefTimeWeight).saturating_mul(v as RefTimeWeight))
.saturating_add(Weight::from_ref_time(167_385_000 as u64).saturating_mul(v as u64))
// Standard Error: 124_000
.saturating_add(Weight::from_ref_time(9_721_000 as RefTimeWeight).saturating_mul(e as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(265 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(v as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes((1 as RefTimeWeight).saturating_mul(c as RefTimeWeight)))
.saturating_add(Weight::from_ref_time(9_721_000 as u64).saturating_mul(e as u64))
.saturating_add(T::DbWeight::get().reads(265 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64)))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64)))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64)))
}
}