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 47.0.0
21
//! DATE: 2025-07-09, 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-simple-node
28
// benchmark
29
// pallet
30
// --execution=wasm
31
// --wasm-execution=compiled
32
// --pallet
33
// pallet_message_queue
34
// --extrinsic
35
// *
36
// --chain=dev
37
// --steps
38
// 50
39
// --repeat
40
// 20
41
// --template=benchmarking/frame-weight-runtime-template.hbs
42
// --json-file
43
// raw.json
44
// --output
45
// tmp/simple_template_weights/pallet_message_queue.rs
46

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

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

            
54
/// Weights for pallet_message_queue using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> pallet_message_queue::WeightInfo for SubstrateWeight<T> {
57
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
58
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
59
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
60
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
61
	fn ready_ring_knit() -> Weight {
62
		// Proof Size summary in bytes:
63
		//  Measured:  `223`
64
		//  Estimated: `6044`
65
		// Minimum execution time: 16_661_000 picoseconds.
66
		Weight::from_parts(17_061_000, 6044)
67
			.saturating_add(T::DbWeight::get().reads(3_u64))
68
			.saturating_add(T::DbWeight::get().writes(2_u64))
69
	}
70
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
71
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
72
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
73
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
74
203
	fn ready_ring_unknit() -> Weight {
75
203
		// Proof Size summary in bytes:
76
203
		//  Measured:  `218`
77
203
		//  Estimated: `6044`
78
203
		// Minimum execution time: 15_135_000 picoseconds.
79
203
		Weight::from_parts(15_326_000, 6044)
80
203
			.saturating_add(T::DbWeight::get().reads(3_u64))
81
203
			.saturating_add(T::DbWeight::get().writes(3_u64))
82
203
	}
83
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
84
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
85
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
86
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
87
203
	fn service_queue_base() -> Weight {
88
203
		// Proof Size summary in bytes:
89
203
		//  Measured:  `48`
90
203
		//  Estimated: `3517`
91
203
		// Minimum execution time: 8_562_000 picoseconds.
92
203
		Weight::from_parts(9_152_000, 3517)
93
203
			.saturating_add(T::DbWeight::get().reads(2_u64))
94
203
			.saturating_add(T::DbWeight::get().writes(1_u64))
95
203
	}
96
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
97
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
98
192
	fn service_page_base_completion() -> Weight {
99
192
		// Proof Size summary in bytes:
100
192
		//  Measured:  `72`
101
192
		//  Estimated: `69050`
102
192
		// Minimum execution time: 8_669_000 picoseconds.
103
192
		Weight::from_parts(9_053_000, 69050)
104
192
			.saturating_add(T::DbWeight::get().reads(1_u64))
105
192
			.saturating_add(T::DbWeight::get().writes(1_u64))
106
192
	}
107
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
108
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
109
192
	fn service_page_base_no_completion() -> Weight {
110
192
		// Proof Size summary in bytes:
111
192
		//  Measured:  `72`
112
192
		//  Estimated: `69050`
113
192
		// Minimum execution time: 8_889_000 picoseconds.
114
192
		Weight::from_parts(9_228_000, 69050)
115
192
			.saturating_add(T::DbWeight::get().reads(1_u64))
116
192
			.saturating_add(T::DbWeight::get().writes(1_u64))
117
192
	}
118
	/// Storage: `MessageQueue::BookStateFor` (r:0 w:1)
119
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
120
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
121
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
122
192
	fn service_page_item() -> Weight {
123
192
		// Proof Size summary in bytes:
124
192
		//  Measured:  `0`
125
192
		//  Estimated: `0`
126
192
		// Minimum execution time: 167_362_000 picoseconds.
127
192
		Weight::from_parts(168_285_000, 0)
128
192
			.saturating_add(T::DbWeight::get().writes(2_u64))
129
192
	}
130
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
131
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
132
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
133
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
134
362
	fn bump_service_head() -> Weight {
135
362
		// Proof Size summary in bytes:
136
362
		//  Measured:  `171`
137
362
		//  Estimated: `3517`
138
362
		// Minimum execution time: 9_814_000 picoseconds.
139
362
		Weight::from_parts(9_997_000, 3517)
140
362
			.saturating_add(T::DbWeight::get().reads(2_u64))
141
362
			.saturating_add(T::DbWeight::get().writes(1_u64))
142
362
	}
143
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
144
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
145
	/// Storage: `MessageQueue::ServiceHead` (r:0 w:1)
146
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
147
	fn set_service_head() -> Weight {
148
		// Proof Size summary in bytes:
149
		//  Measured:  `161`
150
		//  Estimated: `3517`
151
		// Minimum execution time: 8_187_000 picoseconds.
152
		Weight::from_parts(8_485_000, 3517)
153
			.saturating_add(T::DbWeight::get().reads(1_u64))
154
			.saturating_add(T::DbWeight::get().writes(1_u64))
155
	}
156
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
157
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
158
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
159
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
160
	fn reap_page() -> Weight {
161
		// Proof Size summary in bytes:
162
		//  Measured:  `65667`
163
		//  Estimated: `69050`
164
		// Minimum execution time: 63_599_000 picoseconds.
165
		Weight::from_parts(64_826_000, 69050)
166
			.saturating_add(T::DbWeight::get().reads(2_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: `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(65585), added: 68060, mode: `MaxEncodedLen`)
175
	fn execute_overweight_page_removed() -> Weight {
176
		// Proof Size summary in bytes:
177
		//  Measured:  `65709`
178
		//  Estimated: `69050`
179
		// Minimum execution time: 84_519_000 picoseconds.
180
		Weight::from_parts(85_693_000, 69050)
181
			.saturating_add(T::DbWeight::get().reads(3_u64))
182
			.saturating_add(T::DbWeight::get().writes(2_u64))
183
	}
184
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
185
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
186
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
187
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
188
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
189
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
190
	fn execute_overweight_page_updated() -> Weight {
191
		// Proof Size summary in bytes:
192
		//  Measured:  `65709`
193
		//  Estimated: `69050`
194
		// Minimum execution time: 123_182_000 picoseconds.
195
		Weight::from_parts(124_660_000, 69050)
196
			.saturating_add(T::DbWeight::get().reads(3_u64))
197
			.saturating_add(T::DbWeight::get().writes(2_u64))
198
	}
199
}