Skip to content

Commit

Permalink
feat: update weights from benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshvarma committed Jan 13, 2024
1 parent d258dd8 commit ec7587f
Show file tree
Hide file tree
Showing 2 changed files with 351 additions and 357 deletions.
232 changes: 102 additions & 130 deletions runtime/shibuya/src/weights/xcm/fungible.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//! Autogenerated weights for xcm_benchmarks_fungible
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-01-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-01-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `gh-runner-01-ovh`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("shibuya-dev"), DB CACHE: 1024
Expand Down Expand Up @@ -48,38 +48,19 @@ use core::marker::PhantomData;

/// Weight functions needed for xcm_benchmarks_fungible.
pub trait WeightInfo {
fn withdraw_asset() -> Weight;
fn transfer_asset() -> Weight;
fn transfer_reserve_asset() -> Weight;
fn reserve_asset_deposited() -> Weight;
fn receive_teleported_asset() -> Weight;
fn initiate_teleport() -> Weight;
fn withdraw_asset() -> Weight;
fn deposit_asset() -> Weight;
fn deposit_reserve_asset() -> Weight;
fn initiate_teleport() -> Weight;
fn reserve_asset_deposited() -> Weight;
}

/// Weights for xcm_benchmarks_fungible using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Storage: XcAssetConfig AssetLocationToId (r:1 w:0)
/// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
/// Storage: Assets Asset (r:1 w:1)
/// Proof: Assets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen)
/// Storage: Assets Account (r:1 w:1)
/// Proof: Assets Account (max_values: None, max_size: Some(146), added: 2621, mode: MaxEncodedLen)
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: UnifiedAccounts NativeToEvm (r:1 w:0)
/// Proof: UnifiedAccounts NativeToEvm (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
fn withdraw_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `688`
// Estimated: `4153`
// Minimum execution time: 48_708_000 picoseconds.
Weight::from_parts(49_394_000, 4153)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: XcAssetConfig AssetLocationToId (r:1 w:0)
/// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
/// Storage: Assets Asset (r:1 w:1)
Expand All @@ -90,10 +71,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn transfer_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `544`
// Measured: `545`
// Estimated: `6232`
// Minimum execution time: 49_225_000 picoseconds.
Weight::from_parts(49_700_000, 6232)
// Minimum execution time: 49_562_000 picoseconds.
Weight::from_parts(50_040_000, 6232)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
Expand All @@ -119,13 +100,20 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
fn transfer_reserve_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `720`
// Measured: `721`
// Estimated: `6232`
// Minimum execution time: 72_392_000 picoseconds.
Weight::from_parts(73_104_000, 6232)
// Minimum execution time: 72_571_000 picoseconds.
Weight::from_parts(73_202_000, 6232)
.saturating_add(T::DbWeight::get().reads(11_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
}
fn reserve_asset_deposited() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_430_000 picoseconds.
Weight::from_parts(3_566_000, 0)
}
/// Storage: Benchmark Override (r:0 w:0)
/// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured)
fn receive_teleported_asset() -> Weight {
Expand All @@ -135,6 +123,34 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
}
/// Storage: Benchmark Override (r:0 w:0)
/// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured)
fn initiate_teleport() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
}
/// Storage: XcAssetConfig AssetLocationToId (r:1 w:0)
/// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
/// Storage: Assets Asset (r:1 w:1)
/// Proof: Assets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen)
/// Storage: Assets Account (r:1 w:1)
/// Proof: Assets Account (max_values: None, max_size: Some(146), added: 2621, mode: MaxEncodedLen)
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: UnifiedAccounts NativeToEvm (r:1 w:0)
/// Proof: UnifiedAccounts NativeToEvm (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
fn withdraw_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `1960`
// Estimated: `5425`
// Minimum execution time: 57_091_000 picoseconds.
Weight::from_parts(57_836_000, 5425)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
/// Storage: XcAssetConfig AssetLocationToId (r:1 w:0)
/// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
/// Storage: Assets Asset (r:1 w:1)
Expand All @@ -145,10 +161,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn deposit_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `424`
// Estimated: `3889`
// Minimum execution time: 37_873_000 picoseconds.
Weight::from_parts(38_273_000, 3889)
// Measured: `1696`
// Estimated: `5161`
// Minimum execution time: 45_650_000 picoseconds.
Weight::from_parts(46_029_000, 5161)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
Expand All @@ -174,66 +190,17 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
fn deposit_reserve_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `600`
// Estimated: `4065`
// Minimum execution time: 62_630_000 picoseconds.
Weight::from_parts(63_475_000, 4065)
// Measured: `1872`
// Estimated: `5337`
// Minimum execution time: 71_400_000 picoseconds.
Weight::from_parts(72_038_000, 5337)
.saturating_add(T::DbWeight::get().reads(10_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: XcAssetConfig AssetLocationToId (r:1 w:0)
/// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
/// Storage: ParachainInfo ParachainId (r:1 w:0)
/// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
/// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
/// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
/// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
/// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
/// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: ParachainSystem HostConfiguration (r:1 w:0)
/// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
fn initiate_teleport() -> Weight {
// Proof Size summary in bytes:
// Measured: `308`
// Estimated: `3773`
// Minimum execution time: 39_637_000 picoseconds.
Weight::from_parts(40_123_000, 3773)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
fn reserve_asset_deposited() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_440_000 picoseconds.
Weight::from_parts(3_603_000, 0)
}
}

// For backwards compatibility and tests
impl WeightInfo for () {
/// Storage: XcAssetConfig AssetLocationToId (r:1 w:0)
/// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
/// Storage: Assets Asset (r:1 w:1)
/// Proof: Assets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen)
/// Storage: Assets Account (r:1 w:1)
/// Proof: Assets Account (max_values: None, max_size: Some(146), added: 2621, mode: MaxEncodedLen)
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: UnifiedAccounts NativeToEvm (r:1 w:0)
/// Proof: UnifiedAccounts NativeToEvm (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
fn withdraw_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `688`
// Estimated: `4153`
// Minimum execution time: 48_708_000 picoseconds.
Weight::from_parts(49_394_000, 4153)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
/// Storage: XcAssetConfig AssetLocationToId (r:1 w:0)
/// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
/// Storage: Assets Asset (r:1 w:1)
Expand All @@ -244,10 +211,10 @@ impl WeightInfo for () {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn transfer_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `544`
// Measured: `545`
// Estimated: `6232`
// Minimum execution time: 49_225_000 picoseconds.
Weight::from_parts(49_700_000, 6232)
// Minimum execution time: 49_562_000 picoseconds.
Weight::from_parts(50_040_000, 6232)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
Expand All @@ -273,13 +240,20 @@ impl WeightInfo for () {
/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
fn transfer_reserve_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `720`
// Measured: `721`
// Estimated: `6232`
// Minimum execution time: 72_392_000 picoseconds.
Weight::from_parts(73_104_000, 6232)
// Minimum execution time: 72_571_000 picoseconds.
Weight::from_parts(73_202_000, 6232)
.saturating_add(RocksDbWeight::get().reads(11_u64))
.saturating_add(RocksDbWeight::get().writes(6_u64))
}
fn reserve_asset_deposited() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_430_000 picoseconds.
Weight::from_parts(3_566_000, 0)
}
/// Storage: Benchmark Override (r:0 w:0)
/// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured)
fn receive_teleported_asset() -> Weight {
Expand All @@ -289,6 +263,34 @@ impl WeightInfo for () {
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
}
/// Storage: Benchmark Override (r:0 w:0)
/// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured)
fn initiate_teleport() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
}
/// Storage: XcAssetConfig AssetLocationToId (r:1 w:0)
/// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
/// Storage: Assets Asset (r:1 w:1)
/// Proof: Assets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen)
/// Storage: Assets Account (r:1 w:1)
/// Proof: Assets Account (max_values: None, max_size: Some(146), added: 2621, mode: MaxEncodedLen)
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: UnifiedAccounts NativeToEvm (r:1 w:0)
/// Proof: UnifiedAccounts NativeToEvm (max_values: None, max_size: Some(68), added: 2543, mode: MaxEncodedLen)
fn withdraw_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `1960`
// Estimated: `5425`
// Minimum execution time: 57_091_000 picoseconds.
Weight::from_parts(57_836_000, 5425)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
/// Storage: XcAssetConfig AssetLocationToId (r:1 w:0)
/// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
/// Storage: Assets Asset (r:1 w:1)
Expand All @@ -299,10 +301,10 @@ impl WeightInfo for () {
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
fn deposit_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `424`
// Estimated: `3889`
// Minimum execution time: 37_873_000 picoseconds.
Weight::from_parts(38_273_000, 3889)
// Measured: `1696`
// Estimated: `5161`
// Minimum execution time: 45_650_000 picoseconds.
Weight::from_parts(46_029_000, 5161)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(3_u64))
}
Expand All @@ -328,41 +330,11 @@ impl WeightInfo for () {
/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
fn deposit_reserve_asset() -> Weight {
// Proof Size summary in bytes:
// Measured: `600`
// Estimated: `4065`
// Minimum execution time: 62_630_000 picoseconds.
Weight::from_parts(63_475_000, 4065)
// Measured: `1872`
// Estimated: `5337`
// Minimum execution time: 71_400_000 picoseconds.
Weight::from_parts(72_038_000, 5337)
.saturating_add(RocksDbWeight::get().reads(10_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
/// Storage: XcAssetConfig AssetLocationToId (r:1 w:0)
/// Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
/// Storage: ParachainInfo ParachainId (r:1 w:0)
/// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
/// Storage: PolkadotXcm SupportedVersion (r:1 w:0)
/// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
/// Storage: PolkadotXcm VersionDiscoveryQueue (r:1 w:1)
/// Proof Skipped: PolkadotXcm VersionDiscoveryQueue (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: PolkadotXcm SafeXcmVersion (r:1 w:0)
/// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: ParachainSystem HostConfiguration (r:1 w:0)
/// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
fn initiate_teleport() -> Weight {
// Proof Size summary in bytes:
// Measured: `308`
// Estimated: `3773`
// Minimum execution time: 39_637_000 picoseconds.
Weight::from_parts(40_123_000, 3773)
.saturating_add(RocksDbWeight::get().reads(7_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
fn reserve_asset_deposited() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 3_440_000 picoseconds.
Weight::from_parts(3_603_000, 0)
}
}
Loading

0 comments on commit ec7587f

Please sign in to comment.