Companion for Weight v1.5 (#1581)

* cargo test -p cumulus-primitives-utility

* cargo test -p cumulus-pallet-xcmp-queue

* cargo test -p cumulus-pallet-xcm

* cargo test -p cumulus-pallet-dmp-queue

* cargo test -p pallet-template

* cargo test -p cumulus-test-runtime

* fix weights

* fix more weights

* cargo test -p parachains-common

* cargo test -p parachain-template-runtime

* fix weights import

* cargo test -p collectives-polkadot-runtime

* cargo test -p contracts-rococo-runtime

* more

* unused

* fixes

* Update benchmarking.rs

* Update lib.rs

* Update lib.rs

* fix

* fix bug in conversion

* update lockfile for {"polkadot", "substrate"}

Co-authored-by: parity-processbot <>
This commit is contained in:
Shawn Tabrizi
2022-08-31 13:24:42 +01:00
committed by GitHub
parent 1ab196df49
commit 3fb9c8a7be
118 changed files with 2005 additions and 1885 deletions
@@ -40,7 +40,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_alliance`.
@@ -56,24 +56,24 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// The range of component `y` is `[0, 90]`.
/// The range of component `p` is `[1, 100]`.
fn propose_proposed(_b: u32, _x: u32, _y: u32, p: u32, ) -> Weight {
(53_023_000 as Weight)
Weight::from_ref_time(53_023_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((132_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(Weight::from_ref_time(132_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Alliance Members (r:2 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
/// The range of component `x` is `[3, 10]`.
/// The range of component `y` is `[2, 90]`.
fn vote(x: u32, y: u32, ) -> Weight {
(33_003_000 as Weight)
Weight::from_ref_time(33_003_000 as RefTimeWeight)
// Standard Error: 106_000
.saturating_add((312_000 as Weight).saturating_mul(x as Weight))
.saturating_add(Weight::from_ref_time(312_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight))
// Standard Error: 4_000
.saturating_add((82_000 as Weight).saturating_mul(y 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(82_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
@@ -81,11 +81,11 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
// Storage: AllianceMotion Voting (r:0 w:1)
/// The range of component `p` is `[1, 100]`.
fn veto(p: u32, ) -> Weight {
(27_289_000 as Weight)
Weight::from_ref_time(27_289_000 as RefTimeWeight)
// Standard Error: 1_000
.saturating_add((131_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(131_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
@@ -96,15 +96,15 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// The range of component `y` is `[2, 90]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_disapproved(x: u32, y: u32, p: u32, ) -> Weight {
(31_884_000 as Weight)
Weight::from_ref_time(31_884_000 as RefTimeWeight)
// Standard Error: 72_000
.saturating_add((358_000 as Weight).saturating_mul(x as Weight))
.saturating_add(Weight::from_ref_time(358_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight))
// Standard Error: 3_000
.saturating_add((109_000 as Weight).saturating_mul(y as Weight))
.saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((109_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(109_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
@@ -116,17 +116,17 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// The range of component `y` is `[2, 90]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_approved(b: u32, x: u32, y: u32, p: u32, ) -> Weight {
(43_205_000 as Weight)
Weight::from_ref_time(43_205_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
.saturating_add(Weight::from_ref_time(2_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
// Standard Error: 73_000
.saturating_add((123_000 as Weight).saturating_mul(x as Weight))
.saturating_add(Weight::from_ref_time(123_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((91_000 as Weight).saturating_mul(y as Weight))
.saturating_add(Weight::from_ref_time(91_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((114_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(114_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
@@ -139,15 +139,15 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// The range of component `y` is `[2, 90]`.
/// The range of component `p` is `[1, 100]`.
fn close_disapproved(x: u32, y: u32, p: u32, ) -> Weight {
(49_769_000 as Weight)
Weight::from_ref_time(49_769_000 as RefTimeWeight)
// Standard Error: 69_000
.saturating_add((352_000 as Weight).saturating_mul(x as Weight))
.saturating_add(Weight::from_ref_time(352_000 as RefTimeWeight).scalar_saturating_mul(x as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((81_000 as Weight).saturating_mul(y as Weight))
.saturating_add(Weight::from_ref_time(81_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((100_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(Weight::from_ref_time(100_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Alliance Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
@@ -160,15 +160,15 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// The range of component `y` is `[2, 90]`.
/// The range of component `p` is `[1, 100]`.
fn close_approved(b: u32, _x: u32, y: u32, p: u32, ) -> Weight {
(40_901_000 as Weight)
Weight::from_ref_time(40_901_000 as RefTimeWeight)
// Standard Error: 0
.saturating_add((3_000 as Weight).saturating_mul(b as Weight))
.saturating_add(Weight::from_ref_time(3_000 as RefTimeWeight).scalar_saturating_mul(b as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((79_000 as Weight).saturating_mul(y as Weight))
.saturating_add(Weight::from_ref_time(79_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((102_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
.saturating_add(Weight::from_ref_time(102_000 as RefTimeWeight).scalar_saturating_mul(p as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Alliance Members (r:3 w:3)
// Storage: AllianceMotion Members (r:1 w:1)
@@ -176,55 +176,55 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
/// The range of component `y` is `[0, 90]`.
/// The range of component `z` is `[0, 100]`.
fn init_members(_x: u32, y: u32, z: u32, ) -> Weight {
(39_647_000 as Weight)
Weight::from_ref_time(39_647_000 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((123_000 as Weight).saturating_mul(y as Weight))
.saturating_add(Weight::from_ref_time(123_000 as RefTimeWeight).scalar_saturating_mul(y as RefTimeWeight))
// Standard Error: 2_000
.saturating_add((116_000 as Weight).saturating_mul(z as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
.saturating_add(Weight::from_ref_time(116_000 as RefTimeWeight).scalar_saturating_mul(z as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Alliance Rule (r:0 w:1)
fn set_rule() -> Weight {
(14_689_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(14_689_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Alliance Announcements (r:1 w:1)
fn announce() -> Weight {
(15_988_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(15_988_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Alliance Announcements (r:1 w:1)
fn remove_announcement() -> Weight {
(16_823_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(16_823_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
// Storage: Alliance Members (r:4 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Alliance DepositOf (r:0 w:1)
fn join_alliance() -> Weight {
(46_340_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
Weight::from_ref_time(46_340_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
}
// Storage: Alliance Members (r:4 w:1)
// Storage: Alliance UnscrupulousAccounts (r:1 w:0)
fn nominate_ally() -> Weight {
(36_225_000 as Weight)
.saturating_add(T::DbWeight::get().reads(5 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Weight::from_ref_time(36_225_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
}
// Storage: Alliance Members (r:3 w:2)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn elevate_ally() -> Weight {
(30_236_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(30_236_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
}
// Storage: Alliance UpForKicking (r:1 w:0)
// Storage: Alliance Members (r:3 w:1)
@@ -234,9 +234,9 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
// Storage: AllianceMotion Members (r:0 w:1)
// Storage: AllianceMotion Prime (r:0 w:1)
fn retire() -> Weight {
(44_311_000 as Weight)
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(5 as Weight))
Weight::from_ref_time(44_311_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(7 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
}
// Storage: Alliance Members (r:3 w:1)
// Storage: AllianceMotion Proposals (r:1 w:0)
@@ -246,34 +246,34 @@ impl<T: frame_system::Config> pallet_alliance::WeightInfo for WeightInfo<T> {
// Storage: AllianceMotion Prime (r:0 w:1)
// Storage: Alliance UpForKicking (r:0 w:1)
fn kick_member() -> Weight {
(46_112_000 as Weight)
.saturating_add(T::DbWeight::get().reads(6 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
Weight::from_ref_time(46_112_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(6 as RefTimeWeight))
}
// Storage: Alliance UnscrupulousAccounts (r:1 w:1)
// Storage: Alliance UnscrupulousWebsites (r:1 w:1)
/// The range of component `n` is `[1, 100]`.
/// The range of component `l` is `[1, 255]`.
fn add_unscrupulous_items(n: u32, l: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 2_000
.saturating_add((1_300_000 as Weight).saturating_mul(n as Weight))
.saturating_add(Weight::from_ref_time(1_300_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
// Standard Error: 1_000
.saturating_add((125_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(125_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
// Storage: Alliance UnscrupulousAccounts (r:1 w:1)
// Storage: Alliance UnscrupulousWebsites (r:1 w:1)
/// The range of component `n` is `[1, 100]`.
/// The range of component `l` is `[1, 255]`.
fn remove_unscrupulous_items(n: u32, l: u32, ) -> Weight {
(0 as Weight)
Weight::from_ref_time(0 as RefTimeWeight)
// Standard Error: 197_000
.saturating_add((34_156_000 as Weight).saturating_mul(n as Weight))
.saturating_add(Weight::from_ref_time(34_156_000 as RefTimeWeight).scalar_saturating_mul(n as RefTimeWeight))
// Standard Error: 87_000
.saturating_add((7_042_000 as Weight).saturating_mul(l as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
.saturating_add(Weight::from_ref_time(7_042_000 as RefTimeWeight).scalar_saturating_mul(l as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
}
}