Skip to content

Commit

Permalink
add benchmarks for runtime-3200 (#2948)
Browse files Browse the repository at this point in the history
* add benchmarks for runtime-3200

* Fix pallet_asset_manager.rs benchmarks

Remove unexpected parameter

* Fix pallet_asset_manager.rs

remove parameter in method body

* Fix pallet_asset_manager.rs

add missing parenthesis

* fix rust tests

* Adjust TARGET_FILL_AMOUNT

* refactor tests & remove flaky test

---------

Co-authored-by: Agusrodri <[email protected]>
Co-authored-by: Pablo Labarta <[email protected]>
  • Loading branch information
3 people authored Sep 16, 2024
1 parent dd3a4a4 commit c3f63cf
Show file tree
Hide file tree
Showing 38 changed files with 970 additions and 1,010 deletions.
16 changes: 8 additions & 8 deletions runtime/common/src/weights/cumulus_pallet_parachain_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
//! Autogenerated weights for `cumulus_pallet_parachain_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-08-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-09-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `MacBook-Pro-de-romarq.local`, CPU: `<UNKNOWN>`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024

// Executed Command:
// ./target/release/moonbeam
// ./target/production/moonbeam
// benchmark
// pallet
// --chain=moonbase-dev
Expand Down Expand Up @@ -55,16 +55,16 @@ impl<T: frame_system::Config> cumulus_pallet_parachain_system::WeightInfo for We
/// Storage: `ParachainSystem::ProcessedDownwardMessages` (r:0 w:1)
/// Proof: `ParachainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:0 w:1000)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(107993), added: 110468, mode: `MaxEncodedLen`)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
/// The range of component `n` is `[0, 1000]`.
fn enqueue_inbound_downward_messages(n: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `82`
// Estimated: `3517`
// Minimum execution time: 2_000_000 picoseconds.
Weight::from_parts(2_000_000, 3517)
// Standard Error: 914_274
.saturating_add(Weight::from_parts(213_425_397, 0).saturating_mul(n.into()))
// Minimum execution time: 2_185_000 picoseconds.
Weight::from_parts(2_274_000, 3517)
// Standard Error: 22_952
.saturating_add(Weight::from_parts(286_056_967, 0).saturating_mul(n.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
Expand Down
42 changes: 21 additions & 21 deletions runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2022 PureStake Inc.
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
Expand All @@ -17,7 +17,7 @@
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-09-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
Expand Down Expand Up @@ -52,8 +52,8 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `1627`
// Minimum execution time: 4_307_000 picoseconds.
Weight::from_parts(4_445_000, 1627)
// Minimum execution time: 3_960_000 picoseconds.
Weight::from_parts(4_114_000, 1627)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -66,13 +66,13 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(134193), added: 136668, mode: `MaxEncodedLen`)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn enqueue_xcmp_message() -> Weight {
// Proof Size summary in bytes:
// Measured: `148`
// Estimated: `3517`
// Minimum execution time: 11_285_000 picoseconds.
Weight::from_parts(11_795_000, 3517)
// Minimum execution time: 11_194_000 picoseconds.
Weight::from_parts(12_119_000, 3517)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
}
Expand All @@ -82,8 +82,8 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `1627`
// Minimum execution time: 2_760_000 picoseconds.
Weight::from_parts(2_884_000, 1627)
// Minimum execution time: 2_460_000 picoseconds.
Weight::from_parts(2_628_000, 1627)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -93,17 +93,17 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
// Proof Size summary in bytes:
// Measured: `177`
// Estimated: `1662`
// Minimum execution time: 3_600_000 picoseconds.
Weight::from_parts(3_734_000, 1662)
// Minimum execution time: 3_364_000 picoseconds.
Weight::from_parts(3_543_000, 1662)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
fn take_first_concatenated_xcm() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 7_631_000 picoseconds.
Weight::from_parts(8_118_000, 0)
// Minimum execution time: 7_984_000 picoseconds.
Weight::from_parts(8_167_000, 0)
}
/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
Expand All @@ -118,13 +118,13 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(134193), added: 136668, mode: `MaxEncodedLen`)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn on_idle_good_msg() -> Weight {
// Proof Size summary in bytes:
// Measured: `134385`
// Estimated: `137850`
// Minimum execution time: 190_123_000 picoseconds.
Weight::from_parts(194_387_000, 137850)
// Measured: `105713`
// Estimated: `109178`
// Minimum execution time: 153_649_000 picoseconds.
Weight::from_parts(155_782_000, 109178)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
Expand All @@ -141,13 +141,13 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `MessageQueue::Pages` (r:0 w:1)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(134193), added: 136668, mode: `MaxEncodedLen`)
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
fn on_idle_large_msg() -> Weight {
// Proof Size summary in bytes:
// Measured: `65782`
// Estimated: `69247`
// Minimum execution time: 102_726_000 picoseconds.
Weight::from_parts(104_463_000, 69247)
// Minimum execution time: 104_439_000 picoseconds.
Weight::from_parts(105_300_000, 69247)
.saturating_add(T::DbWeight::get().reads(6_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
Expand Down
52 changes: 22 additions & 30 deletions runtime/common/src/weights/pallet_asset_manager.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2022 PureStake Inc.
// Copyright 2024 Moonbeam foundation
// This file is part of Moonbeam.

// Moonbeam is free software: you can redistribute it and/or modify
Expand All @@ -17,7 +17,7 @@
//! Autogenerated weights for `pallet_asset_manager`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-07-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-09-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024
Expand Down Expand Up @@ -58,51 +58,43 @@ impl<T: frame_system::Config> pallet_asset_manager::WeightInfo for WeightInfo<T>
// Proof Size summary in bytes:
// Measured: `82`
// Estimated: `3639`
// Minimum execution time: 28_927_000 picoseconds.
Weight::from_parts(29_493_000, 3639)
// Minimum execution time: 28_019_000 picoseconds.
Weight::from_parts(28_713_000, 3639)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `AssetManager::SupportedFeePaymentAssets` (r:1 w:1)
/// Proof: `AssetManager::SupportedFeePaymentAssets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AssetManager::AssetIdType` (r:1 w:1)
/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AssetManager::AssetTypeUnitsPerSecond` (r:1 w:2)
/// Proof: `AssetManager::AssetTypeUnitsPerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AssetManager::AssetTypeId` (r:0 w:2)
/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `x` is `[5, 100]`.
fn change_existing_asset_type() -> Weight {
// Proof Size summary in bytes:
// Measured: `926 + x * (13 ±0)`
// Estimated: `4309 + x * (15 ±0)`
// Minimum execution time: 29_180_000 picoseconds.
Weight::from_parts(29_891_006, 4309)
// Standard Error: 4_391
.saturating_add(Weight::from_parts(874_012, 0))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(6_u64))
.saturating_add(Weight::from_parts(0, 15))
// Measured: `447 + x * (4 ±0)`
// Estimated: `3909 + x * (5 ±0)`
// Minimum execution time: 16_395_000 picoseconds.
Weight::from_parts(18_250_914, 3909)
// Standard Error: 1_597
.saturating_add(Weight::from_parts(80_983, 0))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(3_u64))
.saturating_add(Weight::from_parts(0, 5))
}
/// Storage: `AssetManager::SupportedFeePaymentAssets` (r:1 w:1)
/// Proof: `AssetManager::SupportedFeePaymentAssets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `AssetManager::AssetIdType` (r:1 w:1)
/// Proof: `AssetManager::AssetIdType` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AssetManager::AssetTypeUnitsPerSecond` (r:0 w:1)
/// Proof: `AssetManager::AssetTypeUnitsPerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `AssetManager::AssetTypeId` (r:0 w:1)
/// Proof: `AssetManager::AssetTypeId` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// The range of component `x` is `[5, 100]`.
fn remove_existing_asset_type() -> Weight {
// Proof Size summary in bytes:
// Measured: `482 + x * (10 ±0)`
// Estimated: `3955 + x * (10 ±0)`
// Minimum execution time: 21_219_000 picoseconds.
Weight::from_parts(20_476_212, 3955)
// Standard Error: 3_389
.saturating_add(Weight::from_parts(716_188, 0))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
.saturating_add(Weight::from_parts(0, 10))
// Measured: `447 + x * (4 ±0)`
// Estimated: `3909 + x * (5 ±0)`
// Minimum execution time: 13_955_000 picoseconds.
Weight::from_parts(15_660_921, 3909)
// Standard Error: 1_442
.saturating_add(Weight::from_parts(80_494, 0))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_parts(0, 5))
}
}
Loading

0 comments on commit c3f63cf

Please sign in to comment.