1
// Copyright 2025 Moonbeam foundation
2
// This file is part of Moonbeam.
3

            
4
// Moonbeam is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8

            
9
// Moonbeam is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13

            
14
// You should have received a copy of the GNU General Public License
15
// along with Moonbeam.  If not, see <http://www.gnu.org/licenses/>.
16

            
17

            
18
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.0.0
21
//! DATE: 2025-12-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `ip-10-0-0-36`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
25

            
26
// Executed Command:
27
// ./frame-omni-bencher
28
// v1
29
// benchmark
30
// pallet
31
// --runtime=./target/production/wbuild/moonriver-runtime/moonriver_runtime.wasm
32
// --genesis-builder=runtime
33
// --genesis-builder-preset=development
34
// --steps=50
35
// --repeat=20
36
// --pallet=cumulus_pallet_xcmp_queue
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --header=./file_header.txt
40
// --template=./benchmarking/frame-weight-template.hbs
41
// --output=./runtime/moonriver/src/weights
42

            
43
#![cfg_attr(rustfmt, rustfmt_skip)]
44
#![allow(unused_parens)]
45
#![allow(unused_imports)]
46

            
47
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
48
use sp_std::marker::PhantomData;
49

            
50
/// Weights for `cumulus_pallet_xcmp_queue`.
51
pub struct WeightInfo<T>(PhantomData<T>);
52
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
53
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:1)
54
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
55
	fn set_config_with_u32() -> Weight {
56
		// Proof Size summary in bytes:
57
		//  Measured:  `142`
58
		//  Estimated: `1497`
59
		// Minimum execution time: 5_009_000 picoseconds.
60
		Weight::from_parts(5_311_000, 1497)
61
			.saturating_add(T::DbWeight::get().reads(1_u64))
62
			.saturating_add(T::DbWeight::get().writes(1_u64))
63
	}
64
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
65
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
66
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
67
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
68
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
69
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
70
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
71
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
72
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
73
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
74
	/// The range of component `n` is `[0, 105467]`.
75
2
	fn enqueue_n_bytes_xcmp_message(n: u32, ) -> Weight {
76
		// Proof Size summary in bytes:
77
		//  Measured:  `148`
78
		//  Estimated: `5487`
79
		// Minimum execution time: 13_161_000 picoseconds.
80
2
		Weight::from_parts(10_031_410, 5487)
81
			// Standard Error: 5
82
2
			.saturating_add(Weight::from_parts(944, 0).saturating_mul(n.into()))
83
2
			.saturating_add(T::DbWeight::get().reads(4_u64))
84
2
			.saturating_add(T::DbWeight::get().writes(3_u64))
85
2
	}
86
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
87
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
88
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
89
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
90
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
91
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
92
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
93
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
94
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
95
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
96
	/// The range of component `n` is `[0, 1000]`.
97
3
	fn enqueue_n_empty_xcmp_messages(n: u32, ) -> Weight {
98
		// Proof Size summary in bytes:
99
		//  Measured:  `148`
100
		//  Estimated: `5487`
101
		// Minimum execution time: 10_939_000 picoseconds.
102
3
		Weight::from_parts(15_235_150, 5487)
103
			// Standard Error: 188
104
3
			.saturating_add(Weight::from_parts(118_445, 0).saturating_mul(n.into()))
105
3
			.saturating_add(T::DbWeight::get().reads(4_u64))
106
3
			.saturating_add(T::DbWeight::get().writes(3_u64))
107
3
	}
108
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
109
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `Measured`)
110
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
111
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`)
112
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
113
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `Measured`)
114
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
115
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `Measured`)
116
	/// The range of component `n` is `[0, 105457]`.
117
2
	fn enqueue_empty_xcmp_message_at(n: u32, ) -> Weight {
118
		// Proof Size summary in bytes:
119
		//  Measured:  `330 + n * (1 ±0)`
120
		//  Estimated: `3793 + n * (1 ±0)`
121
		// Minimum execution time: 19_820_000 picoseconds.
122
2
		Weight::from_parts(15_712_293, 3793)
123
			// Standard Error: 10
124
2
			.saturating_add(Weight::from_parts(2_084, 0).saturating_mul(n.into()))
125
2
			.saturating_add(T::DbWeight::get().reads(4_u64))
126
2
			.saturating_add(T::DbWeight::get().writes(2_u64))
127
2
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
128
2
	}
129
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
130
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
131
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
132
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
133
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
134
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
135
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
136
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
137
	/// Storage: `MessageQueue::Pages` (r:0 w:100)
138
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
139
	/// The range of component `n` is `[0, 100]`.
140
4
	fn enqueue_n_full_pages(n: u32, ) -> Weight {
141
		// Proof Size summary in bytes:
142
		//  Measured:  `183`
143
		//  Estimated: `5487`
144
		// Minimum execution time: 12_509_000 picoseconds.
145
4
		Weight::from_parts(31_979_032, 5487)
146
			// Standard Error: 30_120
147
4
			.saturating_add(Weight::from_parts(92_817_073, 0).saturating_mul(n.into()))
148
4
			.saturating_add(T::DbWeight::get().reads(4_u64))
149
4
			.saturating_add(T::DbWeight::get().writes(2_u64))
150
4
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
151
4
	}
152
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
153
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `Measured`)
154
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
155
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`)
156
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
157
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `Measured`)
158
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
159
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `Measured`)
160
1
	fn enqueue_1000_small_xcmp_messages() -> Weight {
161
		// Proof Size summary in bytes:
162
		//  Measured:  `53063`
163
		//  Estimated: `56528`
164
		// Minimum execution time: 242_390_000 picoseconds.
165
1
		Weight::from_parts(247_104_000, 56528)
166
1
			.saturating_add(T::DbWeight::get().reads(4_u64))
167
1
			.saturating_add(T::DbWeight::get().writes(2_u64))
168
1
	}
169
	/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
170
	/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
171
	fn suspend_channel() -> Weight {
172
		// Proof Size summary in bytes:
173
		//  Measured:  `142`
174
		//  Estimated: `2767`
175
		// Minimum execution time: 3_135_000 picoseconds.
176
		Weight::from_parts(3_374_000, 2767)
177
			.saturating_add(T::DbWeight::get().reads(1_u64))
178
			.saturating_add(T::DbWeight::get().writes(1_u64))
179
	}
180
	/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
181
	/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
182
	fn resume_channel() -> Weight {
183
		// Proof Size summary in bytes:
184
		//  Measured:  `177`
185
		//  Estimated: `2767`
186
		// Minimum execution time: 4_476_000 picoseconds.
187
		Weight::from_parts(4_748_000, 2767)
188
			.saturating_add(T::DbWeight::get().reads(1_u64))
189
			.saturating_add(T::DbWeight::get().writes(1_u64))
190
	}
191
	fn take_first_concatenated_xcm() -> Weight {
192
		// Proof Size summary in bytes:
193
		//  Measured:  `0`
194
		//  Estimated: `0`
195
		// Minimum execution time: 5_432_000 picoseconds.
196
		Weight::from_parts(5_728_000, 0)
197
	}
198
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
199
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
200
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
201
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
202
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
203
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
204
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
205
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
206
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
207
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
208
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
209
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
210
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
211
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
212
8
	fn on_idle_good_msg() -> Weight {
213
		// Proof Size summary in bytes:
214
		//  Measured:  `105713`
215
		//  Estimated: `109178`
216
		// Minimum execution time: 177_219_000 picoseconds.
217
8
		Weight::from_parts(189_378_000, 109178)
218
8
			.saturating_add(T::DbWeight::get().reads(6_u64))
219
8
			.saturating_add(T::DbWeight::get().writes(5_u64))
220
8
	}
221
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
222
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
223
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
224
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
225
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
226
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
227
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
228
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
229
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
230
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
231
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
232
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
233
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
234
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
235
8
	fn on_idle_large_msg() -> Weight {
236
		// Proof Size summary in bytes:
237
		//  Measured:  `65782`
238
		//  Estimated: `69247`
239
		// Minimum execution time: 115_995_000 picoseconds.
240
8
		Weight::from_parts(123_244_000, 69247)
241
8
			.saturating_add(T::DbWeight::get().reads(6_u64))
242
8
			.saturating_add(T::DbWeight::get().writes(5_u64))
243
8
	}
244
}