referrerpolicy=no-referrer-when-downgrade

cumulus_pallet_parachain_system/
weights.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Cumulus.
3// SPDX-License-Identifier: Apache-2.0
4
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// 	http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16
17//! Autogenerated weights for cumulus_pallet_parachain_system
18//!
19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
20//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K`
23//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024
24
25// Executed Command:
26// ./target/release/polkadot-parachain
27// benchmark
28// pallet
29// --chain
30// westmint-dev
31// --pallet
32// cumulus_pallet_parachain_system
33// --extrinsic
34// *
35// --execution
36// wasm
37// --wasm-execution
38// compiled
39// --output
40// pallets/parachain-system/src/weights.rs
41// --steps
42// 50
43// --repeat
44// 20
45// --template
46// ../substrate/.maintain/frame-weight-template.hbs
47
48#![cfg_attr(rustfmt, rustfmt_skip)]
49#![allow(unused_parens)]
50#![allow(unused_imports)]
51
52use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
53use core::marker::PhantomData;
54
55/// Weight functions needed for cumulus_pallet_parachain_system.
56pub trait WeightInfo {
57	fn enqueue_inbound_downward_messages(n: u32, ) -> Weight;
58}
59
60/// Weights for cumulus_pallet_parachain_system using the Substrate node and recommended hardware.
61pub struct SubstrateWeight<T>(PhantomData<T>);
62impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
63	/// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1)
64	/// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured)
65	/// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0)
66	/// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (max_values: Some(1), max_size: None, mode: Measured)
67	/// Storage: MessageQueue BookStateFor (r:1 w:1)
68	/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
69	/// Storage: MessageQueue ServiceHead (r:1 w:1)
70	/// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen)
71	/// Storage: ParachainSystem ProcessedDownwardMessages (r:0 w:1)
72	/// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured)
73	/// Storage: MessageQueue Pages (r:0 w:16)
74	/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen)
75	/// The range of component `n` is `[0, 1000]`.
76	fn enqueue_inbound_downward_messages(n: u32, ) -> Weight {
77		// Proof Size summary in bytes:
78		//  Measured:  `12`
79		//  Estimated: `8013`
80		// Minimum execution time: 1_625_000 picoseconds.
81		Weight::from_parts(1_735_000, 8013)
82			// Standard Error: 14_563
83			.saturating_add(Weight::from_parts(25_300_108, 0).saturating_mul(n.into()))
84			.saturating_add(T::DbWeight::get().reads(4_u64))
85			.saturating_add(T::DbWeight::get().writes(4_u64))
86	}
87}
88
89// For backwards compatibility and tests
90impl WeightInfo for () {
91	/// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1)
92	/// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured)
93	/// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0)
94	/// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (max_values: Some(1), max_size: None, mode: Measured)
95	/// Storage: MessageQueue BookStateFor (r:1 w:1)
96	/// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
97	/// Storage: MessageQueue ServiceHead (r:1 w:1)
98	/// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen)
99	/// Storage: ParachainSystem ProcessedDownwardMessages (r:0 w:1)
100	/// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured)
101	/// Storage: MessageQueue Pages (r:0 w:16)
102	/// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen)
103	/// The range of component `n` is `[0, 1000]`.
104	fn enqueue_inbound_downward_messages(n: u32, ) -> Weight {
105		// Proof Size summary in bytes:
106		//  Measured:  `12`
107		//  Estimated: `8013`
108		// Minimum execution time: 1_625_000 picoseconds.
109		Weight::from_parts(1_735_000, 8013)
110			// Standard Error: 14_563
111			.saturating_add(Weight::from_parts(25_300_108, 0).saturating_mul(n.into()))
112			.saturating_add(RocksDbWeight::get().reads(4_u64))
113			.saturating_add(RocksDbWeight::get().writes(4_u64))
114	}
115}