1
// Copyright (C) Moondance Labs Ltd.
2
// This file is part of Tanssi.
3

            
4
// Tanssi 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
// Tanssi 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 Tanssi.  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.1.0
21
//! DATE: 2025-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `benchmark-1`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
25

            
26
// Executed Command:
27
// target/release/container-chain-frontier-node
28
// benchmark
29
// pallet
30
// --wasm-execution=compiled
31
// --pallet
32
// cumulus_pallet_xcmp_queue
33
// --extrinsic
34
// *
35
// --chain=dev
36
// --steps
37
// 50
38
// --repeat
39
// 20
40
// --template=benchmarking/frame-weight-runtime-template.hbs
41
// --json-file
42
// raw.json
43
// --output
44
// tmp/frontier_template_weights/cumulus_pallet_xcmp_queue.rs
45

            
46
#![cfg_attr(rustfmt, rustfmt_skip)]
47
#![allow(unused_parens)]
48
#![allow(unused_imports)]
49

            
50
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
51
use core::marker::PhantomData;
52

            
53
/// Weights for cumulus_pallet_xcmp_queue using the Substrate node and recommended hardware.
54
pub struct SubstrateWeight<T>(PhantomData<T>);
55
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for SubstrateWeight<T> {
56
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:1)
57
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
58
	fn set_config_with_u32() -> Weight {
59
		// Proof Size summary in bytes:
60
		//  Measured:  `109`
61
		//  Estimated: `1497`
62
		// Minimum execution time: 6_716_000 picoseconds.
63
		Weight::from_parts(7_024_000, 1497)
64
			.saturating_add(T::DbWeight::get().reads(1_u64))
65
			.saturating_add(T::DbWeight::get().writes(1_u64))
66
	}
67
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
68
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
69
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
70
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
71
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
72
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
73
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
74
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
75
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
76
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
77
	/// The range of component `n` is `[0, 65531]`.
78
18
	fn enqueue_n_bytes_xcmp_message(n: u32, ) -> Weight {
79
		// Proof Size summary in bytes:
80
		//  Measured:  `115`
81
		//  Estimated: `5487`
82
		// Minimum execution time: 18_081_000 picoseconds.
83
18
		Weight::from_parts(14_028_865, 5487)
84
			// Standard Error: 9
85
18
			.saturating_add(Weight::from_parts(997, 0).saturating_mul(n.into()))
86
18
			.saturating_add(T::DbWeight::get().reads(4_u64))
87
18
			.saturating_add(T::DbWeight::get().writes(3_u64))
88
18
	}
89
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
90
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
91
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
92
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
93
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
94
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
95
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
96
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
97
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
98
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
99
	/// The range of component `n` is `[0, 1000]`.
100
27
	fn enqueue_n_empty_xcmp_messages(n: u32, ) -> Weight {
101
		// Proof Size summary in bytes:
102
		//  Measured:  `115`
103
		//  Estimated: `5487`
104
		// Minimum execution time: 15_098_000 picoseconds.
105
27
		Weight::from_parts(20_379_040, 5487)
106
			// Standard Error: 198
107
27
			.saturating_add(Weight::from_parts(160_578, 0).saturating_mul(n.into()))
108
27
			.saturating_add(T::DbWeight::get().reads(4_u64))
109
27
			.saturating_add(T::DbWeight::get().writes(3_u64))
110
27
	}
111
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
112
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `Measured`)
113
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
114
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`)
115
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
116
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `Measured`)
117
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
118
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `Measured`)
119
	/// The range of component `n` is `[0, 65521]`.
120
18
	fn enqueue_empty_xcmp_message_at(n: u32, ) -> Weight {
121
		// Proof Size summary in bytes:
122
		//  Measured:  `297 + n * (1 ±0)`
123
		//  Estimated: `3758 + n * (1 ±0)`
124
		// Minimum execution time: 26_427_000 picoseconds.
125
18
		Weight::from_parts(19_218_361, 3758)
126
			// Standard Error: 16
127
18
			.saturating_add(Weight::from_parts(2_126, 0).saturating_mul(n.into()))
128
18
			.saturating_add(T::DbWeight::get().reads(4_u64))
129
18
			.saturating_add(T::DbWeight::get().writes(2_u64))
130
18
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
131
18
	}
132
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
133
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
134
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
135
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
136
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
137
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
138
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
139
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
140
	/// Storage: `MessageQueue::Pages` (r:0 w:100)
141
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
142
	/// The range of component `n` is `[0, 100]`.
143
32
	fn enqueue_n_full_pages(n: u32, ) -> Weight {
144
		// Proof Size summary in bytes:
145
		//  Measured:  `150`
146
		//  Estimated: `5487`
147
		// Minimum execution time: 16_685_000 picoseconds.
148
32
		Weight::from_parts(34_017_387, 5487)
149
			// Standard Error: 24_515
150
32
			.saturating_add(Weight::from_parts(60_450_535, 0).saturating_mul(n.into()))
151
32
			.saturating_add(T::DbWeight::get().reads(4_u64))
152
32
			.saturating_add(T::DbWeight::get().writes(2_u64))
153
32
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
154
32
	}
155
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
156
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `Measured`)
157
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
158
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `Measured`)
159
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
160
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `Measured`)
161
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
162
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `Measured`)
163
1
	fn enqueue_1000_small_xcmp_messages() -> Weight {
164
		// Proof Size summary in bytes:
165
		//  Measured:  `33062`
166
		//  Estimated: `36527`
167
		// Minimum execution time: 256_704_000 picoseconds.
168
1
		Weight::from_parts(261_164_000, 36527)
169
1
			.saturating_add(T::DbWeight::get().reads(4_u64))
170
1
			.saturating_add(T::DbWeight::get().writes(2_u64))
171
1
	}
172
	/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
173
	/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
174
	fn suspend_channel() -> Weight {
175
		// Proof Size summary in bytes:
176
		//  Measured:  `109`
177
		//  Estimated: `2767`
178
		// Minimum execution time: 4_022_000 picoseconds.
179
		Weight::from_parts(4_117_000, 2767)
180
			.saturating_add(T::DbWeight::get().reads(1_u64))
181
			.saturating_add(T::DbWeight::get().writes(1_u64))
182
	}
183
	/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
184
	/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
185
	fn resume_channel() -> Weight {
186
		// Proof Size summary in bytes:
187
		//  Measured:  `144`
188
		//  Estimated: `2767`
189
		// Minimum execution time: 5_353_000 picoseconds.
190
		Weight::from_parts(5_536_000, 2767)
191
			.saturating_add(T::DbWeight::get().reads(1_u64))
192
			.saturating_add(T::DbWeight::get().writes(1_u64))
193
	}
194
4
	fn take_first_concatenated_xcm() -> Weight {
195
		// Proof Size summary in bytes:
196
		//  Measured:  `0`
197
		//  Estimated: `0`
198
		// Minimum execution time: 8_221_000 picoseconds.
199
4
		Weight::from_parts(8_333_000, 0)
200
4
	}
201
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
202
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
203
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
204
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
205
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
206
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
207
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
208
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
209
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
210
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
211
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
212
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
213
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
214
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
215
103
	fn on_idle_good_msg() -> Weight {
216
		// Proof Size summary in bytes:
217
		//  Measured:  `65744`
218
		//  Estimated: `69209`
219
		// Minimum execution time: 135_829_000 picoseconds.
220
103
		Weight::from_parts(141_582_000, 69209)
221
103
			.saturating_add(T::DbWeight::get().reads(6_u64))
222
103
			.saturating_add(T::DbWeight::get().writes(5_u64))
223
103
	}
224
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
225
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
226
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
227
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
228
103
	fn on_idle_large_msg() -> Weight {
229
		// Proof Size summary in bytes:
230
		//  Measured:  `65743`
231
		//  Estimated: `69208`
232
		// Minimum execution time: 63_643_000 picoseconds.
233
103
		Weight::from_parts(68_923_000, 69208)
234
103
			.saturating_add(T::DbWeight::get().reads(2_u64))
235
103
			.saturating_add(T::DbWeight::get().writes(2_u64))
236
103
	}
237
}