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 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=pallet_message_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 `pallet_message_queue`.
51
pub struct WeightInfo<T>(PhantomData<T>);
52
impl<T: frame_system::Config> pallet_message_queue::WeightInfo for WeightInfo<T> {
53
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
54
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
55
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
56
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
57
	fn ready_ring_knit() -> Weight {
58
		// Proof Size summary in bytes:
59
		//  Measured:  `223`
60
		//  Estimated: `6044`
61
		// Minimum execution time: 12_601_000 picoseconds.
62
		Weight::from_parts(13_037_000, 6044)
63
			.saturating_add(T::DbWeight::get().reads(3_u64))
64
			.saturating_add(T::DbWeight::get().writes(2_u64))
65
	}
66
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
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
27
	fn ready_ring_unknit() -> Weight {
71
27
		// Proof Size summary in bytes:
72
27
		//  Measured:  `218`
73
27
		//  Estimated: `6044`
74
27
		// Minimum execution time: 11_397_000 picoseconds.
75
27
		Weight::from_parts(11_860_000, 6044)
76
27
			.saturating_add(T::DbWeight::get().reads(3_u64))
77
27
			.saturating_add(T::DbWeight::get().writes(3_u64))
78
27
	}
79
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
80
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
81
	/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
82
	/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
83
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
84
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
85
27
	fn service_queue_base() -> Weight {
86
27
		// Proof Size summary in bytes:
87
27
		//  Measured:  `190`
88
27
		//  Estimated: `3517`
89
27
		// Minimum execution time: 8_258_000 picoseconds.
90
27
		Weight::from_parts(8_800_000, 3517)
91
27
			.saturating_add(T::DbWeight::get().reads(3_u64))
92
27
			.saturating_add(T::DbWeight::get().writes(1_u64))
93
27
	}
94
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
95
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
96
26
	fn service_page_base_completion() -> Weight {
97
26
		// Proof Size summary in bytes:
98
26
		//  Measured:  `72`
99
26
		//  Estimated: `108986`
100
26
		// Minimum execution time: 6_014_000 picoseconds.
101
26
		Weight::from_parts(6_243_000, 108986)
102
26
			.saturating_add(T::DbWeight::get().reads(1_u64))
103
26
			.saturating_add(T::DbWeight::get().writes(1_u64))
104
26
	}
105
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
106
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
107
26
	fn service_page_base_no_completion() -> Weight {
108
26
		// Proof Size summary in bytes:
109
26
		//  Measured:  `72`
110
26
		//  Estimated: `108986`
111
26
		// Minimum execution time: 6_139_000 picoseconds.
112
26
		Weight::from_parts(6_328_000, 108986)
113
26
			.saturating_add(T::DbWeight::get().reads(1_u64))
114
26
			.saturating_add(T::DbWeight::get().writes(1_u64))
115
26
	}
116
	/// Storage: `MessageQueue::BookStateFor` (r:0 w:1)
117
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
118
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
119
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
120
26
	fn service_page_item() -> Weight {
121
26
		// Proof Size summary in bytes:
122
26
		//  Measured:  `0`
123
26
		//  Estimated: `0`
124
26
		// Minimum execution time: 258_061_000 picoseconds.
125
26
		Weight::from_parts(261_469_000, 0)
126
26
			.saturating_add(T::DbWeight::get().writes(2_u64))
127
26
	}
128
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
129
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
130
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
131
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
132
50
	fn bump_service_head() -> Weight {
133
50
		// Proof Size summary in bytes:
134
50
		//  Measured:  `171`
135
50
		//  Estimated: `3517`
136
50
		// Minimum execution time: 7_272_000 picoseconds.
137
50
		Weight::from_parts(7_610_000, 3517)
138
50
			.saturating_add(T::DbWeight::get().reads(2_u64))
139
50
			.saturating_add(T::DbWeight::get().writes(1_u64))
140
50
	}
141
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
142
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
143
	/// Storage: `MessageQueue::ServiceHead` (r:0 w:1)
144
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
145
	fn set_service_head() -> Weight {
146
		// Proof Size summary in bytes:
147
		//  Measured:  `161`
148
		//  Estimated: `3517`
149
		// Minimum execution time: 5_861_000 picoseconds.
150
		Weight::from_parts(6_159_000, 3517)
151
			.saturating_add(T::DbWeight::get().reads(1_u64))
152
			.saturating_add(T::DbWeight::get().writes(1_u64))
153
	}
154
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
155
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
156
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
157
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
158
	fn reap_page() -> Weight {
159
		// Proof Size summary in bytes:
160
		//  Measured:  `105609`
161
		//  Estimated: `108986`
162
		// Minimum execution time: 85_589_000 picoseconds.
163
		Weight::from_parts(86_408_000, 108986)
164
			.saturating_add(T::DbWeight::get().reads(2_u64))
165
			.saturating_add(T::DbWeight::get().writes(2_u64))
166
	}
167
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
168
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
169
	/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
170
	/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
171
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
172
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
173
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
174
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
175
	fn execute_overweight_page_removed() -> Weight {
176
		// Proof Size summary in bytes:
177
		//  Measured:  `105793`
178
		//  Estimated: `108986`
179
		// Minimum execution time: 159_534_000 picoseconds.
180
		Weight::from_parts(160_808_000, 108986)
181
			.saturating_add(T::DbWeight::get().reads(4_u64))
182
			.saturating_add(T::DbWeight::get().writes(2_u64))
183
	}
184
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
185
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
186
	/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
187
	/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
188
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
189
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
190
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
191
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
192
	fn execute_overweight_page_updated() -> Weight {
193
		// Proof Size summary in bytes:
194
		//  Measured:  `105793`
195
		//  Estimated: `108986`
196
		// Minimum execution time: 220_369_000 picoseconds.
197
		Weight::from_parts(223_258_000, 108986)
198
			.saturating_add(T::DbWeight::get().reads(4_u64))
199
			.saturating_add(T::DbWeight::get().writes(2_u64))
200
	}
201
}