Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add benchmarks for XCM pallet version migration #6448

Merged
merged 15 commits into from
Dec 17, 2022
Merged
113 changes: 85 additions & 28 deletions runtime/kusama/src/weights/pallet_xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! Autogenerated weights for `pallet_xcm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-11-08, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-12-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024

Expand Down Expand Up @@ -49,63 +49,120 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Storage: XcmPallet SupportedVersion (r:1 w:0)
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
fn send() -> Weight {
// Minimum execution time: 32_807 nanoseconds.
Weight::from_ref_time(33_383_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
// Minimum execution time: 36_474 nanoseconds.
Weight::from_ref_time(37_030_000)
.saturating_add(T::DbWeight::get().reads(5))
.saturating_add(T::DbWeight::get().writes(3))
}
fn teleport_assets() -> Weight {
// Minimum execution time: 28_036 nanoseconds.
Weight::from_ref_time(28_386_000 as u64)
// Minimum execution time: 28_147 nanoseconds.
Weight::from_ref_time(28_836_000)
}
fn reserve_transfer_assets() -> Weight {
// Minimum execution time: 26_239 nanoseconds.
Weight::from_ref_time(27_146_000 as u64)
// Minimum execution time: 28_469 nanoseconds.
Weight::from_ref_time(29_002_000)
}
fn execute() -> Weight {
// Minimum execution time: 14_327 nanoseconds.
Weight::from_ref_time(14_693_000 as u64)
// Minimum execution time: 15_637 nanoseconds.
Weight::from_ref_time(15_880_000)
}
// Storage: XcmPallet SupportedVersion (r:0 w:1)
fn force_xcm_version() -> Weight {
// Minimum execution time: 13_854 nanoseconds.
Weight::from_ref_time(14_658_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
// Minimum execution time: 15_330 nanoseconds.
Weight::from_ref_time(15_817_000)
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: XcmPallet SafeXcmVersion (r:0 w:1)
fn force_default_xcm_version() -> Weight {
// Minimum execution time: 3_786 nanoseconds.
Weight::from_ref_time(3_986_000 as u64)
.saturating_add(T::DbWeight::get().writes(1 as u64))
// Minimum execution time: 4_104 nanoseconds.
Weight::from_ref_time(4_365_000)
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: XcmPallet VersionNotifiers (r:1 w:1)
// Storage: XcmPallet QueryCounter (r:1 w:1)
// Storage: XcmPallet SupportedVersion (r:1 w:0)
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: XcmPallet Queries (r:0 w:1)
fn force_subscribe_version_notify() -> Weight {
// Minimum execution time: 37_959 nanoseconds.
Weight::from_ref_time(38_689_000 as u64)
.saturating_add(T::DbWeight::get().reads(7 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
// Minimum execution time: 42_177 nanoseconds.
Weight::from_ref_time(42_657_000)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(6))
}
// Storage: XcmPallet VersionNotifiers (r:1 w:1)
// Storage: XcmPallet SupportedVersion (r:1 w:0)
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: XcmPallet Queries (r:0 w:1)
fn force_unsubscribe_version_notify() -> Weight {
// Minimum execution time: 41_213 nanoseconds.
Weight::from_ref_time(41_668_000 as u64)
.saturating_add(T::DbWeight::get().reads(6 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
// Minimum execution time: 45_481 nanoseconds.
Weight::from_ref_time(45_960_000)
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: XcmPallet SupportedVersion (r:4 w:2)
fn migrate_supported_version() -> Weight {
// Minimum execution time: 14_899 nanoseconds.
Weight::from_ref_time(15_452_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: XcmPallet VersionNotifiers (r:4 w:2)
fn migrate_version_notifiers() -> Weight {
// Minimum execution time: 14_759 nanoseconds.
Weight::from_ref_time(15_176_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: XcmPallet VersionNotifyTargets (r:5 w:0)
fn already_notified_target() -> Weight {
// Minimum execution time: 17_022 nanoseconds.
Weight::from_ref_time(17_468_000)
.saturating_add(T::DbWeight::get().reads(5))
}
// Storage: XcmPallet VersionNotifyTargets (r:2 w:1)
// Storage: XcmPallet SupportedVersion (r:1 w:0)
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
fn notify_current_targets() -> Weight {
// Minimum execution time: 37_810 nanoseconds.
Weight::from_ref_time(38_198_000)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: XcmPallet VersionNotifyTargets (r:3 w:0)
fn notify_target_migration_fail() -> Weight {
// Minimum execution time: 7_440 nanoseconds.
Weight::from_ref_time(7_659_000)
.saturating_add(T::DbWeight::get().reads(3))
}
// Storage: XcmPallet VersionNotifyTargets (r:4 w:2)
fn migrate_version_notify_targets() -> Weight {
// Minimum execution time: 14_975 nanoseconds.
Weight::from_ref_time(15_479_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: XcmPallet VersionNotifyTargets (r:4 w:2)
// Storage: XcmPallet SupportedVersion (r:1 w:0)
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
fn migrate_and_notify_old_targets() -> Weight {
// Minimum execution time: 43_328 nanoseconds.
Weight::from_ref_time(44_054_000)
.saturating_add(T::DbWeight::get().reads(9))
.saturating_add(T::DbWeight::get().writes(5))
}
}
95 changes: 77 additions & 18 deletions runtime/polkadot/src/weights/pallet_xcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//! Autogenerated weights for `pallet_xcm`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-12-06, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2022-12-16, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("polkadot-dev"), DB CACHE: 1024

Expand Down Expand Up @@ -50,21 +50,21 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Storage: XcmPallet SupportedVersion (r:1 w:0)
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
fn send() -> Weight {
// Minimum execution time: 33_342 nanoseconds.
Weight::from_ref_time(34_378_000)
// Minimum execution time: 35_717 nanoseconds.
Weight::from_ref_time(36_278_000)
.saturating_add(T::DbWeight::get().reads(6))
.saturating_add(T::DbWeight::get().writes(3))
}
fn teleport_assets() -> Weight {
// Minimum execution time: 29_082 nanoseconds.
Weight::from_ref_time(29_445_000)
// Minimum execution time: 28_865 nanoseconds.
Weight::from_ref_time(29_336_000)
}
fn reserve_transfer_assets() -> Weight {
// Minimum execution time: 27_698 nanoseconds.
Weight::from_ref_time(28_811_000)
// Minimum execution time: 27_531 nanoseconds.
Weight::from_ref_time(28_248_000)
}
// Storage: Benchmark Override (r:0 w:0)
fn execute() -> Weight {
Expand All @@ -73,14 +73,14 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
}
// Storage: XcmPallet SupportedVersion (r:0 w:1)
fn force_xcm_version() -> Weight {
// Minimum execution time: 14_670 nanoseconds.
Weight::from_ref_time(15_073_000)
// Minimum execution time: 15_205 nanoseconds.
Weight::from_ref_time(15_526_000)
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: XcmPallet SafeXcmVersion (r:0 w:1)
fn force_default_xcm_version() -> Weight {
// Minimum execution time: 4_072 nanoseconds.
Weight::from_ref_time(4_258_000)
// Minimum execution time: 4_336 nanoseconds.
Weight::from_ref_time(4_518_000)
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: XcmPallet VersionNotifiers (r:1 w:1)
Expand All @@ -89,12 +89,12 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Storage: XcmPallet SupportedVersion (r:1 w:0)
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: XcmPallet Queries (r:0 w:1)
fn force_subscribe_version_notify() -> Weight {
// Minimum execution time: 38_016 nanoseconds.
Weight::from_ref_time(39_062_000)
// Minimum execution time: 41_446 nanoseconds.
Weight::from_ref_time(42_152_000)
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(6))
}
Expand All @@ -103,13 +103,72 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
// Storage: XcmPallet SupportedVersion (r:1 w:0)
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
// Storage: XcmPallet Queries (r:0 w:1)
fn force_unsubscribe_version_notify() -> Weight {
// Minimum execution time: 44_887 nanoseconds.
Weight::from_ref_time(45_471_000)
// Minimum execution time: 44_944 nanoseconds.
Weight::from_ref_time(45_519_000)
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
}
// Storage: XcmPallet SupportedVersion (r:4 w:2)
fn migrate_supported_version() -> Weight {
// Minimum execution time: 15_254 nanoseconds.
Weight::from_ref_time(15_491_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: XcmPallet VersionNotifiers (r:4 w:2)
fn migrate_version_notifiers() -> Weight {
// Minimum execution time: 15_083 nanoseconds.
Weight::from_ref_time(15_298_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: XcmPallet VersionNotifyTargets (r:5 w:0)
fn already_notified_target() -> Weight {
// Minimum execution time: 17_889 nanoseconds.
Weight::from_ref_time(18_144_000)
.saturating_add(T::DbWeight::get().reads(5))
}
// Storage: XcmPallet VersionNotifyTargets (r:2 w:1)
// Storage: Configuration ActiveConfig (r:1 w:0)
// Storage: XcmPallet SupportedVersion (r:1 w:0)
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
fn notify_current_targets() -> Weight {
// Minimum execution time: 37_255 nanoseconds.
Weight::from_ref_time(37_893_000)
.saturating_add(T::DbWeight::get().reads(8))
.saturating_add(T::DbWeight::get().writes(4))
}
// Storage: XcmPallet VersionNotifyTargets (r:3 w:0)
fn notify_target_migration_fail() -> Weight {
// Minimum execution time: 7_884 nanoseconds.
Weight::from_ref_time(8_111_000)
.saturating_add(T::DbWeight::get().reads(3))
}
// Storage: XcmPallet VersionNotifyTargets (r:4 w:2)
fn migrate_version_notify_targets() -> Weight {
// Minimum execution time: 15_853 nanoseconds.
Weight::from_ref_time(16_220_000)
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
}
// Storage: XcmPallet VersionNotifyTargets (r:4 w:2)
// Storage: Configuration ActiveConfig (r:1 w:0)
// Storage: XcmPallet SupportedVersion (r:1 w:0)
// Storage: XcmPallet VersionDiscoveryQueue (r:1 w:1)
// Storage: XcmPallet SafeXcmVersion (r:1 w:0)
// Storage: Dmp DownwardMessageQueues (r:1 w:1)
// Storage: Dmp DownwardMessageQueueHeads (r:1 w:1)
fn migrate_and_notify_old_targets() -> Weight {
// Minimum execution time: 43_836 nanoseconds.
Weight::from_ref_time(44_836_000)
.saturating_add(T::DbWeight::get().reads(10))
.saturating_add(T::DbWeight::get().writes(5))
}
}
Loading