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_scheduler
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_scheduler
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_scheduler.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_scheduler using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> pallet_scheduler::WeightInfo for SubstrateWeight<T> {
57
	/// Storage: `Scheduler::IncompleteSince` (r:1 w:1)
58
	/// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
59
	fn service_agendas_base() -> Weight {
60
		// Proof Size summary in bytes:
61
		//  Measured:  `31`
62
		//  Estimated: `1489`
63
		// Minimum execution time: 3_400_000 picoseconds.
64
		Weight::from_parts(3_580_000, 1489)
65
			.saturating_add(T::DbWeight::get().reads(1_u64))
66
			.saturating_add(T::DbWeight::get().writes(1_u64))
67
	}
68
	/// Storage: `Scheduler::Agenda` (r:1 w:1)
69
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
70
	/// The range of component `s` is `[0, 50]`.
71
	fn service_agenda_base(s: u32, ) -> Weight {
72
		// Proof Size summary in bytes:
73
		//  Measured:  `78 + s * (177 ±0)`
74
		//  Estimated: `42428`
75
		// Minimum execution time: 4_445_000 picoseconds.
76
		Weight::from_parts(7_765_999, 42428)
77
			// Standard Error: 1_628
78
			.saturating_add(Weight::from_parts(410_318, 0).saturating_mul(s.into()))
79
			.saturating_add(T::DbWeight::get().reads(1_u64))
80
			.saturating_add(T::DbWeight::get().writes(1_u64))
81
	}
82
	fn service_task_base() -> Weight {
83
		// Proof Size summary in bytes:
84
		//  Measured:  `0`
85
		//  Estimated: `0`
86
		// Minimum execution time: 3_905_000 picoseconds.
87
		Weight::from_parts(4_033_000, 0)
88
	}
89
	/// Storage: `Preimage::PreimageFor` (r:1 w:1)
90
	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
91
	/// Storage: `Preimage::StatusFor` (r:1 w:0)
92
	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
93
	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
94
	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
95
	/// The range of component `s` is `[128, 4194304]`.
96
	fn service_task_fetched(s: u32, ) -> Weight {
97
		// Proof Size summary in bytes:
98
		//  Measured:  `251 + s * (1 ±0)`
99
		//  Estimated: `3716 + s * (1 ±0)`
100
		// Minimum execution time: 22_350_000 picoseconds.
101
		Weight::from_parts(22_720_000, 3716)
102
			// Standard Error: 17
103
			.saturating_add(Weight::from_parts(1_399, 0).saturating_mul(s.into()))
104
			.saturating_add(T::DbWeight::get().reads(3_u64))
105
			.saturating_add(T::DbWeight::get().writes(2_u64))
106
			.saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into()))
107
	}
108
	/// Storage: `Scheduler::Lookup` (r:0 w:1)
109
	/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
110
	fn service_task_named() -> Weight {
111
		// Proof Size summary in bytes:
112
		//  Measured:  `0`
113
		//  Estimated: `0`
114
		// Minimum execution time: 6_038_000 picoseconds.
115
		Weight::from_parts(6_290_000, 0)
116
			.saturating_add(T::DbWeight::get().writes(1_u64))
117
	}
118
	fn service_task_periodic() -> Weight {
119
		// Proof Size summary in bytes:
120
		//  Measured:  `0`
121
		//  Estimated: `0`
122
		// Minimum execution time: 3_812_000 picoseconds.
123
		Weight::from_parts(4_029_000, 0)
124
	}
125
	fn execute_dispatch_signed() -> Weight {
126
		// Proof Size summary in bytes:
127
		//  Measured:  `0`
128
		//  Estimated: `0`
129
		// Minimum execution time: 2_903_000 picoseconds.
130
		Weight::from_parts(3_011_000, 0)
131
	}
132
	fn execute_dispatch_unsigned() -> Weight {
133
		// Proof Size summary in bytes:
134
		//  Measured:  `0`
135
		//  Estimated: `0`
136
		// Minimum execution time: 2_891_000 picoseconds.
137
		Weight::from_parts(3_000_000, 0)
138
	}
139
	/// Storage: `Scheduler::Agenda` (r:1 w:1)
140
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
141
	/// The range of component `s` is `[0, 49]`.
142
	fn schedule(s: u32, ) -> Weight {
143
		// Proof Size summary in bytes:
144
		//  Measured:  `78 + s * (177 ±0)`
145
		//  Estimated: `42428`
146
		// Minimum execution time: 12_943_000 picoseconds.
147
		Weight::from_parts(15_899_842, 42428)
148
			// Standard Error: 1_533
149
			.saturating_add(Weight::from_parts(444_458, 0).saturating_mul(s.into()))
150
			.saturating_add(T::DbWeight::get().reads(1_u64))
151
			.saturating_add(T::DbWeight::get().writes(1_u64))
152
	}
153
	/// Storage: `Scheduler::Agenda` (r:1 w:1)
154
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
155
	/// Storage: `Scheduler::Retries` (r:0 w:1)
156
	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
157
	/// Storage: `Scheduler::Lookup` (r:0 w:1)
158
	/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
159
	/// The range of component `s` is `[1, 50]`.
160
	fn cancel(s: u32, ) -> Weight {
161
		// Proof Size summary in bytes:
162
		//  Measured:  `78 + s * (177 ±0)`
163
		//  Estimated: `42428`
164
		// Minimum execution time: 19_654_000 picoseconds.
165
		Weight::from_parts(19_156_675, 42428)
166
			// Standard Error: 1_061
167
			.saturating_add(Weight::from_parts(670_547, 0).saturating_mul(s.into()))
168
			.saturating_add(T::DbWeight::get().reads(1_u64))
169
			.saturating_add(T::DbWeight::get().writes(3_u64))
170
	}
171
	/// Storage: `Scheduler::Lookup` (r:1 w:1)
172
	/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
173
	/// Storage: `Scheduler::Agenda` (r:1 w:1)
174
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
175
	/// The range of component `s` is `[0, 49]`.
176
	fn schedule_named(s: u32, ) -> Weight {
177
		// Proof Size summary in bytes:
178
		//  Measured:  `255 + s * (185 ±0)`
179
		//  Estimated: `42428`
180
		// Minimum execution time: 17_159_000 picoseconds.
181
		Weight::from_parts(21_105_076, 42428)
182
			// Standard Error: 2_365
183
			.saturating_add(Weight::from_parts(471_112, 0).saturating_mul(s.into()))
184
			.saturating_add(T::DbWeight::get().reads(2_u64))
185
			.saturating_add(T::DbWeight::get().writes(2_u64))
186
	}
187
	/// Storage: `Scheduler::Lookup` (r:1 w:1)
188
	/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
189
	/// Storage: `Scheduler::Agenda` (r:1 w:1)
190
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
191
	/// Storage: `Scheduler::Retries` (r:0 w:1)
192
	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
193
	/// The range of component `s` is `[1, 50]`.
194
	fn cancel_named(s: u32, ) -> Weight {
195
		// Proof Size summary in bytes:
196
		//  Measured:  `281 + s * (185 ±0)`
197
		//  Estimated: `42428`
198
		// Minimum execution time: 22_113_000 picoseconds.
199
		Weight::from_parts(22_189_196, 42428)
200
			// Standard Error: 1_296
201
			.saturating_add(Weight::from_parts(700_575, 0).saturating_mul(s.into()))
202
			.saturating_add(T::DbWeight::get().reads(2_u64))
203
			.saturating_add(T::DbWeight::get().writes(3_u64))
204
	}
205
	/// Storage: `Scheduler::Agenda` (r:1 w:1)
206
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
207
	/// Storage: `Scheduler::Retries` (r:0 w:1)
208
	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
209
	/// The range of component `s` is `[1, 50]`.
210
	fn schedule_retry(s: u32, ) -> Weight {
211
		// Proof Size summary in bytes:
212
		//  Measured:  `118`
213
		//  Estimated: `42428`
214
		// Minimum execution time: 11_589_000 picoseconds.
215
		Weight::from_parts(11_951_723, 42428)
216
			// Standard Error: 442
217
			.saturating_add(Weight::from_parts(30_510, 0).saturating_mul(s.into()))
218
			.saturating_add(T::DbWeight::get().reads(1_u64))
219
			.saturating_add(T::DbWeight::get().writes(2_u64))
220
	}
221
	/// Storage: `Scheduler::Agenda` (r:1 w:0)
222
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
223
	/// Storage: `Scheduler::Retries` (r:0 w:1)
224
	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
225
	fn set_retry() -> Weight {
226
		// Proof Size summary in bytes:
227
		//  Measured:  `8928`
228
		//  Estimated: `42428`
229
		// Minimum execution time: 29_469_000 picoseconds.
230
		Weight::from_parts(30_619_000, 42428)
231
			.saturating_add(T::DbWeight::get().reads(1_u64))
232
			.saturating_add(T::DbWeight::get().writes(1_u64))
233
	}
234
	/// Storage: `Scheduler::Lookup` (r:1 w:0)
235
	/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
236
	/// Storage: `Scheduler::Agenda` (r:1 w:0)
237
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
238
	/// Storage: `Scheduler::Retries` (r:0 w:1)
239
	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
240
	fn set_retry_named() -> Weight {
241
		// Proof Size summary in bytes:
242
		//  Measured:  `9606`
243
		//  Estimated: `42428`
244
		// Minimum execution time: 35_842_000 picoseconds.
245
		Weight::from_parts(37_045_000, 42428)
246
			.saturating_add(T::DbWeight::get().reads(2_u64))
247
			.saturating_add(T::DbWeight::get().writes(1_u64))
248
	}
249
	/// Storage: `Scheduler::Agenda` (r:1 w:0)
250
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
251
	/// Storage: `Scheduler::Retries` (r:0 w:1)
252
	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
253
	fn cancel_retry() -> Weight {
254
		// Proof Size summary in bytes:
255
		//  Measured:  `8940`
256
		//  Estimated: `42428`
257
		// Minimum execution time: 27_907_000 picoseconds.
258
		Weight::from_parts(28_633_000, 42428)
259
			.saturating_add(T::DbWeight::get().reads(1_u64))
260
			.saturating_add(T::DbWeight::get().writes(1_u64))
261
	}
262
	/// Storage: `Scheduler::Lookup` (r:1 w:0)
263
	/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
264
	/// Storage: `Scheduler::Agenda` (r:1 w:0)
265
	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
266
	/// Storage: `Scheduler::Retries` (r:0 w:1)
267
	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
268
	fn cancel_retry_named() -> Weight {
269
		// Proof Size summary in bytes:
270
		//  Measured:  `9618`
271
		//  Estimated: `42428`
272
		// Minimum execution time: 34_336_000 picoseconds.
273
		Weight::from_parts(35_582_000, 42428)
274
			.saturating_add(T::DbWeight::get().reads(2_u64))
275
			.saturating_add(T::DbWeight::get().writes(1_u64))
276
	}
277
}