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 32.0.0
21
//! DATE: 2025-05-02, 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
// --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/frontier_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 sp_std::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
	fn set_service_head() -> cumulus_primitives_core::Weight {
58
		Default::default()
59
	}
60
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:0)
61
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
62
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
63
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
64
	fn ready_ring_knit() -> Weight {
65
		// Proof Size summary in bytes:
66
		//  Measured:  `223`
67
		//  Estimated: `6044`
68
		// Minimum execution time: 16_645_000 picoseconds.
69
		Weight::from_parts(16_932_000, 6044)
70
			.saturating_add(T::DbWeight::get().reads(3_u64))
71
			.saturating_add(T::DbWeight::get().writes(2_u64))
72
	}
73
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
74
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
75
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
76
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
77
169
	fn ready_ring_unknit() -> Weight {
78
169
		// Proof Size summary in bytes:
79
169
		//  Measured:  `218`
80
169
		//  Estimated: `6044`
81
169
		// Minimum execution time: 14_725_000 picoseconds.
82
169
		Weight::from_parts(15_103_000, 6044)
83
169
			.saturating_add(T::DbWeight::get().reads(3_u64))
84
169
			.saturating_add(T::DbWeight::get().writes(3_u64))
85
169
	}
86
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
87
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
88
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
89
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
90
169
	fn service_queue_base() -> Weight {
91
169
		// Proof Size summary in bytes:
92
169
		//  Measured:  `48`
93
169
		//  Estimated: `3517`
94
169
		// Minimum execution time: 8_302_000 picoseconds.
95
169
		Weight::from_parts(8_539_000, 3517)
96
169
			.saturating_add(T::DbWeight::get().reads(2_u64))
97
169
			.saturating_add(T::DbWeight::get().writes(1_u64))
98
169
	}
99
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
100
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
101
162
	fn service_page_base_completion() -> Weight {
102
162
		// Proof Size summary in bytes:
103
162
		//  Measured:  `72`
104
162
		//  Estimated: `69050`
105
162
		// Minimum execution time: 8_129_000 picoseconds.
106
162
		Weight::from_parts(8_480_000, 69050)
107
162
			.saturating_add(T::DbWeight::get().reads(1_u64))
108
162
			.saturating_add(T::DbWeight::get().writes(1_u64))
109
162
	}
110
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
111
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
112
162
	fn service_page_base_no_completion() -> Weight {
113
162
		// Proof Size summary in bytes:
114
162
		//  Measured:  `72`
115
162
		//  Estimated: `69050`
116
162
		// Minimum execution time: 8_457_000 picoseconds.
117
162
		Weight::from_parts(8_667_000, 69050)
118
162
			.saturating_add(T::DbWeight::get().reads(1_u64))
119
162
			.saturating_add(T::DbWeight::get().writes(1_u64))
120
162
	}
121
	/// Storage: `MessageQueue::BookStateFor` (r:0 w:1)
122
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
123
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
124
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
125
162
	fn service_page_item() -> Weight {
126
162
		// Proof Size summary in bytes:
127
162
		//  Measured:  `0`
128
162
		//  Estimated: `0`
129
162
		// Minimum execution time: 165_685_000 picoseconds.
130
162
		Weight::from_parts(167_429_000, 0)
131
162
			.saturating_add(T::DbWeight::get().writes(2_u64))
132
162
	}
133
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
134
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
135
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
136
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
137
310
	fn bump_service_head() -> Weight {
138
310
		// Proof Size summary in bytes:
139
310
		//  Measured:  `171`
140
310
		//  Estimated: `3517`
141
310
		// Minimum execution time: 9_427_000 picoseconds.
142
310
		Weight::from_parts(9_746_000, 3517)
143
310
			.saturating_add(T::DbWeight::get().reads(2_u64))
144
310
			.saturating_add(T::DbWeight::get().writes(1_u64))
145
310
	}
146
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
147
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
148
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
149
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
150
	fn reap_page() -> Weight {
151
		// Proof Size summary in bytes:
152
		//  Measured:  `65667`
153
		//  Estimated: `69050`
154
		// Minimum execution time: 61_309_000 picoseconds.
155
		Weight::from_parts(63_156_000, 69050)
156
			.saturating_add(T::DbWeight::get().reads(2_u64))
157
			.saturating_add(T::DbWeight::get().writes(2_u64))
158
	}
159
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
160
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
161
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
162
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
163
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
164
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
165
	fn execute_overweight_page_removed() -> Weight {
166
		// Proof Size summary in bytes:
167
		//  Measured:  `65709`
168
		//  Estimated: `69050`
169
		// Minimum execution time: 83_200_000 picoseconds.
170
		Weight::from_parts(84_455_000, 69050)
171
			.saturating_add(T::DbWeight::get().reads(3_u64))
172
			.saturating_add(T::DbWeight::get().writes(2_u64))
173
	}
174
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
175
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
176
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
177
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
178
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
179
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
180
	fn execute_overweight_page_updated() -> Weight {
181
		// Proof Size summary in bytes:
182
		//  Measured:  `65709`
183
		//  Estimated: `69050`
184
		// Minimum execution time: 122_789_000 picoseconds.
185
		Weight::from_parts(124_211_000, 69050)
186
			.saturating_add(T::DbWeight::get().reads(3_u64))
187
			.saturating_add(T::DbWeight::get().writes(2_u64))
188
	}
189
}