-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add benchmarks for pallet-message-queue * Add benchmarks for cumulus_pallet_parachain_system * update MessageQueueHeapSize * Use proper (2^n) value in MessageQueueHeapSize
- Loading branch information
Showing
12 changed files
with
283 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
runtime/common/src/weights/cumulus_pallet_parachain_system.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// Copyright 2024 Moonbeam foundation | ||
// This file is part of Moonbeam. | ||
|
||
// Moonbeam is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Moonbeam is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
//! 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: `[]` | ||
//! WORST CASE MAP SIZE: `1000000` | ||
//! HOSTNAME: `MacBook-Pro-de-romarq.local`, CPU: `<UNKNOWN>` | ||
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024 | ||
// Executed Command: | ||
// ./target/release/moonbeam | ||
// benchmark | ||
// pallet | ||
// --chain=moonbase-dev | ||
// --steps=50 | ||
// --repeat=20 | ||
// --pallet=cumulus_pallet_parachain_system | ||
// --extrinsic=* | ||
// --wasm-execution=compiled | ||
// --header=./file_header.txt | ||
// --template=./benchmarking/frame-weight-template.hbs | ||
// --output=./runtime/common/src/weights/ | ||
|
||
#![cfg_attr(rustfmt, rustfmt_skip)] | ||
#![allow(unused_parens)] | ||
#![allow(unused_imports)] | ||
|
||
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; | ||
use sp_std::marker::PhantomData; | ||
|
||
/// Weights for `cumulus_pallet_parachain_system`. | ||
pub struct WeightInfo<T>(PhantomData<T>); | ||
impl<T: frame_system::Config> cumulus_pallet_parachain_system::WeightInfo for WeightInfo<T> { | ||
/// Storage: `ParachainSystem::LastDmqMqcHead` (r:1 w:1) | ||
/// Proof: `ParachainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) | ||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1) | ||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) | ||
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1) | ||
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) | ||
/// 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`) | ||
/// 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())) | ||
.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()))) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
// Copyright 2024 Moonbeam foundation | ||
// This file is part of Moonbeam. | ||
|
||
// Moonbeam is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Moonbeam is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
//! Autogenerated weights for `pallet_message_queue` | ||
//! | ||
//! 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: `[]` | ||
//! WORST CASE MAP SIZE: `1000000` | ||
//! HOSTNAME: `MacBook-Pro-de-romarq.local`, CPU: `<UNKNOWN>` | ||
//! WASM-EXECUTION: Compiled, CHAIN: Some("moonbase-dev"), DB CACHE: 1024 | ||
// Executed Command: | ||
// ./target/release/moonbeam | ||
// benchmark | ||
// pallet | ||
// --chain=moonbase-dev | ||
// --steps=50 | ||
// --repeat=20 | ||
// --pallet=pallet_message_queue | ||
// --extrinsic=* | ||
// --wasm-execution=compiled | ||
// --header=./file_header.txt | ||
// --template=./benchmarking/frame-weight-template.hbs | ||
// --output=./runtime/common/src/weights/ | ||
|
||
#![cfg_attr(rustfmt, rustfmt_skip)] | ||
#![allow(unused_parens)] | ||
#![allow(unused_imports)] | ||
|
||
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; | ||
use sp_std::marker::PhantomData; | ||
|
||
/// Weights for `pallet_message_queue`. | ||
pub struct WeightInfo<T>(PhantomData<T>); | ||
impl<T: frame_system::Config> pallet_message_queue::WeightInfo for WeightInfo<T> { | ||
/// Storage: `MessageQueue::ServiceHead` (r:1 w:0) | ||
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) | ||
/// Storage: `MessageQueue::BookStateFor` (r:2 w:2) | ||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) | ||
fn ready_ring_knit() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `223` | ||
// Estimated: `6044` | ||
// Minimum execution time: 10_000_000 picoseconds. | ||
Weight::from_parts(11_000_000, 6044) | ||
.saturating_add(T::DbWeight::get().reads(3_u64)) | ||
.saturating_add(T::DbWeight::get().writes(2_u64)) | ||
} | ||
/// Storage: `MessageQueue::BookStateFor` (r:2 w:2) | ||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) | ||
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1) | ||
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) | ||
fn ready_ring_unknit() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `218` | ||
// Estimated: `6044` | ||
// Minimum execution time: 9_000_000 picoseconds. | ||
Weight::from_parts(10_000_000, 6044) | ||
.saturating_add(T::DbWeight::get().reads(3_u64)) | ||
.saturating_add(T::DbWeight::get().writes(3_u64)) | ||
} | ||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1) | ||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) | ||
/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0) | ||
/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) | ||
/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) | ||
/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) | ||
fn service_queue_base() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `190` | ||
// Estimated: `3517` | ||
// Minimum execution time: 7_000_000 picoseconds. | ||
Weight::from_parts(7_000_000, 3517) | ||
.saturating_add(T::DbWeight::get().reads(3_u64)) | ||
.saturating_add(T::DbWeight::get().writes(1_u64)) | ||
} | ||
/// Storage: `MessageQueue::Pages` (r:1 w:1) | ||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(134193), added: 136668, mode: `MaxEncodedLen`) | ||
fn service_page_base_completion() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `72` | ||
// Estimated: `137658` | ||
// Minimum execution time: 5_000_000 picoseconds. | ||
Weight::from_parts(6_000_000, 137658) | ||
.saturating_add(T::DbWeight::get().reads(1_u64)) | ||
.saturating_add(T::DbWeight::get().writes(1_u64)) | ||
} | ||
/// Storage: `MessageQueue::Pages` (r:1 w:1) | ||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(134193), added: 136668, mode: `MaxEncodedLen`) | ||
fn service_page_base_no_completion() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `72` | ||
// Estimated: `137658` | ||
// Minimum execution time: 5_000_000 picoseconds. | ||
Weight::from_parts(6_000_000, 137658) | ||
.saturating_add(T::DbWeight::get().reads(1_u64)) | ||
.saturating_add(T::DbWeight::get().writes(1_u64)) | ||
} | ||
/// Storage: `MessageQueue::BookStateFor` (r:0 w:1) | ||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) | ||
/// Storage: `MessageQueue::Pages` (r:0 w:1) | ||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(134193), added: 136668, mode: `MaxEncodedLen`) | ||
fn service_page_item() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `0` | ||
// Estimated: `0` | ||
// Minimum execution time: 155_000_000 picoseconds. | ||
Weight::from_parts(156_000_000, 0) | ||
.saturating_add(T::DbWeight::get().writes(2_u64)) | ||
} | ||
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1) | ||
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) | ||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:0) | ||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) | ||
fn bump_service_head() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `171` | ||
// Estimated: `3517` | ||
// Minimum execution time: 5_000_000 picoseconds. | ||
Weight::from_parts(6_000_000, 3517) | ||
.saturating_add(T::DbWeight::get().reads(2_u64)) | ||
.saturating_add(T::DbWeight::get().writes(1_u64)) | ||
} | ||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1) | ||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) | ||
/// Storage: `MessageQueue::Pages` (r:1 w:1) | ||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(134193), added: 136668, mode: `MaxEncodedLen`) | ||
fn reap_page() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `134274` | ||
// Estimated: `137658` | ||
// Minimum execution time: 48_000_000 picoseconds. | ||
Weight::from_parts(53_000_000, 137658) | ||
.saturating_add(T::DbWeight::get().reads(2_u64)) | ||
.saturating_add(T::DbWeight::get().writes(2_u64)) | ||
} | ||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1) | ||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) | ||
/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0) | ||
/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) | ||
/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) | ||
/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) | ||
/// Storage: `MessageQueue::Pages` (r:1 w:1) | ||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(134193), added: 136668, mode: `MaxEncodedLen`) | ||
fn execute_overweight_page_removed() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `134458` | ||
// Estimated: `137658` | ||
// Minimum execution time: 69_000_000 picoseconds. | ||
Weight::from_parts(75_000_000, 137658) | ||
.saturating_add(T::DbWeight::get().reads(4_u64)) | ||
.saturating_add(T::DbWeight::get().writes(2_u64)) | ||
} | ||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1) | ||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) | ||
/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0) | ||
/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) | ||
/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0) | ||
/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) | ||
/// Storage: `MessageQueue::Pages` (r:1 w:1) | ||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(134193), added: 136668, mode: `MaxEncodedLen`) | ||
fn execute_overweight_page_updated() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `134458` | ||
// Estimated: `137658` | ||
// Minimum execution time: 82_000_000 picoseconds. | ||
Weight::from_parts(88_000_000, 137658) | ||
.saturating_add(T::DbWeight::get().reads(4_u64)) | ||
.saturating_add(T::DbWeight::get().writes(2_u64)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.