Companion for paritytech/substrate#12157 (#1590)

* Remove RefTimeWeight

* [ci] Apply cargo-fmt

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

Co-authored-by: paritytech-ci <paritytech-ci@parity.io>
Co-authored-by: parity-processbot <>
This commit is contained in:
Keith Yeung
2022-09-03 03:36:55 +08:00
committed by GitHub
parent d94cb49e1c
commit 4a7a2a85b2
53 changed files with 1770 additions and 1814 deletions
@@ -43,7 +43,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;
/// Weights for `pallet_xcm_benchmarks::fungible`.
@@ -51,15 +51,15 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo<T> {
// Storage: System Account (r:1 w:1)
pub(crate) fn withdraw_asset() -> Weight {
Weight::from_ref_time(34_002_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_002_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)
pub(crate) fn transfer_asset() -> Weight {
Weight::from_ref_time(38_285_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(38_285_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:2 w:2)
// Storage: ParachainInfo ParachainId (r:1 w:0)
@@ -69,18 +69,18 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn transfer_reserve_asset() -> Weight {
Weight::from_ref_time(55_068_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(8 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(4 as RefTimeWeight))
Weight::from_ref_time(55_068_000 as u64)
.saturating_add(T::DbWeight::get().reads(8 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
pub(crate) fn receive_teleported_asset() -> Weight {
Weight::from_ref_time(7_796_000 as RefTimeWeight)
Weight::from_ref_time(7_796_000 as u64)
}
// Storage: System Account (r:1 w:1)
pub(crate) fn deposit_asset() -> Weight {
Weight::from_ref_time(35_092_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(35_092_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)
// Storage: ParachainInfo ParachainId (r:1 w:0)
@@ -90,9 +90,9 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn deposit_reserve_asset() -> Weight {
Weight::from_ref_time(50_590_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(7 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
Weight::from_ref_time(50_590_000 as u64)
.saturating_add(T::DbWeight::get().reads(7 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
@@ -101,8 +101,8 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn initiate_teleport() -> Weight {
Weight::from_ref_time(27_220_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(27_220_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
}
@@ -43,7 +43,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;
/// Weights for `pallet_xcm_benchmarks::generic`.
@@ -56,38 +56,38 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn query_holding() -> Weight {
Weight::from_ref_time(682_639_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(682_639_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
pub(crate) fn buy_execution() -> Weight {
Weight::from_ref_time(9_272_000 as RefTimeWeight)
Weight::from_ref_time(9_272_000 as u64)
}
// Storage: PolkadotXcm Queries (r:1 w:0)
pub(crate) fn query_response() -> Weight {
Weight::from_ref_time(17_084_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(1 as RefTimeWeight))
Weight::from_ref_time(17_084_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
pub(crate) fn transact() -> Weight {
Weight::from_ref_time(20_265_000 as RefTimeWeight)
Weight::from_ref_time(20_265_000 as u64)
}
pub(crate) fn refund_surplus() -> Weight {
Weight::from_ref_time(9_422_000 as RefTimeWeight)
Weight::from_ref_time(9_422_000 as u64)
}
pub(crate) fn set_error_handler() -> Weight {
Weight::from_ref_time(5_545_000 as RefTimeWeight)
Weight::from_ref_time(5_545_000 as u64)
}
pub(crate) fn set_appendix() -> Weight {
Weight::from_ref_time(5_450_000 as RefTimeWeight)
Weight::from_ref_time(5_450_000 as u64)
}
pub(crate) fn clear_error() -> Weight {
Weight::from_ref_time(5_519_000 as RefTimeWeight)
Weight::from_ref_time(5_519_000 as u64)
}
pub(crate) fn descend_origin() -> Weight {
Weight::from_ref_time(6_398_000 as RefTimeWeight)
Weight::from_ref_time(6_398_000 as u64)
}
pub(crate) fn clear_origin() -> Weight {
Weight::from_ref_time(5_498_000 as RefTimeWeight)
Weight::from_ref_time(5_498_000 as u64)
}
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
@@ -95,18 +95,18 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn report_error() -> Weight {
Weight::from_ref_time(15_784_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(5 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(15_784_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: PolkadotXcm AssetTraps (r:1 w:1)
pub(crate) fn claim_asset() -> Weight {
Weight::from_ref_time(11_861_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(11_861_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
pub(crate) fn trap() -> Weight {
Weight::from_ref_time(5_462_000 as RefTimeWeight)
Weight::from_ref_time(5_462_000 as u64)
}
// Storage: PolkadotXcm VersionNotifyTargets (r:1 w:1)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
@@ -115,14 +115,14 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn subscribe_version() -> Weight {
Weight::from_ref_time(18_997_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(3 as RefTimeWeight))
Weight::from_ref_time(18_997_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: PolkadotXcm VersionNotifyTargets (r:0 w:1)
pub(crate) fn unsubscribe_version() -> Weight {
Weight::from_ref_time(8_684_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().writes(1 as RefTimeWeight))
Weight::from_ref_time(8_684_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: ParachainInfo ParachainId (r:1 w:0)
// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
@@ -131,8 +131,8 @@ impl<T: frame_system::Config> WeightInfo<T> {
// Storage: ParachainSystem HostConfiguration (r:1 w:0)
// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
pub(crate) fn initiate_reserve_withdraw() -> Weight {
Weight::from_ref_time(883_121_000 as RefTimeWeight)
.saturating_add(T::DbWeight::get().reads(6 as RefTimeWeight))
.saturating_add(T::DbWeight::get().writes(2 as RefTimeWeight))
Weight::from_ref_time(883_121_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
}