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 `pallet_message_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/moonbeam-runtime/moonbeam_runtime.wasm
32
// --genesis-builder=runtime
33
// --genesis-builder-preset=development
34
// --steps=50
35
// --repeat=20
36
// --pallet=pallet_message_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/moonbeam/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 `pallet_message_queue`.
52
pub struct WeightInfo<T>(PhantomData<T>);
53
impl<T: frame_system::Config> pallet_message_queue::WeightInfo for WeightInfo<T> {
54
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
55
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
56
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
57
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
58
	fn ready_ring_knit() -> Weight {
59
		// Proof Size summary in bytes:
60
		//  Measured:  `223`
61
		//  Estimated: `6044`
62
		// Minimum execution time: 13_176_000 picoseconds.
63
		Weight::from_parts(14_117_000, 6044)
64
			.saturating_add(T::DbWeight::get().reads(3_u64))
65
			.saturating_add(T::DbWeight::get().writes(2_u64))
66
	}
67
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
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
31
	fn ready_ring_unknit() -> Weight {
72
		// Proof Size summary in bytes:
73
		//  Measured:  `218`
74
		//  Estimated: `6044`
75
		// Minimum execution time: 11_886_000 picoseconds.
76
31
		Weight::from_parts(12_561_000, 6044)
77
31
			.saturating_add(T::DbWeight::get().reads(3_u64))
78
31
			.saturating_add(T::DbWeight::get().writes(3_u64))
79
31
	}
80
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
81
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
82
	/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
83
	/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
84
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
85
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
86
31
	fn service_queue_base() -> Weight {
87
		// Proof Size summary in bytes:
88
		//  Measured:  `190`
89
		//  Estimated: `3517`
90
		// Minimum execution time: 9_044_000 picoseconds.
91
31
		Weight::from_parts(9_337_000, 3517)
92
31
			.saturating_add(T::DbWeight::get().reads(3_u64))
93
31
			.saturating_add(T::DbWeight::get().writes(1_u64))
94
31
	}
95
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
96
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
97
30
	fn service_page_base_completion() -> Weight {
98
		// Proof Size summary in bytes:
99
		//  Measured:  `72`
100
		//  Estimated: `108986`
101
		// Minimum execution time: 6_579_000 picoseconds.
102
30
		Weight::from_parts(6_974_000, 108986)
103
30
			.saturating_add(T::DbWeight::get().reads(1_u64))
104
30
			.saturating_add(T::DbWeight::get().writes(1_u64))
105
30
	}
106
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
107
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
108
30
	fn service_page_base_no_completion() -> Weight {
109
		// Proof Size summary in bytes:
110
		//  Measured:  `72`
111
		//  Estimated: `108986`
112
		// Minimum execution time: 6_674_000 picoseconds.
113
30
		Weight::from_parts(7_036_000, 108986)
114
30
			.saturating_add(T::DbWeight::get().reads(1_u64))
115
30
			.saturating_add(T::DbWeight::get().writes(1_u64))
116
30
	}
117
	/// Storage: `MessageQueue::BookStateFor` (r:0 w:1)
118
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
119
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
120
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
121
30
	fn service_page_item() -> Weight {
122
		// Proof Size summary in bytes:
123
		//  Measured:  `0`
124
		//  Estimated: `0`
125
		// Minimum execution time: 259_390_000 picoseconds.
126
30
		Weight::from_parts(267_931_000, 0)
127
30
			.saturating_add(T::DbWeight::get().writes(2_u64))
128
30
	}
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: `MessageQueue::BookStateFor` (r:1 w:0)
132
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
133
58
	fn bump_service_head() -> Weight {
134
		// Proof Size summary in bytes:
135
		//  Measured:  `171`
136
		//  Estimated: `3517`
137
		// Minimum execution time: 7_397_000 picoseconds.
138
58
		Weight::from_parts(7_687_000, 3517)
139
58
			.saturating_add(T::DbWeight::get().reads(2_u64))
140
58
			.saturating_add(T::DbWeight::get().writes(1_u64))
141
58
	}
142
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
143
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
144
	/// Storage: `MessageQueue::ServiceHead` (r:0 w:1)
145
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
146
	fn set_service_head() -> Weight {
147
		// Proof Size summary in bytes:
148
		//  Measured:  `161`
149
		//  Estimated: `3517`
150
		// Minimum execution time: 6_024_000 picoseconds.
151
		Weight::from_parts(6_489_000, 3517)
152
			.saturating_add(T::DbWeight::get().reads(1_u64))
153
			.saturating_add(T::DbWeight::get().writes(1_u64))
154
	}
155
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
156
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
157
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
158
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
159
	fn reap_page() -> Weight {
160
		// Proof Size summary in bytes:
161
		//  Measured:  `105609`
162
		//  Estimated: `108986`
163
		// Minimum execution time: 84_141_000 picoseconds.
164
		Weight::from_parts(85_450_000, 108986)
165
			.saturating_add(T::DbWeight::get().reads(2_u64))
166
			.saturating_add(T::DbWeight::get().writes(2_u64))
167
	}
168
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
169
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
170
	/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
171
	/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
172
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
173
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
174
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
175
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
176
	fn execute_overweight_page_removed() -> Weight {
177
		// Proof Size summary in bytes:
178
		//  Measured:  `105793`
179
		//  Estimated: `108986`
180
		// Minimum execution time: 163_453_000 picoseconds.
181
		Weight::from_parts(173_670_000, 108986)
182
			.saturating_add(T::DbWeight::get().reads(4_u64))
183
			.saturating_add(T::DbWeight::get().writes(2_u64))
184
	}
185
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
186
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
187
	/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
188
	/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
189
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
190
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
191
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
192
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
193
	fn execute_overweight_page_updated() -> Weight {
194
		// Proof Size summary in bytes:
195
		//  Measured:  `105793`
196
		//  Estimated: `108986`
197
		// Minimum execution time: 222_577_000 picoseconds.
198
		Weight::from_parts(228_289_000, 108986)
199
			.saturating_add(T::DbWeight::get().reads(4_u64))
200
			.saturating_add(T::DbWeight::get().writes(2_u64))
201
	}
202
}