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-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 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
	/// 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: 18_052_000 picoseconds.
66
		Weight::from_parts(18_706_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
33
	fn ready_ring_unknit() -> Weight {
75
33
		// Proof Size summary in bytes:
76
33
		//  Measured:  `218`
77
33
		//  Estimated: `6044`
78
33
		// Minimum execution time: 16_272_000 picoseconds.
79
33
		Weight::from_parts(16_760_000, 6044)
80
33
			.saturating_add(T::DbWeight::get().reads(3_u64))
81
33
			.saturating_add(T::DbWeight::get().writes(3_u64))
82
33
	}
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
33
	fn service_queue_base() -> Weight {
88
33
		// Proof Size summary in bytes:
89
33
		//  Measured:  `48`
90
33
		//  Estimated: `3517`
91
33
		// Minimum execution time: 9_641_000 picoseconds.
92
33
		Weight::from_parts(9_903_000, 3517)
93
33
			.saturating_add(T::DbWeight::get().reads(2_u64))
94
33
			.saturating_add(T::DbWeight::get().writes(1_u64))
95
33
	}
96
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
97
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
98
22
	fn service_page_base_completion() -> Weight {
99
22
		// Proof Size summary in bytes:
100
22
		//  Measured:  `72`
101
22
		//  Estimated: `69050`
102
22
		// Minimum execution time: 9_437_000 picoseconds.
103
22
		Weight::from_parts(9_734_000, 69050)
104
22
			.saturating_add(T::DbWeight::get().reads(1_u64))
105
22
			.saturating_add(T::DbWeight::get().writes(1_u64))
106
22
	}
107
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
108
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
109
22
	fn service_page_base_no_completion() -> Weight {
110
22
		// Proof Size summary in bytes:
111
22
		//  Measured:  `72`
112
22
		//  Estimated: `69050`
113
22
		// Minimum execution time: 9_565_000 picoseconds.
114
22
		Weight::from_parts(9_816_000, 69050)
115
22
			.saturating_add(T::DbWeight::get().reads(1_u64))
116
22
			.saturating_add(T::DbWeight::get().writes(1_u64))
117
22
	}
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
22
	fn service_page_item() -> Weight {
123
22
		// Proof Size summary in bytes:
124
22
		//  Measured:  `0`
125
22
		//  Estimated: `0`
126
22
		// Minimum execution time: 162_169_000 picoseconds.
127
22
		Weight::from_parts(164_144_000, 0)
128
22
			.saturating_add(T::DbWeight::get().writes(2_u64))
129
22
	}
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
22
	fn bump_service_head() -> Weight {
135
22
		// Proof Size summary in bytes:
136
22
		//  Measured:  `171`
137
22
		//  Estimated: `3517`
138
22
		// Minimum execution time: 11_011_000 picoseconds.
139
22
		Weight::from_parts(11_276_000, 3517)
140
22
			.saturating_add(T::DbWeight::get().reads(2_u64))
141
22
			.saturating_add(T::DbWeight::get().writes(1_u64))
142
22
	}
143
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
144
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
145
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
146
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
147
	fn reap_page() -> Weight {
148
		// Proof Size summary in bytes:
149
		//  Measured:  `65667`
150
		//  Estimated: `69050`
151
		// Minimum execution time: 61_809_000 picoseconds.
152
		Weight::from_parts(62_962_000, 69050)
153
			.saturating_add(T::DbWeight::get().reads(2_u64))
154
			.saturating_add(T::DbWeight::get().writes(2_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: `MaintenanceMode::MaintenanceMode` (r:1 w:0)
159
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
160
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
161
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
162
	fn execute_overweight_page_removed() -> Weight {
163
		// Proof Size summary in bytes:
164
		//  Measured:  `65709`
165
		//  Estimated: `69050`
166
		// Minimum execution time: 81_837_000 picoseconds.
167
		Weight::from_parts(84_476_000, 69050)
168
			.saturating_add(T::DbWeight::get().reads(3_u64))
169
			.saturating_add(T::DbWeight::get().writes(2_u64))
170
	}
171
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
172
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
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(65585), added: 68060, mode: `MaxEncodedLen`)
177
	fn execute_overweight_page_updated() -> Weight {
178
		// Proof Size summary in bytes:
179
		//  Measured:  `65709`
180
		//  Estimated: `69050`
181
		// Minimum execution time: 119_833_000 picoseconds.
182
		Weight::from_parts(121_113_000, 69050)
183
			.saturating_add(T::DbWeight::get().reads(3_u64))
184
			.saturating_add(T::DbWeight::get().writes(2_u64))
185
	}
186
}