Companion for Weight v1.5 (#5943)

* fix to latest substrate pr

* update weights

* cargo build -p polkadot-runtime-parachains

* fix xcm-builder

* fix import

* fix a bunch

* fix a bunch of weight stuff

* kusama compile

* unused

* builds

* maybe fix

* cargo test -p polkadot-runtime-parachains

* xcm simulator example

* fix tests

* xcm sim fuzz

* fix runtime tests

* remove unused

* fix integration tests

* scalar div

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
This commit is contained in:
Shawn Tabrizi
2022-08-31 12:59:39 +01:00
committed by GitHub
parent 138aae0a22
commit 28e94d97dd
231 changed files with 4577 additions and 4514 deletions
@@ -38,7 +38,7 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::Weight};
use frame_support::{traits::Get, weights::{RefTimeWeight, 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 {
(24_107_000 as Weight)
Weight::from_ref_time(24_107_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((184_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))
.saturating_add(Weight::from_ref_time(184_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// 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 {
(36_869_000 as Weight)
Weight::from_ref_time(36_869_000 as RefTimeWeight)
// Standard Error: 5_000
.saturating_add((165_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))
.saturating_add(Weight::from_ref_time(165_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// 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 {
(36_445_000 as Weight)
Weight::from_ref_time(36_445_000 as RefTimeWeight)
// Standard Error: 4_000
.saturating_add((199_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))
.saturating_add(Weight::from_ref_time(199_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: PhragmenElection Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
fn remove_voter() -> Weight {
(33_035_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as 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))
}
// 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 {
(25_946_000 as Weight)
Weight::from_ref_time(25_946_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((101_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))
.saturating_add(Weight::from_ref_time(101_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: PhragmenElection Candidates (r:1 w:1)
/// The range of component `c` is `[1, 1000]`.
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
(22_945_000 as Weight)
Weight::from_ref_time(22_945_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((69_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))
.saturating_add(Weight::from_ref_time(69_000 as RefTimeWeight).scalar_saturating_mul(c as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// 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 {
(41_502_000 as Weight)
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as 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))
}
// Storage: PhragmenElection RunnersUp (r:1 w:1)
fn renounce_candidacy_runners_up() -> Weight {
(30_791_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as 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))
}
// Storage: Benchmark Override (r:0 w:0)
fn remove_member_without_replacement() -> Weight {
(2_000_000_000_000 as Weight)
Weight::from_ref_time(2_000_000_000_000 as RefTimeWeight)
}
// 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 {
(57_184_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as 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))
}
// 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 {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 85_000
.saturating_add((61_507_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)))
.saturating_add(Weight::from_ref_time(61_507_000 as RefTimeWeight).scalar_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)))
}
// 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 {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 1_864_000
.saturating_add((167_385_000 as Weight).saturating_mul(v as Weight))
.saturating_add(Weight::from_ref_time(167_385_000 as RefTimeWeight).scalar_saturating_mul(v as RefTimeWeight))
// Standard Error: 124_000
.saturating_add((9_721_000 as Weight).saturating_mul(e as Weight))
.saturating_add(T::DbWeight::get().reads(265 as Weight))
.saturating_add(T::DbWeight::get().reads((1 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)))
.saturating_add(Weight::from_ref_time(9_721_000 as RefTimeWeight).scalar_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)))
}
}