mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
Companion for sub/7040 (#1719)
* Companion for sub/7040 * Fix duplicate type. * Fix syntax * Sync with latest changes. * Add weight info. * Fix build * Fix some tests * Fix build again. * fix migration amounts. * new migration * Builds fine with dummy weights. * fix build * Add correct weight files. * Fix to latest version * remove unneeded upgrade. * Update to latest again. * "Update Substrate" Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -43,74 +43,74 @@ use sp_std::marker::PhantomData;
|
||||
/// Weight functions for pallet_elections_phragmen.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_elections_phragmen::WeightInfo for WeightInfo<T> {
|
||||
fn vote(v: u32, ) -> Weight {
|
||||
(86_473_000 as Weight)
|
||||
// Standard Error: 9_000
|
||||
.saturating_add((199_000 as Weight).saturating_mul(v as Weight))
|
||||
fn vote_equal(v: u32, ) -> Weight {
|
||||
(54_923_000 as Weight)
|
||||
.saturating_add((324_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn vote_update(v: u32, ) -> Weight {
|
||||
(53_531_000 as Weight)
|
||||
// Standard Error: 8_000
|
||||
.saturating_add((126_000 as Weight).saturating_mul(v as Weight))
|
||||
fn vote_more(v: u32, ) -> Weight {
|
||||
(83_389_000 as Weight)
|
||||
.saturating_add((341_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn vote_less(v: u32, ) -> Weight {
|
||||
(78_865_000 as Weight)
|
||||
.saturating_add((343_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn remove_voter() -> Weight {
|
||||
(69_725_000 as Weight)
|
||||
(72_370_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn report_defunct_voter_correct(c: u32, v: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 2_000
|
||||
.saturating_add((1_673_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 53_000
|
||||
.saturating_add((33_921_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(7 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(3 as Weight))
|
||||
}
|
||||
fn report_defunct_voter_incorrect(c: u32, v: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((1_696_000 as Weight).saturating_mul(c as Weight))
|
||||
// Standard Error: 12_000
|
||||
.saturating_add((33_906_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(6 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn submit_candidacy(c: u32, ) -> Weight {
|
||||
(70_603_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((276_000 as Weight).saturating_mul(c as Weight))
|
||||
(68_455_000 as Weight)
|
||||
.saturating_add((370_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
|
||||
(42_985_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((140_000 as Weight).saturating_mul(c as Weight))
|
||||
(54_009_000 as Weight)
|
||||
.saturating_add((200_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn renounce_candidacy_members() -> Weight {
|
||||
(76_320_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(3 as Weight))
|
||||
(84_797_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(4 as Weight))
|
||||
}
|
||||
fn renounce_candidacy_runners_up() -> Weight {
|
||||
(46_198_000 as Weight)
|
||||
(59_095_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn remove_member_with_replacement() -> Weight {
|
||||
(115_357_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
(132_820_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(5 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(5 as Weight))
|
||||
}
|
||||
fn remove_member_wrong_refund() -> Weight {
|
||||
(8_869_000 as Weight)
|
||||
(8_551_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
}
|
||||
fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
.saturating_add((151_754_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads(4 as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(v as Weight)))
|
||||
}
|
||||
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
|
||||
(0 as Weight)
|
||||
.saturating_add((134_602_000 as Weight).saturating_mul(c as Weight))
|
||||
.saturating_add((111_037_000 as Weight).saturating_mul(v as Weight))
|
||||
.saturating_add((7_150_000 as Weight).saturating_mul(e as Weight))
|
||||
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight)))
|
||||
.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(v as Weight)))
|
||||
.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight)))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user