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 42.0.0
20
//! DATE: 2024-11-12, 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: Some("moonbeam-dev"), DB CACHE: 1024
24

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

            
39
#![cfg_attr(rustfmt, rustfmt_skip)]
40
#![allow(unused_parens)]
41
#![allow(unused_imports)]
42

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

            
46
/// Weights for `pallet_message_queue`.
47
pub struct WeightInfo<T>(PhantomData<T>);
48
impl<T: frame_system::Config> pallet_message_queue::WeightInfo for WeightInfo<T> {
49
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
50
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
51
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
52
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
53
	fn ready_ring_knit() -> Weight {
54
		// Proof Size summary in bytes:
55
		//  Measured:  `223`
56
		//  Estimated: `6044`
57
		// Minimum execution time: 11_439_000 picoseconds.
58
		Weight::from_parts(11_849_000, 6044)
59
			.saturating_add(T::DbWeight::get().reads(3_u64))
60
			.saturating_add(T::DbWeight::get().writes(2_u64))
61
	}
62
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
63
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
64
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
65
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
66
24
	fn ready_ring_unknit() -> Weight {
67
24
		// Proof Size summary in bytes:
68
24
		//  Measured:  `218`
69
24
		//  Estimated: `6044`
70
24
		// Minimum execution time: 10_174_000 picoseconds.
71
24
		Weight::from_parts(10_526_000, 6044)
72
24
			.saturating_add(T::DbWeight::get().reads(3_u64))
73
24
			.saturating_add(T::DbWeight::get().writes(3_u64))
74
24
	}
75
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
76
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
77
	/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
78
	/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
79
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
80
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
81
24
	fn service_queue_base() -> Weight {
82
24
		// Proof Size summary in bytes:
83
24
		//  Measured:  `190`
84
24
		//  Estimated: `3517`
85
24
		// Minimum execution time: 7_249_000 picoseconds.
86
24
		Weight::from_parts(7_501_000, 3517)
87
24
			.saturating_add(T::DbWeight::get().reads(3_u64))
88
24
			.saturating_add(T::DbWeight::get().writes(1_u64))
89
24
	}
90
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
91
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
92
24
	fn service_page_base_completion() -> Weight {
93
24
		// Proof Size summary in bytes:
94
24
		//  Measured:  `72`
95
24
		//  Estimated: `108986`
96
24
		// Minimum execution time: 5_365_000 picoseconds.
97
24
		Weight::from_parts(5_513_000, 108986)
98
24
			.saturating_add(T::DbWeight::get().reads(1_u64))
99
24
			.saturating_add(T::DbWeight::get().writes(1_u64))
100
24
	}
101
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
102
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
103
24
	fn service_page_base_no_completion() -> Weight {
104
24
		// Proof Size summary in bytes:
105
24
		//  Measured:  `72`
106
24
		//  Estimated: `108986`
107
24
		// Minimum execution time: 5_521_000 picoseconds.
108
24
		Weight::from_parts(5_710_000, 108986)
109
24
			.saturating_add(T::DbWeight::get().reads(1_u64))
110
24
			.saturating_add(T::DbWeight::get().writes(1_u64))
111
24
	}
112
	/// Storage: `MessageQueue::BookStateFor` (r:0 w:1)
113
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
114
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
115
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
116
24
	fn service_page_item() -> Weight {
117
24
		// Proof Size summary in bytes:
118
24
		//  Measured:  `0`
119
24
		//  Estimated: `0`
120
24
		// Minimum execution time: 237_081_000 picoseconds.
121
24
		Weight::from_parts(240_751_000, 0)
122
24
			.saturating_add(T::DbWeight::get().writes(2_u64))
123
24
	}
124
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
125
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
126
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
127
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
128
48
	fn bump_service_head() -> Weight {
129
48
		// Proof Size summary in bytes:
130
48
		//  Measured:  `171`
131
48
		//  Estimated: `3517`
132
48
		// Minimum execution time: 6_234_000 picoseconds.
133
48
		Weight::from_parts(6_410_000, 3517)
134
48
			.saturating_add(T::DbWeight::get().reads(2_u64))
135
48
			.saturating_add(T::DbWeight::get().writes(1_u64))
136
48
	}
137
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
138
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
139
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
140
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
141
	fn reap_page() -> Weight {
142
		// Proof Size summary in bytes:
143
		//  Measured:  `105609`
144
		//  Estimated: `108986`
145
		// Minimum execution time: 70_213_000 picoseconds.
146
		Weight::from_parts(72_380_000, 108986)
147
			.saturating_add(T::DbWeight::get().reads(2_u64))
148
			.saturating_add(T::DbWeight::get().writes(2_u64))
149
	}
150
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
151
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
152
	/// Storage: `EmergencyParaXcm::Mode` (r:1 w:0)
153
	/// Proof: `EmergencyParaXcm::Mode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
154
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
155
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
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 execute_overweight_page_removed() -> Weight {
159
		// Proof Size summary in bytes:
160
		//  Measured:  `105793`
161
		//  Estimated: `108986`
162
		// Minimum execution time: 149_360_000 picoseconds.
163
		Weight::from_parts(151_383_000, 108986)
164
			.saturating_add(T::DbWeight::get().reads(4_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_updated() -> Weight {
176
		// Proof Size summary in bytes:
177
		//  Measured:  `105793`
178
		//  Estimated: `108986`
179
		// Minimum execution time: 201_210_000 picoseconds.
180
		Weight::from_parts(205_529_000, 108986)
181
			.saturating_add(T::DbWeight::get().reads(4_u64))
182
			.saturating_add(T::DbWeight::get().writes(2_u64))
183
	}
184
}