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/moonriver-runtime/moonriver_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/moonriver/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_634_000 picoseconds.
60
		Weight::from_parts(14_262_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
32
	fn ready_ring_unknit() -> Weight {
69
32
		// Proof Size summary in bytes:
70
32
		//  Measured:  `218`
71
32
		//  Estimated: `6044`
72
32
		// Minimum execution time: 12_193_000 picoseconds.
73
32
		Weight::from_parts(12_738_000, 6044)
74
32
			.saturating_add(T::DbWeight::get().reads(3_u64))
75
32
			.saturating_add(T::DbWeight::get().writes(3_u64))
76
32
	}
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
32
	fn service_queue_base() -> Weight {
84
32
		// Proof Size summary in bytes:
85
32
		//  Measured:  `190`
86
32
		//  Estimated: `3517`
87
32
		// Minimum execution time: 8_774_000 picoseconds.
88
32
		Weight::from_parts(9_298_000, 3517)
89
32
			.saturating_add(T::DbWeight::get().reads(3_u64))
90
32
			.saturating_add(T::DbWeight::get().writes(1_u64))
91
32
	}
92
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
93
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
94
32
	fn service_page_base_completion() -> Weight {
95
32
		// Proof Size summary in bytes:
96
32
		//  Measured:  `72`
97
32
		//  Estimated: `108986`
98
32
		// Minimum execution time: 6_510_000 picoseconds.
99
32
		Weight::from_parts(6_690_000, 108986)
100
32
			.saturating_add(T::DbWeight::get().reads(1_u64))
101
32
			.saturating_add(T::DbWeight::get().writes(1_u64))
102
32
	}
103
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
104
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
105
32
	fn service_page_base_no_completion() -> Weight {
106
32
		// Proof Size summary in bytes:
107
32
		//  Measured:  `72`
108
32
		//  Estimated: `108986`
109
32
		// Minimum execution time: 6_599_000 picoseconds.
110
32
		Weight::from_parts(6_802_000, 108986)
111
32
			.saturating_add(T::DbWeight::get().reads(1_u64))
112
32
			.saturating_add(T::DbWeight::get().writes(1_u64))
113
32
	}
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
32
	fn service_page_item() -> Weight {
119
32
		// Proof Size summary in bytes:
120
32
		//  Measured:  `0`
121
32
		//  Estimated: `0`
122
32
		// Minimum execution time: 239_426_000 picoseconds.
123
32
		Weight::from_parts(242_123_000, 0)
124
32
			.saturating_add(T::DbWeight::get().writes(2_u64))
125
32
	}
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
64
	fn bump_service_head() -> Weight {
131
64
		// Proof Size summary in bytes:
132
64
		//  Measured:  `171`
133
64
		//  Estimated: `3517`
134
64
		// Minimum execution time: 7_836_000 picoseconds.
135
64
		Weight::from_parts(8_106_000, 3517)
136
64
			.saturating_add(T::DbWeight::get().reads(2_u64))
137
64
			.saturating_add(T::DbWeight::get().writes(1_u64))
138
64
	}
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_806_000 picoseconds.
148
		Weight::from_parts(78_776_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: 156_618_000 picoseconds.
165
		Weight::from_parts(161_164_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: 211_699_000 picoseconds.
182
		Weight::from_parts(215_614_000, 108986)
183
			.saturating_add(T::DbWeight::get().reads(4_u64))
184
			.saturating_add(T::DbWeight::get().writes(2_u64))
185
	}
186
}