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 48.0.0
21
//! DATE: 2025-09-02, 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/moonbeam-runtime/moonbeam_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/moonbeam/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: 4_929_000 picoseconds.
60
		Weight::from_parts(5_209_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 `[1, 105467]`.
75
	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: 12_594_000 picoseconds.
80
		Weight::from_parts(9_072_477, 5487)
81
			// Standard Error: 5
82
			.saturating_add(Weight::from_parts(921, 0).saturating_mul(n.into()))
83
			.saturating_add(T::DbWeight::get().reads(4_u64))
84
			.saturating_add(T::DbWeight::get().writes(3_u64))
85
	}
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
	fn enqueue_2_empty_xcmp_messages() -> Weight {
97
		// Proof Size summary in bytes:
98
		//  Measured:  `148`
99
		//  Estimated: `5487`
100
		// Minimum execution time: 20_732_000 picoseconds.
101
		Weight::from_parts(21_117_000, 5487)
102
			.saturating_add(T::DbWeight::get().reads(4_u64))
103
			.saturating_add(T::DbWeight::get().writes(3_u64))
104
	}
105
	/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
106
	/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
107
	fn suspend_channel() -> Weight {
108
		// Proof Size summary in bytes:
109
		//  Measured:  `142`
110
		//  Estimated: `2767`
111
		// Minimum execution time: 3_167_000 picoseconds.
112
		Weight::from_parts(3_366_000, 2767)
113
			.saturating_add(T::DbWeight::get().reads(1_u64))
114
			.saturating_add(T::DbWeight::get().writes(1_u64))
115
	}
116
	/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
117
	/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
118
	fn resume_channel() -> Weight {
119
		// Proof Size summary in bytes:
120
		//  Measured:  `177`
121
		//  Estimated: `2767`
122
		// Minimum execution time: 4_474_000 picoseconds.
123
		Weight::from_parts(4_676_000, 2767)
124
			.saturating_add(T::DbWeight::get().reads(1_u64))
125
			.saturating_add(T::DbWeight::get().writes(1_u64))
126
	}
127
	fn take_first_concatenated_xcm() -> Weight {
128
		// Proof Size summary in bytes:
129
		//  Measured:  `0`
130
		//  Estimated: `0`
131
		// Minimum execution time: 5_263_000 picoseconds.
132
		Weight::from_parts(5_416_000, 0)
133
	}
134
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
135
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
136
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
137
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
138
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
139
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
140
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
141
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
142
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
143
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
144
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
145
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
146
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
147
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
148
7
	fn on_idle_good_msg() -> Weight {
149
7
		// Proof Size summary in bytes:
150
7
		//  Measured:  `105713`
151
7
		//  Estimated: `109178`
152
7
		// Minimum execution time: 175_952_000 picoseconds.
153
7
		Weight::from_parts(178_979_000, 109178)
154
7
			.saturating_add(T::DbWeight::get().reads(6_u64))
155
7
			.saturating_add(T::DbWeight::get().writes(5_u64))
156
7
	}
157
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
158
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
159
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
160
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
161
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
162
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
163
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
164
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
165
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
166
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
167
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
168
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
169
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
170
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
171
7
	fn on_idle_large_msg() -> Weight {
172
7
		// Proof Size summary in bytes:
173
7
		//  Measured:  `65782`
174
7
		//  Estimated: `69247`
175
7
		// Minimum execution time: 115_089_000 picoseconds.
176
7
		Weight::from_parts(117_013_000, 69247)
177
7
			.saturating_add(T::DbWeight::get().reads(6_u64))
178
7
			.saturating_add(T::DbWeight::get().writes(5_u64))
179
7
	}
180
}