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 51.0.0
21
//! DATE: 2026-02-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `ip-10-0-0-176`, 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
// --disable-log-color
42
// --output=./runtime/moonriver/src/weights
43

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

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

            
51
/// Weights for `cumulus_pallet_xcmp_queue`.
52
pub struct WeightInfo<T>(PhantomData<T>);
53
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
54
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:1)
55
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
56
	fn set_config_with_u32() -> Weight {
57
		// Proof Size summary in bytes:
58
		//  Measured:  `142`
59
		//  Estimated: `1497`
60
		// Minimum execution time: 5_082_000 picoseconds.
61
		Weight::from_parts(5_308_000, 1497)
62
			.saturating_add(T::DbWeight::get().reads(1_u64))
63
			.saturating_add(T::DbWeight::get().writes(1_u64))
64
	}
65
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
66
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
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: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
72
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
73
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
74
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
75
	/// The range of component `n` is `[0, 105467]`.
76
2
	fn enqueue_n_bytes_xcmp_message(n: u32, ) -> Weight {
77
		// Proof Size summary in bytes:
78
		//  Measured:  `148`
79
		//  Estimated: `5487`
80
		// Minimum execution time: 13_954_000 picoseconds.
81
2
		Weight::from_parts(10_259_370, 5487)
82
			// Standard Error: 5
83
2
			.saturating_add(Weight::from_parts(912, 0).saturating_mul(n.into()))
84
2
			.saturating_add(T::DbWeight::get().reads(4_u64))
85
2
			.saturating_add(T::DbWeight::get().writes(3_u64))
86
2
	}
87
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
88
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
89
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
90
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
91
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
92
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
93
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
94
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
95
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
96
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
97
	/// The range of component `n` is `[0, 1000]`.
98
3
	fn enqueue_n_empty_xcmp_messages(n: u32, ) -> Weight {
99
		// Proof Size summary in bytes:
100
		//  Measured:  `148`
101
		//  Estimated: `5487`
102
		// Minimum execution time: 11_784_000 picoseconds.
103
3
		Weight::from_parts(16_483_361, 5487)
104
			// Standard Error: 213
105
3
			.saturating_add(Weight::from_parts(140_147, 0).saturating_mul(n.into()))
106
3
			.saturating_add(T::DbWeight::get().reads(4_u64))
107
3
			.saturating_add(T::DbWeight::get().writes(3_u64))
108
3
	}
109
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
110
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `Measured`)
111
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
112
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`)
113
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
114
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `Measured`)
115
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
116
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `Measured`)
117
	/// The range of component `n` is `[0, 105457]`.
118
2
	fn enqueue_empty_xcmp_message_at(n: u32, ) -> Weight {
119
		// Proof Size summary in bytes:
120
		//  Measured:  `330 + n * (1 ±0)`
121
		//  Estimated: `3793 + n * (1 ±0)`
122
		// Minimum execution time: 21_306_000 picoseconds.
123
2
		Weight::from_parts(15_736_161, 3793)
124
			// Standard Error: 11
125
2
			.saturating_add(Weight::from_parts(2_042, 0).saturating_mul(n.into()))
126
2
			.saturating_add(T::DbWeight::get().reads(4_u64))
127
2
			.saturating_add(T::DbWeight::get().writes(2_u64))
128
2
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
129
2
	}
130
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
131
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
132
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
133
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
134
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
135
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
136
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
137
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
138
	/// Storage: `MessageQueue::Pages` (r:0 w:100)
139
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
140
	/// The range of component `n` is `[0, 100]`.
141
4
	fn enqueue_n_full_pages(n: u32, ) -> Weight {
142
		// Proof Size summary in bytes:
143
		//  Measured:  `183`
144
		//  Estimated: `5487`
145
		// Minimum execution time: 13_142_000 picoseconds.
146
4
		Weight::from_parts(21_622_495, 5487)
147
			// Standard Error: 29_813
148
4
			.saturating_add(Weight::from_parts(87_473_774, 0).saturating_mul(n.into()))
149
4
			.saturating_add(T::DbWeight::get().reads(4_u64))
150
4
			.saturating_add(T::DbWeight::get().writes(2_u64))
151
4
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
152
4
	}
153
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
154
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `Measured`)
155
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
156
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`)
157
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
158
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `Measured`)
159
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
160
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `Measured`)
161
1
	fn enqueue_1000_small_xcmp_messages() -> Weight {
162
		// Proof Size summary in bytes:
163
		//  Measured:  `53063`
164
		//  Estimated: `56528`
165
		// Minimum execution time: 268_307_000 picoseconds.
166
1
		Weight::from_parts(272_959_000, 56528)
167
1
			.saturating_add(T::DbWeight::get().reads(4_u64))
168
1
			.saturating_add(T::DbWeight::get().writes(2_u64))
169
1
	}
170
	/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
171
	/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
172
	fn suspend_channel() -> Weight {
173
		// Proof Size summary in bytes:
174
		//  Measured:  `142`
175
		//  Estimated: `2767`
176
		// Minimum execution time: 3_284_000 picoseconds.
177
		Weight::from_parts(3_645_000, 2767)
178
			.saturating_add(T::DbWeight::get().reads(1_u64))
179
			.saturating_add(T::DbWeight::get().writes(1_u64))
180
	}
181
	/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
182
	/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
183
	fn resume_channel() -> Weight {
184
		// Proof Size summary in bytes:
185
		//  Measured:  `177`
186
		//  Estimated: `2767`
187
		// Minimum execution time: 4_571_000 picoseconds.
188
		Weight::from_parts(4_860_000, 2767)
189
			.saturating_add(T::DbWeight::get().reads(1_u64))
190
			.saturating_add(T::DbWeight::get().writes(1_u64))
191
	}
192
	fn take_first_concatenated_xcm() -> Weight {
193
		// Proof Size summary in bytes:
194
		//  Measured:  `0`
195
		//  Estimated: `0`
196
		// Minimum execution time: 5_657_000 picoseconds.
197
		Weight::from_parts(5_757_000, 0)
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
9
	fn on_idle_good_msg() -> Weight {
214
		// Proof Size summary in bytes:
215
		//  Measured:  `105713`
216
		//  Estimated: `109178`
217
		// Minimum execution time: 171_264_000 picoseconds.
218
9
		Weight::from_parts(183_646_000, 109178)
219
9
			.saturating_add(T::DbWeight::get().reads(6_u64))
220
9
			.saturating_add(T::DbWeight::get().writes(5_u64))
221
9
	}
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
9
	fn on_idle_large_msg() -> Weight {
237
		// Proof Size summary in bytes:
238
		//  Measured:  `65782`
239
		//  Estimated: `69247`
240
		// Minimum execution time: 112_387_000 picoseconds.
241
9
		Weight::from_parts(116_615_000, 69247)
242
9
			.saturating_add(T::DbWeight::get().reads(6_u64))
243
9
			.saturating_add(T::DbWeight::get().writes(5_u64))
244
9
	}
245
}