1
// Copyright 2024 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
//! Autogenerated weights for `pallet_message_queue`
18
//!
19
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
20
//! DATE: 2025-02-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21
//! WORST CASE MAP SIZE: `1000000`
22
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
23
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --runtime=./target/production/wbuild/moonbeam-runtime/moonbeam_runtime.wasm
30
// --genesis-builder=runtime
31
// --genesis-builder-preset=development
32
// --steps=50
33
// --repeat=20
34
// --pallet=pallet_message_queue
35
// --extrinsic=*
36
// --wasm-execution=compiled
37
// --header=./file_header.txt
38
// --template=./benchmarking/frame-weight-template.hbs
39
// --output=./runtime/moonbeam/src/weights/
40

            
41
#![cfg_attr(rustfmt, rustfmt_skip)]
42
#![allow(unused_parens)]
43
#![allow(unused_imports)]
44

            
45
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
46
use sp_std::marker::PhantomData;
47

            
48
/// Weights for `pallet_message_queue`.
49
pub struct WeightInfo<T>(PhantomData<T>);
50
impl<T: frame_system::Config> pallet_message_queue::WeightInfo for WeightInfo<T> {
51
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
52
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
53
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
54
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
55
	fn ready_ring_knit() -> Weight {
56
		// Proof Size summary in bytes:
57
		//  Measured:  `223`
58
		//  Estimated: `6044`
59
		// Minimum execution time: 13_505_000 picoseconds.
60
		Weight::from_parts(13_977_000, 6044)
61
			.saturating_add(T::DbWeight::get().reads(3_u64))
62
			.saturating_add(T::DbWeight::get().writes(2_u64))
63
	}
64
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
65
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
66
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
67
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
68
24
	fn ready_ring_unknit() -> Weight {
69
24
		// Proof Size summary in bytes:
70
24
		//  Measured:  `218`
71
24
		//  Estimated: `6044`
72
24
		// Minimum execution time: 12_385_000 picoseconds.
73
24
		Weight::from_parts(12_841_000, 6044)
74
24
			.saturating_add(T::DbWeight::get().reads(3_u64))
75
24
			.saturating_add(T::DbWeight::get().writes(3_u64))
76
24
	}
77
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
78
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
79
	/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
80
	/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
81
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
82
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
83
24
	fn service_queue_base() -> Weight {
84
24
		// Proof Size summary in bytes:
85
24
		//  Measured:  `190`
86
24
		//  Estimated: `3517`
87
24
		// Minimum execution time: 8_885_000 picoseconds.
88
24
		Weight::from_parts(9_271_000, 3517)
89
24
			.saturating_add(T::DbWeight::get().reads(3_u64))
90
24
			.saturating_add(T::DbWeight::get().writes(1_u64))
91
24
	}
92
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
93
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
94
24
	fn service_page_base_completion() -> Weight {
95
24
		// Proof Size summary in bytes:
96
24
		//  Measured:  `72`
97
24
		//  Estimated: `108986`
98
24
		// Minimum execution time: 6_345_000 picoseconds.
99
24
		Weight::from_parts(6_608_000, 108986)
100
24
			.saturating_add(T::DbWeight::get().reads(1_u64))
101
24
			.saturating_add(T::DbWeight::get().writes(1_u64))
102
24
	}
103
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
104
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
105
24
	fn service_page_base_no_completion() -> Weight {
106
24
		// Proof Size summary in bytes:
107
24
		//  Measured:  `72`
108
24
		//  Estimated: `108986`
109
24
		// Minimum execution time: 6_581_000 picoseconds.
110
24
		Weight::from_parts(6_944_000, 108986)
111
24
			.saturating_add(T::DbWeight::get().reads(1_u64))
112
24
			.saturating_add(T::DbWeight::get().writes(1_u64))
113
24
	}
114
	/// Storage: `MessageQueue::BookStateFor` (r:0 w:1)
115
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
116
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
117
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
118
24
	fn service_page_item() -> Weight {
119
24
		// Proof Size summary in bytes:
120
24
		//  Measured:  `0`
121
24
		//  Estimated: `0`
122
24
		// Minimum execution time: 240_132_000 picoseconds.
123
24
		Weight::from_parts(242_092_000, 0)
124
24
			.saturating_add(T::DbWeight::get().writes(2_u64))
125
24
	}
126
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
127
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
128
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
129
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
130
48
	fn bump_service_head() -> Weight {
131
48
		// Proof Size summary in bytes:
132
48
		//  Measured:  `171`
133
48
		//  Estimated: `3517`
134
48
		// Minimum execution time: 8_040_000 picoseconds.
135
48
		Weight::from_parts(8_220_000, 3517)
136
48
			.saturating_add(T::DbWeight::get().reads(2_u64))
137
48
			.saturating_add(T::DbWeight::get().writes(1_u64))
138
48
	}
139
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
140
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
141
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
142
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
143
	fn reap_page() -> Weight {
144
		// Proof Size summary in bytes:
145
		//  Measured:  `105609`
146
		//  Estimated: `108986`
147
		// Minimum execution time: 76_906_000 picoseconds.
148
		Weight::from_parts(79_060_000, 108986)
149
			.saturating_add(T::DbWeight::get().reads(2_u64))
150
			.saturating_add(T::DbWeight::get().writes(2_u64))
151
	}
152
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
153
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
154
	/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
155
	/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
156
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
157
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
158
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
159
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
160
	fn execute_overweight_page_removed() -> Weight {
161
		// Proof Size summary in bytes:
162
		//  Measured:  `105793`
163
		//  Estimated: `108986`
164
		// Minimum execution time: 160_430_000 picoseconds.
165
		Weight::from_parts(163_220_000, 108986)
166
			.saturating_add(T::DbWeight::get().reads(4_u64))
167
			.saturating_add(T::DbWeight::get().writes(2_u64))
168
	}
169
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
170
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
171
	/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
172
	/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
173
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
174
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
175
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
176
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
177
	fn execute_overweight_page_updated() -> Weight {
178
		// Proof Size summary in bytes:
179
		//  Measured:  `105793`
180
		//  Estimated: `108986`
181
		// Minimum execution time: 213_334_000 picoseconds.
182
		Weight::from_parts(217_916_000, 108986)
183
			.saturating_add(T::DbWeight::get().reads(4_u64))
184
			.saturating_add(T::DbWeight::get().writes(2_u64))
185
	}
186
}