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 42.0.0
21
//! DATE: 2024-09-25, 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("starlight-dev"), DB CACHE: 1024
25

            
26
// Executed Command:
27
// target/release/tanssi-relay
28
// benchmark
29
// pallet
30
// --execution=wasm
31
// --wasm-execution=compiled
32
// --pallet
33
// pallet_message_queue
34
// --extrinsic
35
// *
36
// --chain=starlight-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/starlight_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(6), added: 501, mode: `MaxEncodedLen`)
59
	/// Storage: `MessageQueue::BookStateFor` (r:2 w:2)
60
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
61
	fn ready_ring_knit() -> Weight {
62
		// Proof Size summary in bytes:
63
		//  Measured:  `348`
64
		//  Estimated: `6050`
65
		// Minimum execution time: 16_417_000 picoseconds.
66
		Weight::from_parts(17_005_000, 6050)
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(55), added: 2530, mode: `MaxEncodedLen`)
72
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
73
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(6), added: 501, mode: `MaxEncodedLen`)
74
	fn ready_ring_unknit() -> Weight {
75
		// Proof Size summary in bytes:
76
		//  Measured:  `348`
77
		//  Estimated: `6050`
78
		// Minimum execution time: 14_837_000 picoseconds.
79
		Weight::from_parts(15_200_000, 6050)
80
			.saturating_add(T::DbWeight::get().reads(3_u64))
81
			.saturating_add(T::DbWeight::get().writes(3_u64))
82
	}
83
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
84
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
85
	fn service_queue_base() -> Weight {
86
		// Proof Size summary in bytes:
87
		//  Measured:  `109`
88
		//  Estimated: `3520`
89
		// Minimum execution time: 5_515_000 picoseconds.
90
		Weight::from_parts(5_733_000, 3520)
91
			.saturating_add(T::DbWeight::get().reads(1_u64))
92
			.saturating_add(T::DbWeight::get().writes(1_u64))
93
	}
94
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
95
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(32818), added: 35293, mode: `MaxEncodedLen`)
96
	fn service_page_base_completion() -> Weight {
97
		// Proof Size summary in bytes:
98
		//  Measured:  `182`
99
		//  Estimated: `36283`
100
		// Minimum execution time: 7_797_000 picoseconds.
101
		Weight::from_parts(8_049_000, 36283)
102
			.saturating_add(T::DbWeight::get().reads(1_u64))
103
			.saturating_add(T::DbWeight::get().writes(1_u64))
104
	}
105
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
106
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(32818), added: 35293, mode: `MaxEncodedLen`)
107
	fn service_page_base_no_completion() -> Weight {
108
		// Proof Size summary in bytes:
109
		//  Measured:  `182`
110
		//  Estimated: `36283`
111
		// Minimum execution time: 7_996_000 picoseconds.
112
		Weight::from_parts(8_225_000, 36283)
113
			.saturating_add(T::DbWeight::get().reads(1_u64))
114
			.saturating_add(T::DbWeight::get().writes(1_u64))
115
	}
116
	/// Storage: `MessageQueue::BookStateFor` (r:0 w:1)
117
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
118
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
119
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(32818), added: 35293, mode: `MaxEncodedLen`)
120
	fn service_page_item() -> Weight {
121
		// Proof Size summary in bytes:
122
		//  Measured:  `0`
123
		//  Estimated: `0`
124
		// Minimum execution time: 78_155_000 picoseconds.
125
		Weight::from_parts(79_410_000, 0)
126
			.saturating_add(T::DbWeight::get().writes(2_u64))
127
	}
128
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
129
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(6), added: 501, mode: `MaxEncodedLen`)
130
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
131
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
132
	fn bump_service_head() -> Weight {
133
		// Proof Size summary in bytes:
134
		//  Measured:  `287`
135
		//  Estimated: `3520`
136
		// Minimum execution time: 8_099_000 picoseconds.
137
		Weight::from_parts(8_462_000, 3520)
138
			.saturating_add(T::DbWeight::get().reads(2_u64))
139
			.saturating_add(T::DbWeight::get().writes(1_u64))
140
	}
141
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
142
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
143
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
144
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(32818), added: 35293, mode: `MaxEncodedLen`)
145
	/// Storage: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
146
	/// Proof: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
147
	/// Storage: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
148
	/// Proof: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
149
	fn reap_page() -> Weight {
150
		// Proof Size summary in bytes:
151
		//  Measured:  `33012`
152
		//  Estimated: `36283`
153
		// Minimum execution time: 43_333_000 picoseconds.
154
		Weight::from_parts(45_211_000, 36283)
155
			.saturating_add(T::DbWeight::get().reads(2_u64))
156
			.saturating_add(T::DbWeight::get().writes(4_u64))
157
	}
158
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
159
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
160
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
161
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(32818), added: 35293, mode: `MaxEncodedLen`)
162
	/// Storage: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
163
	/// Proof: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
164
	/// Storage: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
165
	/// Proof: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
166
	fn execute_overweight_page_removed() -> Weight {
167
		// Proof Size summary in bytes:
168
		//  Measured:  `33012`
169
		//  Estimated: `36283`
170
		// Minimum execution time: 52_019_000 picoseconds.
171
		Weight::from_parts(53_842_000, 36283)
172
			.saturating_add(T::DbWeight::get().reads(2_u64))
173
			.saturating_add(T::DbWeight::get().writes(4_u64))
174
	}
175
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
176
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`)
177
	/// Storage: `MessageQueue::Pages` (r:1 w:1)
178
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(32818), added: 35293, mode: `MaxEncodedLen`)
179
	/// Storage: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
180
	/// Proof: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1)
181
	/// Storage: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
182
	/// Proof: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1)
183
	fn execute_overweight_page_updated() -> Weight {
184
		// Proof Size summary in bytes:
185
		//  Measured:  `33012`
186
		//  Estimated: `36283`
187
		// Minimum execution time: 71_955_000 picoseconds.
188
		Weight::from_parts(73_244_000, 36283)
189
			.saturating_add(T::DbWeight::get().reads(2_u64))
190
			.saturating_add(T::DbWeight::get().writes(4_u64))
191
	}
192
}