common_runtime/weights/
pallet_scheduler.rs

1//! Autogenerated weights for pallet_scheduler
2//!
3//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0
4//! DATE: 2025-08-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
5//! WORST CASE MAP SIZE: `1000000`
6//! HOSTNAME: `ip-10-173-5-194`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
7//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
8
9// Executed Command:
10// ./scripts/../target/release/frequency
11// benchmark
12// pallet
13// --pallet=pallet_scheduler
14// --extrinsic
15// *
16// --heap-pages=4096
17// --steps=50
18// --repeat=20
19// --output=./scripts/../runtime/common/src/weights
20// --template=./scripts/../.maintain/runtime-weight-template.hbs
21// --additional-trie-layers=3
22// --runtime=./scripts/../target/release/wbuild/frequency-runtime/frequency_runtime.wasm
23// --genesis-builder=runtime
24
25#![cfg_attr(rustfmt, rustfmt_skip)]
26#![allow(unused_parens)]
27#![allow(unused_imports)]
28#![allow(missing_docs)]
29
30use frame_support::{traits::Get, weights::Weight};
31use core::marker::PhantomData;
32
33/// Weights for `pallet_scheduler` using the Substrate node and recommended hardware.
34pub struct SubstrateWeight<T>(PhantomData<T>);
35impl<T: frame_system::Config> pallet_scheduler::WeightInfo for SubstrateWeight<T> {
36	/// Storage: `Scheduler::IncompleteSince` (r:1 w:1)
37	/// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
38	fn service_agendas_base() -> Weight {
39		// Proof Size summary in bytes:
40		//  Measured:  `31`
41		//  Estimated: `1984`
42		// Minimum execution time: 6_338_000 picoseconds.
43		Weight::from_parts(6_497_000, 1984)
44			.saturating_add(T::DbWeight::get().reads(1_u64))
45			.saturating_add(T::DbWeight::get().writes(1_u64))
46	}
47	/// Storage: `Scheduler::Agenda` (r:1 w:1)
48	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
49	/// The range of component `s` is `[0, 50]`.
50	fn service_agenda_base(s: u32, ) -> Weight {
51		// Proof Size summary in bytes:
52		//  Measured:  `78 + s * (177 ±0)`
53		//  Estimated: `42923`
54		// Minimum execution time: 3_815_000 picoseconds.
55		Weight::from_parts(7_299_910, 42923)
56			// Standard Error: 1_728
57			.saturating_add(Weight::from_parts(475_877, 0).saturating_mul(s.into()))
58			.saturating_add(T::DbWeight::get().reads(1_u64))
59			.saturating_add(T::DbWeight::get().writes(1_u64))
60	}
61	fn service_task_base() -> Weight {
62		// Proof Size summary in bytes:
63		//  Measured:  `0`
64		//  Estimated: `0`
65		// Minimum execution time: 3_631_000 picoseconds.
66		Weight::from_parts(3_824_000, 0)
67	}
68	/// Storage: `Preimage::PreimageFor` (r:1 w:1)
69	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
70	/// Storage: `Preimage::StatusFor` (r:1 w:0)
71	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
72	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
73	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
74	/// The range of component `s` is `[128, 4194304]`.
75	fn service_task_fetched(s: u32, ) -> Weight {
76		// Proof Size summary in bytes:
77		//  Measured:  `141 + s * (1 ±0)`
78		//  Estimated: `4101 + s * (1 ±0)`
79		// Minimum execution time: 21_107_000 picoseconds.
80		Weight::from_parts(21_707_000, 4101)
81			// Standard Error: 17
82			.saturating_add(Weight::from_parts(2_059, 0).saturating_mul(s.into()))
83			.saturating_add(T::DbWeight::get().reads(3_u64))
84			.saturating_add(T::DbWeight::get().writes(2_u64))
85			.saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into()))
86	}
87	/// Storage: `Scheduler::Lookup` (r:0 w:1)
88	/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
89	fn service_task_named() -> Weight {
90		// Proof Size summary in bytes:
91		//  Measured:  `0`
92		//  Estimated: `0`
93		// Minimum execution time: 5_287_000 picoseconds.
94		Weight::from_parts(5_592_000, 0)
95			.saturating_add(T::DbWeight::get().writes(1_u64))
96	}
97	fn service_task_periodic() -> Weight {
98		// Proof Size summary in bytes:
99		//  Measured:  `0`
100		//  Estimated: `0`
101		// Minimum execution time: 3_575_000 picoseconds.
102		Weight::from_parts(3_825_000, 0)
103	}
104	fn execute_dispatch_signed() -> Weight {
105		// Proof Size summary in bytes:
106		//  Measured:  `0`
107		//  Estimated: `0`
108		// Minimum execution time: 2_221_000 picoseconds.
109		Weight::from_parts(2_400_000, 0)
110	}
111	fn execute_dispatch_unsigned() -> Weight {
112		// Proof Size summary in bytes:
113		//  Measured:  `0`
114		//  Estimated: `0`
115		// Minimum execution time: 2_222_000 picoseconds.
116		Weight::from_parts(2_490_000, 0)
117	}
118	/// Storage: `Scheduler::Agenda` (r:1 w:1)
119	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
120	/// The range of component `s` is `[0, 49]`.
121	fn schedule(s: u32, ) -> Weight {
122		// Proof Size summary in bytes:
123		//  Measured:  `78 + s * (177 ±0)`
124		//  Estimated: `42923`
125		// Minimum execution time: 11_167_000 picoseconds.
126		Weight::from_parts(14_421_947, 42923)
127			// Standard Error: 1_781
128			.saturating_add(Weight::from_parts(503_826, 0).saturating_mul(s.into()))
129			.saturating_add(T::DbWeight::get().reads(1_u64))
130			.saturating_add(T::DbWeight::get().writes(1_u64))
131	}
132	/// Storage: `Scheduler::Agenda` (r:1 w:1)
133	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
134	/// Storage: `Scheduler::Retries` (r:0 w:1)
135	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
136	/// Storage: `Scheduler::Lookup` (r:0 w:1)
137	/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
138	/// The range of component `s` is `[1, 50]`.
139	fn cancel(s: u32, ) -> Weight {
140		// Proof Size summary in bytes:
141		//  Measured:  `78 + s * (177 ±0)`
142		//  Estimated: `42923`
143		// Minimum execution time: 17_084_000 picoseconds.
144		Weight::from_parts(16_625_484, 42923)
145			// Standard Error: 1_121
146			.saturating_add(Weight::from_parts(769_638, 0).saturating_mul(s.into()))
147			.saturating_add(T::DbWeight::get().reads(1_u64))
148			.saturating_add(T::DbWeight::get().writes(3_u64))
149	}
150	/// Storage: `Scheduler::Lookup` (r:1 w:1)
151	/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
152	/// Storage: `Scheduler::Agenda` (r:1 w:1)
153	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
154	/// The range of component `s` is `[0, 49]`.
155	fn schedule_named(s: u32, ) -> Weight {
156		// Proof Size summary in bytes:
157		//  Measured:  `255 + s * (185 ±0)`
158		//  Estimated: `42923`
159		// Minimum execution time: 14_817_000 picoseconds.
160		Weight::from_parts(21_231_353, 42923)
161			// Standard Error: 3_641
162			.saturating_add(Weight::from_parts(556_500, 0).saturating_mul(s.into()))
163			.saturating_add(T::DbWeight::get().reads(2_u64))
164			.saturating_add(T::DbWeight::get().writes(2_u64))
165	}
166	/// Storage: `Scheduler::Lookup` (r:1 w:1)
167	/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
168	/// Storage: `Scheduler::Agenda` (r:1 w:1)
169	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
170	/// Storage: `Scheduler::Retries` (r:0 w:1)
171	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
172	/// The range of component `s` is `[1, 50]`.
173	fn cancel_named(s: u32, ) -> Weight {
174		// Proof Size summary in bytes:
175		//  Measured:  `281 + s * (185 ±0)`
176		//  Estimated: `42923`
177		// Minimum execution time: 21_508_000 picoseconds.
178		Weight::from_parts(22_161_615, 42923)
179			// Standard Error: 1_555
180			.saturating_add(Weight::from_parts(814_012, 0).saturating_mul(s.into()))
181			.saturating_add(T::DbWeight::get().reads(2_u64))
182			.saturating_add(T::DbWeight::get().writes(3_u64))
183	}
184	/// Storage: `Scheduler::Agenda` (r:1 w:1)
185	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
186	/// Storage: `Scheduler::Retries` (r:0 w:1)
187	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
188	/// The range of component `s` is `[1, 50]`.
189	fn schedule_retry(s: u32, ) -> Weight {
190		// Proof Size summary in bytes:
191		//  Measured:  `118`
192		//  Estimated: `42923`
193		// Minimum execution time: 10_173_000 picoseconds.
194		Weight::from_parts(10_699_563, 42923)
195			// Standard Error: 497
196			.saturating_add(Weight::from_parts(33_906, 0).saturating_mul(s.into()))
197			.saturating_add(T::DbWeight::get().reads(1_u64))
198			.saturating_add(T::DbWeight::get().writes(2_u64))
199	}
200	/// Storage: `Scheduler::Agenda` (r:1 w:0)
201	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
202	/// Storage: `Scheduler::Retries` (r:0 w:1)
203	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
204	fn set_retry() -> Weight {
205		// Proof Size summary in bytes:
206		//  Measured:  `8928`
207		//  Estimated: `42923`
208		// Minimum execution time: 30_644_000 picoseconds.
209		Weight::from_parts(31_494_000, 42923)
210			.saturating_add(T::DbWeight::get().reads(1_u64))
211			.saturating_add(T::DbWeight::get().writes(1_u64))
212	}
213	/// Storage: `Scheduler::Lookup` (r:1 w:0)
214	/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
215	/// Storage: `Scheduler::Agenda` (r:1 w:0)
216	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
217	/// Storage: `Scheduler::Retries` (r:0 w:1)
218	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
219	fn set_retry_named() -> Weight {
220		// Proof Size summary in bytes:
221		//  Measured:  `9606`
222		//  Estimated: `42923`
223		// Minimum execution time: 39_785_000 picoseconds.
224		Weight::from_parts(40_442_000, 42923)
225			.saturating_add(T::DbWeight::get().reads(2_u64))
226			.saturating_add(T::DbWeight::get().writes(1_u64))
227	}
228	/// Storage: `Scheduler::Agenda` (r:1 w:0)
229	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
230	/// Storage: `Scheduler::Retries` (r:0 w:1)
231	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
232	fn cancel_retry() -> Weight {
233		// Proof Size summary in bytes:
234		//  Measured:  `8940`
235		//  Estimated: `42923`
236		// Minimum execution time: 28_935_000 picoseconds.
237		Weight::from_parts(29_624_000, 42923)
238			.saturating_add(T::DbWeight::get().reads(1_u64))
239			.saturating_add(T::DbWeight::get().writes(1_u64))
240	}
241	/// Storage: `Scheduler::Lookup` (r:1 w:0)
242	/// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
243	/// Storage: `Scheduler::Agenda` (r:1 w:0)
244	/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(38963), added: 41438, mode: `MaxEncodedLen`)
245	/// Storage: `Scheduler::Retries` (r:0 w:1)
246	/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
247	fn cancel_retry_named() -> Weight {
248		// Proof Size summary in bytes:
249		//  Measured:  `9618`
250		//  Estimated: `42923`
251		// Minimum execution time: 38_266_000 picoseconds.
252		Weight::from_parts(39_145_000, 42923)
253			.saturating_add(T::DbWeight::get().reads(2_u64))
254			.saturating_add(T::DbWeight::get().writes(1_u64))
255	}
256}
257
258
259#[cfg(test)]
260mod tests {
261  use frame_support::{traits::Get, weights::Weight, dispatch::DispatchClass};
262  use crate::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
263  use crate::weights::extrinsic_weights::ExtrinsicBaseWeight;
264
265  #[allow(dead_code)]
266  struct BlockWeights;
267  impl Get<frame_system::limits::BlockWeights> for BlockWeights {
268  	fn get() -> frame_system::limits::BlockWeights {
269  		frame_system::limits::BlockWeights::builder()
270  			.base_block(Weight::zero())
271  			.for_class(DispatchClass::all(), |weights| {
272  				weights.base_extrinsic = ExtrinsicBaseWeight::get();
273  			})
274  			.for_class(DispatchClass::non_mandatory(), |weights| {
275  				weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);
276  			})
277  			.build_or_panic()
278  	}
279  }
280
281	#[test]
282	fn test_service_agendas_base() {
283		assert!(
284			BlockWeights::get()
285				.per_class
286				.get(frame_support::dispatch::DispatchClass::Normal)
287				.max_extrinsic
288				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
289				.proof_size()
290				> 1984
291		);
292	}
293	#[test]
294	fn test_service_agenda_base() {
295		assert!(
296			BlockWeights::get()
297				.per_class
298				.get(frame_support::dispatch::DispatchClass::Normal)
299				.max_extrinsic
300				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
301				.proof_size()
302				> 42923
303		);
304	}
305	#[test]
306	fn test_service_task_fetched() {
307		assert!(
308			BlockWeights::get()
309				.per_class
310				.get(frame_support::dispatch::DispatchClass::Normal)
311				.max_extrinsic
312				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
313				.proof_size()
314				> 4101
315		);
316	}
317	#[test]
318	fn test_schedule() {
319		assert!(
320			BlockWeights::get()
321				.per_class
322				.get(frame_support::dispatch::DispatchClass::Normal)
323				.max_extrinsic
324				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
325				.proof_size()
326				> 42923
327		);
328	}
329	#[test]
330	fn test_cancel() {
331		assert!(
332			BlockWeights::get()
333				.per_class
334				.get(frame_support::dispatch::DispatchClass::Normal)
335				.max_extrinsic
336				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
337				.proof_size()
338				> 42923
339		);
340	}
341	#[test]
342	fn test_schedule_named() {
343		assert!(
344			BlockWeights::get()
345				.per_class
346				.get(frame_support::dispatch::DispatchClass::Normal)
347				.max_extrinsic
348				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
349				.proof_size()
350				> 42923
351		);
352	}
353	#[test]
354	fn test_cancel_named() {
355		assert!(
356			BlockWeights::get()
357				.per_class
358				.get(frame_support::dispatch::DispatchClass::Normal)
359				.max_extrinsic
360				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
361				.proof_size()
362				> 42923
363		);
364	}
365	#[test]
366	fn test_schedule_retry() {
367		assert!(
368			BlockWeights::get()
369				.per_class
370				.get(frame_support::dispatch::DispatchClass::Normal)
371				.max_extrinsic
372				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
373				.proof_size()
374				> 42923
375		);
376	}
377	#[test]
378	fn test_set_retry() {
379		assert!(
380			BlockWeights::get()
381				.per_class
382				.get(frame_support::dispatch::DispatchClass::Normal)
383				.max_extrinsic
384				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
385				.proof_size()
386				> 42923
387		);
388	}
389	#[test]
390	fn test_set_retry_named() {
391		assert!(
392			BlockWeights::get()
393				.per_class
394				.get(frame_support::dispatch::DispatchClass::Normal)
395				.max_extrinsic
396				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
397				.proof_size()
398				> 42923
399		);
400	}
401	#[test]
402	fn test_cancel_retry() {
403		assert!(
404			BlockWeights::get()
405				.per_class
406				.get(frame_support::dispatch::DispatchClass::Normal)
407				.max_extrinsic
408				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
409				.proof_size()
410				> 42923
411		);
412	}
413	#[test]
414	fn test_cancel_retry_named() {
415		assert!(
416			BlockWeights::get()
417				.per_class
418				.get(frame_support::dispatch::DispatchClass::Normal)
419				.max_extrinsic
420				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
421				.proof_size()
422				> 42923
423		);
424	}
425}