1
// Copyright (C) Moondance Labs Ltd.
2
// This file is part of Tanssi.
3

            
4
// Tanssi 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
// Tanssi 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 Tanssi.  If not, see <http://www.gnu.org/licenses/>
16

            
17

            
18
//! Autogenerated weights for pallet_message_queue
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0
21
//! DATE: 2025-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `benchmark-1`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
25

            
26
// Executed Command:
27
// target/release/container-chain-frontier-node
28
// benchmark
29
// pallet
30
// --wasm-execution=compiled
31
// --pallet
32
// pallet_message_queue
33
// --extrinsic
34
// *
35
// --chain=dev
36
// --steps
37
// 50
38
// --repeat
39
// 20
40
// --template=benchmarking/frame-weight-runtime-template.hbs
41
// --json-file
42
// raw.json
43
// --output
44
// tmp/frontier_template_weights/pallet_message_queue.rs
45

            
46
#![cfg_attr(rustfmt, rustfmt_skip)]
47
#![allow(unused_parens)]
48
#![allow(unused_imports)]
49

            
50
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
51
use core::marker::PhantomData;
52

            
53
/// Weights for pallet_message_queue using the Substrate node and recommended hardware.
54
pub struct SubstrateWeight<T>(PhantomData<T>);
55
impl<T: frame_system::Config> pallet_message_queue::WeightInfo for SubstrateWeight<T> {
56
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
57
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
58
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
59
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
60
	fn ready_ring_knit() -> Weight {
61
		// Proof Size summary in bytes:
62
		//  Measured:  `223`
63
		//  Estimated: `6044`
64
		// Minimum execution time: 16_986_000 picoseconds.
65
		Weight::from_parts(17_336_000, 6044)
66
			.saturating_add(T::DbWeight::get().reads(3_u64))
67
			.saturating_add(T::DbWeight::get().writes(2_u64))
68
	}
69
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
70
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
71
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
72
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
73
237
	fn ready_ring_unknit() -> Weight {
74
		// Proof Size summary in bytes:
75
		//  Measured:  `218`
76
		//  Estimated: `6044`
77
		// Minimum execution time: 15_143_000 picoseconds.
78
237
		Weight::from_parts(15_631_000, 6044)
79
237
			.saturating_add(T::DbWeight::get().reads(3_u64))
80
237
			.saturating_add(T::DbWeight::get().writes(3_u64))
81
237
	}
82
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
83
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
84
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
85
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
86
237
	fn service_queue_base() -> Weight {
87
		// Proof Size summary in bytes:
88
		//  Measured:  `48`
89
		//  Estimated: `3517`
90
		// Minimum execution time: 8_516_000 picoseconds.
91
237
		Weight::from_parts(8_715_000, 3517)
92
237
			.saturating_add(T::DbWeight::get().reads(2_u64))
93
237
			.saturating_add(T::DbWeight::get().writes(1_u64))
94
237
	}
95
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
96
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
97
226
	fn service_page_base_completion() -> Weight {
98
		// Proof Size summary in bytes:
99
		//  Measured:  `72`
100
		//  Estimated: `69050`
101
		// Minimum execution time: 8_259_000 picoseconds.
102
226
		Weight::from_parts(8_452_000, 69050)
103
226
			.saturating_add(T::DbWeight::get().reads(1_u64))
104
226
			.saturating_add(T::DbWeight::get().writes(1_u64))
105
226
	}
106
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
107
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
108
226
	fn service_page_base_no_completion() -> Weight {
109
		// Proof Size summary in bytes:
110
		//  Measured:  `72`
111
		//  Estimated: `69050`
112
		// Minimum execution time: 8_578_000 picoseconds.
113
226
		Weight::from_parts(8_785_000, 69050)
114
226
			.saturating_add(T::DbWeight::get().reads(1_u64))
115
226
			.saturating_add(T::DbWeight::get().writes(1_u64))
116
226
	}
117
	/// Storage: `MessageQueue::BookStateFor` (r:0 w:1)
118
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
119
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
120
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
121
226
	fn service_page_item() -> Weight {
122
		// Proof Size summary in bytes:
123
		//  Measured:  `0`
124
		//  Estimated: `0`
125
		// Minimum execution time: 173_721_000 picoseconds.
126
226
		Weight::from_parts(176_290_000, 0)
127
226
			.saturating_add(T::DbWeight::get().writes(2_u64))
128
226
	}
129
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
130
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
131
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
132
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
133
430
	fn bump_service_head() -> Weight {
134
		// Proof Size summary in bytes:
135
		//  Measured:  `171`
136
		//  Estimated: `3517`
137
		// Minimum execution time: 9_418_000 picoseconds.
138
430
		Weight::from_parts(9_632_000, 3517)
139
430
			.saturating_add(T::DbWeight::get().reads(2_u64))
140
430
			.saturating_add(T::DbWeight::get().writes(1_u64))
141
430
	}
142
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
143
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
144
	/// Storage: `MessageQueue::ServiceHead` (r:0 w:1)
145
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
146
	fn set_service_head() -> Weight {
147
		// Proof Size summary in bytes:
148
		//  Measured:  `161`
149
		//  Estimated: `3517`
150
		// Minimum execution time: 7_770_000 picoseconds.
151
		Weight::from_parts(7_999_000, 3517)
152
			.saturating_add(T::DbWeight::get().reads(1_u64))
153
			.saturating_add(T::DbWeight::get().writes(1_u64))
154
	}
155
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
156
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
157
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
158
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
159
	fn reap_page() -> Weight {
160
		// Proof Size summary in bytes:
161
		//  Measured:  `65667`
162
		//  Estimated: `69050`
163
		// Minimum execution time: 67_068_000 picoseconds.
164
		Weight::from_parts(71_238_000, 69050)
165
			.saturating_add(T::DbWeight::get().reads(2_u64))
166
			.saturating_add(T::DbWeight::get().writes(2_u64))
167
	}
168
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
169
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
170
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
171
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
172
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
173
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
174
	fn execute_overweight_page_removed() -> Weight {
175
		// Proof Size summary in bytes:
176
		//  Measured:  `65709`
177
		//  Estimated: `69050`
178
		// Minimum execution time: 90_498_000 picoseconds.
179
		Weight::from_parts(93_412_000, 69050)
180
			.saturating_add(T::DbWeight::get().reads(3_u64))
181
			.saturating_add(T::DbWeight::get().writes(2_u64))
182
	}
183
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
184
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
185
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
186
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
187
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
188
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
189
	fn execute_overweight_page_updated() -> Weight {
190
		// Proof Size summary in bytes:
191
		//  Measured:  `65709`
192
		//  Estimated: `69050`
193
		// Minimum execution time: 126_933_000 picoseconds.
194
		Weight::from_parts(130_070_000, 69050)
195
			.saturating_add(T::DbWeight::get().reads(3_u64))
196
			.saturating_add(T::DbWeight::get().writes(2_u64))
197
	}
198
}