pallet_staking_async_parachain_runtime/weights/cumulus_pallet_xcmp_queue.rs
1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21//! DATE: 2023-09-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `Olivers-MacBook-Pro.local`, CPU: `<UNKNOWN>`
24//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-next-westend-dev")`, DB CACHE: 1024
25
26// Executed Command:
27// ./target/release/polkadot-parachain
28// benchmark
29// pallet
30// --pallet
31// cumulus-pallet-xcmp-queue
32// --chain
33// asset-hub-next-westend-dev
34// --output
35// cumulus/parachains/runtimes/assets/asset-hub-next-westend/src/weights/cumulus_pallet_xcmp_queue.rs
36// --extrinsic
37//
38
39#![cfg_attr(rustfmt, rustfmt_skip)]
40#![allow(unused_parens)]
41#![allow(unused_imports)]
42#![allow(missing_docs)]
43
44use frame_support::{traits::Get, weights::Weight};
45use core::marker::PhantomData;
46
47/// Weight functions for `cumulus_pallet_xcmp_queue`.
48pub struct WeightInfo<T>(PhantomData<T>);
49impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
50 /// Storage: `XcmpQueue::QueueConfig` (r:1 w:1)
51 /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
52 fn set_config_with_u32() -> Weight {
53 // Proof Size summary in bytes:
54 // Measured: `109`
55 // Estimated: `1497`
56 // Minimum execution time: 3_562_000 picoseconds.
57 Weight::from_parts(4_749_000, 1497)
58 .saturating_add(T::DbWeight::get().reads(1_u64))
59 .saturating_add(T::DbWeight::get().writes(1_u64))
60 }
61 /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
62 /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
63 /// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
64 /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
65 /// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
66 /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
67 /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
68 /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
69 /// Storage: `MessageQueue::Pages` (r:0 w:1)
70 /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
71 /// The range of component `n` is `[0, 105467]`.
72 fn enqueue_n_bytes_xcmp_message(n: u32, ) -> Weight {
73 // Proof Size summary in bytes:
74 // Measured: `151`
75 // Estimated: `5487`
76 // Minimum execution time: 10_685_000 picoseconds.
77 Weight::from_parts(8_747_868, 5487)
78 // Standard Error: 6
79 .saturating_add(Weight::from_parts(696, 0).saturating_mul(n.into()))
80 .saturating_add(T::DbWeight::get().reads(4_u64))
81 .saturating_add(T::DbWeight::get().writes(3_u64))
82 }
83 /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
84 /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
85 /// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
86 /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
87 /// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
88 /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
89 /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
90 /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
91 /// Storage: `MessageQueue::Pages` (r:0 w:1)
92 /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
93 /// The range of component `n` is `[0, 1000]`.
94 fn enqueue_n_empty_xcmp_messages(n: u32, ) -> Weight {
95 // Proof Size summary in bytes:
96 // Measured: `151`
97 // Estimated: `5487`
98 // Minimum execution time: 9_498_000 picoseconds.
99 Weight::from_parts(14_113_868, 5487)
100 // Standard Error: 298
101 .saturating_add(Weight::from_parts(109_652, 0).saturating_mul(n.into()))
102 .saturating_add(T::DbWeight::get().reads(4_u64))
103 .saturating_add(T::DbWeight::get().writes(3_u64))
104 }
105 /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
106 /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
107 /// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
108 /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
109 /// Storage: `MessageQueue::Pages` (r:1 w:1)
110 /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
111 /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
112 /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
113 /// The range of component `n` is `[0, 105457]`.
114 fn enqueue_empty_xcmp_message_at(n: u32, ) -> Weight {
115 // Proof Size summary in bytes:
116 // Measured: `334 + n * (1 ±0)`
117 // Estimated: `108986`
118 // Minimum execution time: 12_000_000 picoseconds.
119 Weight::from_parts(11_015_940, 108986)
120 // Standard Error: 32
121 .saturating_add(Weight::from_parts(911, 0).saturating_mul(n.into()))
122 .saturating_add(T::DbWeight::get().reads(4_u64))
123 .saturating_add(T::DbWeight::get().writes(2_u64))
124 }
125 /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
126 /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
127 /// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
128 /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
129 /// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
130 /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
131 /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
132 /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
133 /// Storage: `MessageQueue::Pages` (r:0 w:100)
134 /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
135 /// The range of component `n` is `[0, 100]`.
136 fn enqueue_n_full_pages(n: u32, ) -> Weight {
137 // Proof Size summary in bytes:
138 // Measured: `186`
139 // Estimated: `5487`
140 // Minimum execution time: 10_685_000 picoseconds.
141 Weight::from_parts(10_686_000, 5487)
142 // Standard Error: 51_426
143 .saturating_add(Weight::from_parts(64_394_224, 0).saturating_mul(n.into()))
144 .saturating_add(T::DbWeight::get().reads(4_u64))
145 .saturating_add(T::DbWeight::get().writes(2_u64))
146 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
147 }
148 /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
149 /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
150 /// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
151 /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
152 /// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
153 /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
154 /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
155 /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
156 /// Storage: `MessageQueue::Pages` (r:0 w:1)
157 /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
158 fn enqueue_1000_small_xcmp_messages() -> Weight {
159 // Proof Size summary in bytes:
160 // Measured: `53067`
161 // Estimated: `108986`
162 // Minimum execution time: 139_000_000 picoseconds.
163 Weight::from_parts(148_000_000, 108986)
164 .saturating_add(T::DbWeight::get().reads(4_u64))
165 .saturating_add(T::DbWeight::get().writes(2_u64))
166 }
167 /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
168 /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
169 fn suspend_channel() -> Weight {
170 // Proof Size summary in bytes:
171 // Measured: `109`
172 // Estimated: `2767`
173 // Minimum execution time: 2_374_000 picoseconds.
174 Weight::from_parts(3_562_000, 2767)
175 .saturating_add(T::DbWeight::get().reads(1_u64))
176 .saturating_add(T::DbWeight::get().writes(1_u64))
177 }
178 /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
179 /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
180 fn resume_channel() -> Weight {
181 // Proof Size summary in bytes:
182 // Measured: `144`
183 // Estimated: `2767`
184 // Minimum execution time: 3_561_000 picoseconds.
185 Weight::from_parts(4_749_000, 2767)
186 .saturating_add(T::DbWeight::get().reads(1_u64))
187 .saturating_add(T::DbWeight::get().writes(1_u64))
188 }
189 /// The range of component `n` is `[0, 92]`.
190 fn take_first_concatenated_xcm(n: u32, ) -> Weight {
191 // Proof Size summary in bytes:
192 // Measured: `0`
193 // Estimated: `0`
194 // Minimum execution time: 1_000_000 picoseconds.
195 Weight::from_parts(1_806_940, 0)
196 // Standard Error: 541
197 .saturating_add(Weight::from_parts(46_068, 0).saturating_mul(n.into()))
198 }
199 /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
200 /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
201 /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
202 /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
203 /// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
204 /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
205 /// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
206 /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
207 /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
208 /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
209 /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
210 /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
211 /// Storage: `MessageQueue::Pages` (r:0 w:1)
212 /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
213 fn on_idle_good_msg() -> Weight {
214 // Proof Size summary in bytes:
215 // Measured: `105716`
216 // Estimated: `109181`
217 // Minimum execution time: 131_791_000 picoseconds.
218 Weight::from_parts(134_166_000, 109181)
219 .saturating_add(T::DbWeight::get().reads(6_u64))
220 .saturating_add(T::DbWeight::get().writes(5_u64))
221 }
222 /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
223 /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
224 /// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
225 /// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
226 /// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
227 /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
228 /// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
229 /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
230 /// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
231 /// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
232 /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
233 /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
234 /// Storage: `MessageQueue::Pages` (r:0 w:1)
235 /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
236 fn on_idle_large_msg() -> Weight {
237 // Proof Size summary in bytes:
238 // Measured: `65785`
239 // Estimated: `69250`
240 // Minimum execution time: 80_737_000 picoseconds.
241 Weight::from_parts(83_111_000, 69250)
242 .saturating_add(T::DbWeight::get().reads(6_u64))
243 .saturating_add(T::DbWeight::get().writes(5_u64))
244 }
245}