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

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --chain=moonriver-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/moonriver/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_921_000 picoseconds.
58
		Weight::from_parts(11_321_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
32
	fn ready_ring_unknit() -> Weight {
67
32
		// Proof Size summary in bytes:
68
32
		//  Measured:  `218`
69
32
		//  Estimated: `6044`
70
32
		// Minimum execution time: 9_601_000 picoseconds.
71
32
		Weight::from_parts(10_051_000, 6044)
72
32
			.saturating_add(T::DbWeight::get().reads(3_u64))
73
32
			.saturating_add(T::DbWeight::get().writes(3_u64))
74
32
	}
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
32
	fn service_queue_base() -> Weight {
82
32
		// Proof Size summary in bytes:
83
32
		//  Measured:  `190`
84
32
		//  Estimated: `3517`
85
32
		// Minimum execution time: 6_834_000 picoseconds.
86
32
		Weight::from_parts(7_162_000, 3517)
87
32
			.saturating_add(T::DbWeight::get().reads(3_u64))
88
32
			.saturating_add(T::DbWeight::get().writes(1_u64))
89
32
	}
90
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
91
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
92
32
	fn service_page_base_completion() -> Weight {
93
32
		// Proof Size summary in bytes:
94
32
		//  Measured:  `72`
95
32
		//  Estimated: `108986`
96
32
		// Minimum execution time: 5_254_000 picoseconds.
97
32
		Weight::from_parts(5_496_000, 108986)
98
32
			.saturating_add(T::DbWeight::get().reads(1_u64))
99
32
			.saturating_add(T::DbWeight::get().writes(1_u64))
100
32
	}
101
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
102
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
103
32
	fn service_page_base_no_completion() -> Weight {
104
32
		// Proof Size summary in bytes:
105
32
		//  Measured:  `72`
106
32
		//  Estimated: `108986`
107
32
		// Minimum execution time: 5_543_000 picoseconds.
108
32
		Weight::from_parts(5_669_000, 108986)
109
32
			.saturating_add(T::DbWeight::get().reads(1_u64))
110
32
			.saturating_add(T::DbWeight::get().writes(1_u64))
111
32
	}
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
32
	fn service_page_item() -> Weight {
117
32
		// Proof Size summary in bytes:
118
32
		//  Measured:  `0`
119
32
		//  Estimated: `0`
120
32
		// Minimum execution time: 237_499_000 picoseconds.
121
32
		Weight::from_parts(240_067_000, 0)
122
32
			.saturating_add(T::DbWeight::get().writes(2_u64))
123
32
	}
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
64
	fn bump_service_head() -> Weight {
129
64
		// Proof Size summary in bytes:
130
64
		//  Measured:  `171`
131
64
		//  Estimated: `3517`
132
64
		// Minimum execution time: 5_811_000 picoseconds.
133
64
		Weight::from_parts(6_062_000, 3517)
134
64
			.saturating_add(T::DbWeight::get().reads(2_u64))
135
64
			.saturating_add(T::DbWeight::get().writes(1_u64))
136
64
	}
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: 71_565_000 picoseconds.
146
		Weight::from_parts(72_586_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_202_000 picoseconds.
163
		Weight::from_parts(152_898_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: 202_284_000 picoseconds.
180
		Weight::from_parts(204_859_000, 108986)
181
			.saturating_add(T::DbWeight::get().reads(4_u64))
182
			.saturating_add(T::DbWeight::get().writes(2_u64))
183
	}
184
}