Skip to content

Commit

Permalink
Companion of paritytech/substrate#12157 (#5964)
Browse files Browse the repository at this point in the history
* Remove RefTimeWeight

* Fixes

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
  • Loading branch information
KiChjang authored Sep 2, 2022
1 parent 6e5adab commit 4dd0f60
Show file tree
Hide file tree
Showing 86 changed files with 2,711 additions and 2,711 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
#![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 `runtime_parachains::disputes`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> runtime_parachains::disputes::WeightInfo for WeightInfo<T> {
// Storage: ParasDisputes Frozen (r:0 w:1)
fn force_unfreeze() -> Weight {
Weight::from_ref_time(3_239_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(3_239_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
}
44 changes: 22 additions & 22 deletions polkadot/runtime/westend/src/weights/pallet_balances.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,52 +38,52 @@
#![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_balances`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
// Storage: System Account (r:1 w:1)
fn transfer() -> Weight {
Weight::from_ref_time(38_789_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(38_789_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: System Account (r:1 w:1)
fn transfer_keep_alive() -> Weight {
Weight::from_ref_time(29_986_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(29_986_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: System Account (r:1 w:1)
fn set_balance_creating() -> Weight {
Weight::from_ref_time(20_160_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(20_160_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: System Account (r:1 w:1)
fn set_balance_killing() -> Weight {
Weight::from_ref_time(23_146_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(23_146_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: System Account (r:2 w:2)
fn force_transfer() -> Weight {
Weight::from_ref_time(39_066_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(39_066_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: System Account (r:1 w:1)
fn transfer_all() -> Weight {
Weight::from_ref_time(34_523_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(34_523_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: System Account (r:1 w:1)
fn force_unreserve() -> Weight {
Weight::from_ref_time(18_078_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(18_078_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
}
100 changes: 50 additions & 50 deletions polkadot/runtime/westend/src/weights/pallet_nomination_pools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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_nomination_pools`.
Expand All @@ -58,9 +58,9 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: VoterList ListNodes (r:3 w:3)
// Storage: VoterList ListBags (r:2 w:2)
fn join() -> Weight {
Weight::from_ref_time(127_461_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(17 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(12 as RefTimeWeight))
Weight::from_ref_time(127_461_000 as u64)
.saturating_add(T::DbWeight::get().reads(17 as u64))
.saturating_add(T::DbWeight::get().writes(12 as u64))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
// Storage: NominationPools BondedPools (r:1 w:1)
Expand All @@ -72,9 +72,9 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: VoterList ListNodes (r:3 w:3)
// Storage: VoterList ListBags (r:2 w:2)
fn bond_extra_transfer() -> Weight {
Weight::from_ref_time(119_965_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(14 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(12 as RefTimeWeight))
Weight::from_ref_time(119_965_000 as u64)
.saturating_add(T::DbWeight::get().reads(14 as u64))
.saturating_add(T::DbWeight::get().writes(12 as u64))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
// Storage: NominationPools BondedPools (r:1 w:1)
Expand All @@ -86,18 +86,18 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: VoterList ListNodes (r:2 w:2)
// Storage: VoterList ListBags (r:2 w:2)
fn bond_extra_reward() -> Weight {
Weight::from_ref_time(126_924_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(13 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(12 as RefTimeWeight))
Weight::from_ref_time(126_924_000 as u64)
.saturating_add(T::DbWeight::get().reads(13 as u64))
.saturating_add(T::DbWeight::get().writes(12 as u64))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
// Storage: NominationPools BondedPools (r:1 w:1)
// Storage: NominationPools RewardPools (r:1 w:1)
// Storage: System Account (r:1 w:1)
fn claim_payout() -> Weight {
Weight::from_ref_time(48_168_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(48_168_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
// Storage: NominationPools BondedPools (r:1 w:1)
Expand All @@ -114,21 +114,21 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: NominationPools SubPoolsStorage (r:1 w:1)
// Storage: NominationPools CounterForSubPoolsStorage (r:1 w:1)
fn unbond() -> Weight {
Weight::from_ref_time(124_841_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(18 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(13 as RefTimeWeight))
Weight::from_ref_time(124_841_000 as u64)
.saturating_add(T::DbWeight::get().reads(18 as u64))
.saturating_add(T::DbWeight::get().writes(13 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:0)
// Storage: Staking Ledger (r:1 w:1)
// Storage: Staking CurrentEra (r:1 w:0)
// Storage: Balances Locks (r:1 w:1)
/// The range of component `s` is `[0, 100]`.
fn pool_withdraw_unbonded(s: u32, ) -> Weight {
Weight::from_ref_time(41_129_000 as RefTimeWeight)
Weight::from_ref_time(41_129_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(33_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(4 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(33_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
// Storage: Staking CurrentEra (r:1 w:0)
Expand All @@ -140,11 +140,11 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: NominationPools CounterForPoolMembers (r:1 w:1)
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_update(s: u32, ) -> Weight {
Weight::from_ref_time(78_870_000 as RefTimeWeight)
Weight::from_ref_time(78_870_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(49_000 as RefTimeWeight).saturating_mul(s as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(8 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(7 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(49_000 as u64).saturating_mul(s as u64))
.saturating_add(T::DbWeight::get().reads(8 as u64))
.saturating_add(T::DbWeight::get().writes(7 as u64))
}
// Storage: NominationPools PoolMembers (r:1 w:1)
// Storage: Staking CurrentEra (r:1 w:0)
Expand All @@ -167,9 +167,9 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: Staking Payee (r:0 w:1)
/// The range of component `s` is `[0, 100]`.
fn withdraw_unbonded_kill(_s: u32, ) -> Weight {
Weight::from_ref_time(137_414_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(19 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(16 as RefTimeWeight))
Weight::from_ref_time(137_414_000 as u64)
.saturating_add(T::DbWeight::get().reads(19 as u64))
.saturating_add(T::DbWeight::get().writes(16 as u64))
}
// Storage: Staking MinNominatorBond (r:1 w:0)
// Storage: NominationPools MinCreateBond (r:1 w:0)
Expand All @@ -194,9 +194,9 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: NominationPools BondedPools (r:1 w:1)
// Storage: Staking Payee (r:0 w:1)
fn create() -> Weight {
Weight::from_ref_time(131_154_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(22 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(15 as RefTimeWeight))
Weight::from_ref_time(131_154_000 as u64)
.saturating_add(T::DbWeight::get().reads(22 as u64))
.saturating_add(T::DbWeight::get().writes(15 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:0)
// Storage: Staking Ledger (r:1 w:0)
Expand All @@ -212,45 +212,45 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: Staking CounterForNominators (r:1 w:1)
/// The range of component `n` is `[1, 16]`.
fn nominate(n: u32, ) -> Weight {
Weight::from_ref_time(50_310_000 as RefTimeWeight)
Weight::from_ref_time(50_310_000 as u64)
// Standard Error: 4_000
.saturating_add(Weight::from_ref_time(2_137_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(12 as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads((1 as RefTimeWeight).saturating_mul(n as RefTimeWeight)))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(2_137_000 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(12 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(n as u64)))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:1)
// Storage: Staking Ledger (r:1 w:0)
fn set_state() -> Weight {
Weight::from_ref_time(25_062_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(2 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(25_062_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:0)
// Storage: NominationPools Metadata (r:1 w:1)
// Storage: NominationPools CounterForMetadata (r:1 w:1)
/// The range of component `n` is `[1, 256]`.
fn set_metadata(n: u32, ) -> Weight {
Weight::from_ref_time(13_890_000 as RefTimeWeight)
Weight::from_ref_time(13_890_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as RefTimeWeight).saturating_mul(n as RefTimeWeight))
.saturating_add(T::DbWeight::get().reads(3 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(n as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: NominationPools MinJoinBond (r:0 w:1)
// Storage: NominationPools MaxPoolMembers (r:0 w:1)
// Storage: NominationPools MaxPoolMembersPerPool (r:0 w:1)
// Storage: NominationPools MinCreateBond (r:0 w:1)
// Storage: NominationPools MaxPools (r:0 w:1)
fn set_configs() -> Weight {
Weight::from_ref_time(6_811_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
Weight::from_ref_time(6_811_000 as u64)
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:1)
fn update_roles() -> Weight {
Weight::from_ref_time(21_056_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(21_056_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: NominationPools BondedPools (r:1 w:0)
// Storage: Staking Ledger (r:1 w:0)
Expand All @@ -261,8 +261,8 @@ impl<T: frame_system::Config> pallet_nomination_pools::WeightInfo for WeightInfo
// Storage: VoterList ListBags (r:1 w:1)
// Storage: VoterList CounterForListNodes (r:1 w:1)
fn chill() -> Weight {
Weight::from_ref_time(48_506_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(8 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(5 as RefTimeWeight))
Weight::from_ref_time(48_506_000 as u64)
.saturating_add(T::DbWeight::get().reads(8 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
}
Loading

0 comments on commit 4dd0f60

Please sign in to comment.