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 fn block_weight_tx_extension_max_weight() -> Weight;
59 fn block_weight_tx_extension_stays_fraction_of_core() -> Weight;
60 fn block_weight_tx_extension_full_core() -> Weight;
61}
62
63/// Weights for cumulus_pallet_parachain_system using the Substrate node and recommended hardware.
64pub struct SubstrateWeight<T>(PhantomData<T>);
65impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
66 /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1)
67 /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured)
68 /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0)
69 /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (max_values: Some(1), max_size: None, mode: Measured)
70 /// Storage: MessageQueue BookStateFor (r:1 w:1)
71 /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
72 /// Storage: MessageQueue ServiceHead (r:1 w:1)
73 /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen)
74 /// Storage: ParachainSystem ProcessedDownwardMessages (r:0 w:1)
75 /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured)
76 /// Storage: MessageQueue Pages (r:0 w:16)
77 /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen)
78 /// The range of component `n` is `[0, 1000]`.
79 fn enqueue_inbound_downward_messages(n: u32, ) -> Weight {
80 // Proof Size summary in bytes:
81 // Measured: `12`
82 // Estimated: `8013`
83 // Minimum execution time: 1_625_000 picoseconds.
84 Weight::from_parts(1_735_000, 8013)
85 // Standard Error: 14_563
86 .saturating_add(Weight::from_parts(25_300_108, 0).saturating_mul(n.into()))
87 .saturating_add(T::DbWeight::get().reads(4_u64))
88 .saturating_add(T::DbWeight::get().writes(4_u64))
89 }
90
91 fn block_weight_tx_extension_max_weight() -> Weight {
92 Weight::zero()
93 }
94
95 fn block_weight_tx_extension_stays_fraction_of_core() -> Weight {
96 Weight::zero()
97 }
98
99 fn block_weight_tx_extension_full_core() -> Weight {
100 Weight::zero()
101 }
102}
103
104// For backwards compatibility and tests
105impl WeightInfo for () {
106 /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1)
107 /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured)
108 /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0)
109 /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (max_values: Some(1), max_size: None, mode: Measured)
110 /// Storage: MessageQueue BookStateFor (r:1 w:1)
111 /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
112 /// Storage: MessageQueue ServiceHead (r:1 w:1)
113 /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen)
114 /// Storage: ParachainSystem ProcessedDownwardMessages (r:0 w:1)
115 /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured)
116 /// Storage: MessageQueue Pages (r:0 w:16)
117 /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen)
118 /// The range of component `n` is `[0, 1000]`.
119 fn enqueue_inbound_downward_messages(n: u32, ) -> Weight {
120 // Proof Size summary in bytes:
121 // Measured: `12`
122 // Estimated: `8013`
123 // Minimum execution time: 1_625_000 picoseconds.
124 Weight::from_parts(1_735_000, 8013)
125 // Standard Error: 14_563
126 .saturating_add(Weight::from_parts(25_300_108, 0).saturating_mul(n.into()))
127 .saturating_add(RocksDbWeight::get().reads(4_u64))
128 .saturating_add(RocksDbWeight::get().writes(4_u64))
129 }
130
131 fn block_weight_tx_extension_max_weight() -> Weight {
132 Weight::zero()
133 }
134
135 fn block_weight_tx_extension_stays_fraction_of_core() -> Weight {
136 Weight::zero()
137 }
138
139 fn block_weight_tx_extension_full_core() -> Weight {
140 Weight::zero()
141 }
142
143}