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-10-10, 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("moonbase-dev"), DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --chain=moonbase-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/common/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: 10_809_000 picoseconds.
58
		Weight::from_parts(11_213_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
88
	fn ready_ring_unknit() -> Weight {
67
88
		// Proof Size summary in bytes:
68
88
		//  Measured:  `218`
69
88
		//  Estimated: `6044`
70
88
		// Minimum execution time: 9_673_000 picoseconds.
71
88
		Weight::from_parts(9_980_000, 6044)
72
88
			.saturating_add(T::DbWeight::get().reads(3_u64))
73
88
			.saturating_add(T::DbWeight::get().writes(3_u64))
74
88
	}
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
88
	fn service_queue_base() -> Weight {
82
88
		// Proof Size summary in bytes:
83
88
		//  Measured:  `190`
84
88
		//  Estimated: `3517`
85
88
		// Minimum execution time: 7_018_000 picoseconds.
86
88
		Weight::from_parts(7_286_000, 3517)
87
88
			.saturating_add(T::DbWeight::get().reads(3_u64))
88
88
			.saturating_add(T::DbWeight::get().writes(1_u64))
89
88
	}
90
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
91
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
92
88
	fn service_page_base_completion() -> Weight {
93
88
		// Proof Size summary in bytes:
94
88
		//  Measured:  `72`
95
88
		//  Estimated: `108986`
96
88
		// Minimum execution time: 5_249_000 picoseconds.
97
88
		Weight::from_parts(5_392_000, 108986)
98
88
			.saturating_add(T::DbWeight::get().reads(1_u64))
99
88
			.saturating_add(T::DbWeight::get().writes(1_u64))
100
88
	}
101
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
102
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
103
88
	fn service_page_base_no_completion() -> Weight {
104
88
		// Proof Size summary in bytes:
105
88
		//  Measured:  `72`
106
88
		//  Estimated: `108986`
107
88
		// Minimum execution time: 5_348_000 picoseconds.
108
88
		Weight::from_parts(5_566_000, 108986)
109
88
			.saturating_add(T::DbWeight::get().reads(1_u64))
110
88
			.saturating_add(T::DbWeight::get().writes(1_u64))
111
88
	}
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
88
	fn service_page_item() -> Weight {
117
88
		// Proof Size summary in bytes:
118
88
		//  Measured:  `0`
119
88
		//  Estimated: `0`
120
88
		// Minimum execution time: 241_399_000 picoseconds.
121
88
		Weight::from_parts(243_802_000, 0)
122
88
			.saturating_add(T::DbWeight::get().writes(2_u64))
123
88
	}
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
176
	fn bump_service_head() -> Weight {
129
176
		// Proof Size summary in bytes:
130
176
		//  Measured:  `171`
131
176
		//  Estimated: `3517`
132
176
		// Minimum execution time: 6_094_000 picoseconds.
133
176
		Weight::from_parts(6_315_000, 3517)
134
176
			.saturating_add(T::DbWeight::get().reads(2_u64))
135
176
			.saturating_add(T::DbWeight::get().writes(1_u64))
136
176
	}
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_007_000 picoseconds.
146
		Weight::from_parts(71_779_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: 152_333_000 picoseconds.
163
		Weight::from_parts(153_402_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: 208_593_000 picoseconds.
180
		Weight::from_parts(210_523_000, 108986)
181
			.saturating_add(T::DbWeight::get().reads(4_u64))
182
			.saturating_add(T::DbWeight::get().writes(2_u64))
183
	}
184
}