common_runtime/weights/
pallet_proxy.rs

1//! Autogenerated weights for pallet_proxy
2//!
3//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 48.0.0
4//! DATE: 2025-09-15, 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_proxy
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_proxy` using the Substrate node and recommended hardware.
34pub struct SubstrateWeight<T>(PhantomData<T>);
35impl<T: frame_system::Config> pallet_proxy::WeightInfo for SubstrateWeight<T> {
36	/// Storage: `Proxy::Proxies` (r:1 w:0)
37	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
38	/// The range of component `p` is `[1, 31]`.
39	fn proxy(p: u32, ) -> Weight {
40		// Proof Size summary in bytes:
41		//  Measured:  `161 + p * (37 ±0)`
42		//  Estimated: `5201`
43		// Minimum execution time: 16_108_000 picoseconds.
44		Weight::from_parts(16_865_154, 5201)
45			// Standard Error: 1_000
46			.saturating_add(Weight::from_parts(34_114, 0).saturating_mul(p.into()))
47			.saturating_add(T::DbWeight::get().reads(1_u64))
48	}
49	/// Storage: `Proxy::Proxies` (r:1 w:0)
50	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
51	/// Storage: `Proxy::Announcements` (r:1 w:1)
52	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
53	/// Storage: `System::Account` (r:1 w:1)
54	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
55	/// The range of component `a` is `[0, 31]`.
56	/// The range of component `p` is `[1, 31]`.
57	fn proxy_announced(a: u32, p: u32, ) -> Weight {
58		// Proof Size summary in bytes:
59		//  Measured:  `488 + a * (68 ±0) + p * (37 ±0)`
60		//  Estimated: `6193`
61		// Minimum execution time: 38_850_000 picoseconds.
62		Weight::from_parts(40_194_312, 6193)
63			// Standard Error: 1_925
64			.saturating_add(Weight::from_parts(162_309, 0).saturating_mul(a.into()))
65			// Standard Error: 1_989
66			.saturating_add(Weight::from_parts(27_031, 0).saturating_mul(p.into()))
67			.saturating_add(T::DbWeight::get().reads(3_u64))
68			.saturating_add(T::DbWeight::get().writes(2_u64))
69	}
70	/// Storage: `Proxy::Announcements` (r:1 w:1)
71	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
72	/// Storage: `System::Account` (r:1 w:1)
73	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
74	/// The range of component `a` is `[0, 31]`.
75	/// The range of component `p` is `[1, 31]`.
76	fn remove_announcement(a: u32, p: u32, ) -> Weight {
77		// Proof Size summary in bytes:
78		//  Measured:  `403 + a * (68 ±0)`
79		//  Estimated: `6193`
80		// Minimum execution time: 27_735_000 picoseconds.
81		Weight::from_parts(28_842_812, 6193)
82			// Standard Error: 1_500
83			.saturating_add(Weight::from_parts(153_953, 0).saturating_mul(a.into()))
84			// Standard Error: 1_549
85			.saturating_add(Weight::from_parts(5_891, 0).saturating_mul(p.into()))
86			.saturating_add(T::DbWeight::get().reads(2_u64))
87			.saturating_add(T::DbWeight::get().writes(2_u64))
88	}
89	/// Storage: `Proxy::Announcements` (r:1 w:1)
90	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
91	/// Storage: `System::Account` (r:1 w:1)
92	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
93	/// The range of component `a` is `[0, 31]`.
94	/// The range of component `p` is `[1, 31]`.
95	fn reject_announcement(a: u32, p: u32, ) -> Weight {
96		// Proof Size summary in bytes:
97		//  Measured:  `403 + a * (68 ±0)`
98		//  Estimated: `6193`
99		// Minimum execution time: 27_923_000 picoseconds.
100		Weight::from_parts(28_836_759, 6193)
101			// Standard Error: 1_466
102			.saturating_add(Weight::from_parts(155_991, 0).saturating_mul(a.into()))
103			// Standard Error: 1_514
104			.saturating_add(Weight::from_parts(8_203, 0).saturating_mul(p.into()))
105			.saturating_add(T::DbWeight::get().reads(2_u64))
106			.saturating_add(T::DbWeight::get().writes(2_u64))
107	}
108	/// Storage: `Proxy::Proxies` (r:1 w:0)
109	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
110	/// Storage: `Proxy::Announcements` (r:1 w:1)
111	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
112	/// Storage: `System::Account` (r:1 w:1)
113	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
114	/// The range of component `a` is `[0, 31]`.
115	/// The range of component `p` is `[1, 31]`.
116	fn announce(a: u32, p: u32, ) -> Weight {
117		// Proof Size summary in bytes:
118		//  Measured:  `420 + a * (68 ±0) + p * (37 ±0)`
119		//  Estimated: `6193`
120		// Minimum execution time: 35_526_000 picoseconds.
121		Weight::from_parts(36_334_018, 6193)
122			// Standard Error: 1_808
123			.saturating_add(Weight::from_parts(157_524, 0).saturating_mul(a.into()))
124			// Standard Error: 1_868
125			.saturating_add(Weight::from_parts(33_979, 0).saturating_mul(p.into()))
126			.saturating_add(T::DbWeight::get().reads(3_u64))
127			.saturating_add(T::DbWeight::get().writes(2_u64))
128	}
129	/// Storage: `Proxy::Proxies` (r:1 w:1)
130	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
131	/// The range of component `p` is `[1, 31]`.
132	fn add_proxy(p: u32, ) -> Weight {
133		// Proof Size summary in bytes:
134		//  Measured:  `161 + p * (37 ±0)`
135		//  Estimated: `5201`
136		// Minimum execution time: 25_854_000 picoseconds.
137		Weight::from_parts(26_978_804, 5201)
138			// Standard Error: 1_242
139			.saturating_add(Weight::from_parts(43_860, 0).saturating_mul(p.into()))
140			.saturating_add(T::DbWeight::get().reads(1_u64))
141			.saturating_add(T::DbWeight::get().writes(1_u64))
142	}
143	/// Storage: `Proxy::Proxies` (r:1 w:1)
144	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
145	/// The range of component `p` is `[1, 31]`.
146	fn remove_proxy(p: u32, ) -> Weight {
147		// Proof Size summary in bytes:
148		//  Measured:  `161 + p * (37 ±0)`
149		//  Estimated: `5201`
150		// Minimum execution time: 26_145_000 picoseconds.
151		Weight::from_parts(27_355_025, 5201)
152			// Standard Error: 1_322
153			.saturating_add(Weight::from_parts(38_568, 0).saturating_mul(p.into()))
154			.saturating_add(T::DbWeight::get().reads(1_u64))
155			.saturating_add(T::DbWeight::get().writes(1_u64))
156	}
157	/// Storage: `Proxy::Proxies` (r:1 w:1)
158	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
159	/// The range of component `p` is `[1, 31]`.
160	fn remove_proxies(p: u32, ) -> Weight {
161		// Proof Size summary in bytes:
162		//  Measured:  `161 + p * (37 ±0)`
163		//  Estimated: `5201`
164		// Minimum execution time: 24_016_000 picoseconds.
165		Weight::from_parts(24_831_692, 5201)
166			// Standard Error: 1_158
167			.saturating_add(Weight::from_parts(27_404, 0).saturating_mul(p.into()))
168			.saturating_add(T::DbWeight::get().reads(1_u64))
169			.saturating_add(T::DbWeight::get().writes(1_u64))
170	}
171	/// Storage: `Proxy::Proxies` (r:1 w:1)
172	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
173	/// The range of component `p` is `[1, 31]`.
174	fn create_pure(p: u32, ) -> Weight {
175		// Proof Size summary in bytes:
176		//  Measured:  `173`
177		//  Estimated: `5201`
178		// Minimum execution time: 27_075_000 picoseconds.
179		Weight::from_parts(28_327_459, 5201)
180			// Standard Error: 1_247
181			.saturating_add(Weight::from_parts(17_353, 0).saturating_mul(p.into()))
182			.saturating_add(T::DbWeight::get().reads(1_u64))
183			.saturating_add(T::DbWeight::get().writes(1_u64))
184	}
185	/// Storage: `Proxy::Proxies` (r:1 w:1)
186	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
187	/// The range of component `p` is `[0, 30]`.
188	fn kill_pure(p: u32, ) -> Weight {
189		// Proof Size summary in bytes:
190		//  Measured:  `198 + p * (37 ±0)`
191		//  Estimated: `5201`
192		// Minimum execution time: 24_605_000 picoseconds.
193		Weight::from_parts(25_698_961, 5201)
194			// Standard Error: 1_197
195			.saturating_add(Weight::from_parts(27_626, 0).saturating_mul(p.into()))
196			.saturating_add(T::DbWeight::get().reads(1_u64))
197			.saturating_add(T::DbWeight::get().writes(1_u64))
198	}
199	/// Storage: `Proxy::Proxies` (r:1 w:1)
200	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
201	/// Storage: `System::Account` (r:1 w:1)
202	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
203	/// Storage: `Proxy::Announcements` (r:1 w:1)
204	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
205	fn poke_deposit() -> Weight {
206		// Proof Size summary in bytes:
207		//  Measured:  `524`
208		//  Estimated: `6193`
209		// Minimum execution time: 46_908_000 picoseconds.
210		Weight::from_parts(48_186_000, 6193)
211			.saturating_add(T::DbWeight::get().reads(3_u64))
212			.saturating_add(T::DbWeight::get().writes(3_u64))
213	}
214}
215
216
217#[cfg(test)]
218mod tests {
219  use frame_support::{traits::Get, weights::Weight, dispatch::DispatchClass};
220  use crate::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
221  use crate::weights::extrinsic_weights::ExtrinsicBaseWeight;
222
223  #[allow(dead_code)]
224  struct BlockWeights;
225  impl Get<frame_system::limits::BlockWeights> for BlockWeights {
226  	fn get() -> frame_system::limits::BlockWeights {
227  		frame_system::limits::BlockWeights::builder()
228  			.base_block(Weight::zero())
229  			.for_class(DispatchClass::all(), |weights| {
230  				weights.base_extrinsic = ExtrinsicBaseWeight::get();
231  			})
232  			.for_class(DispatchClass::non_mandatory(), |weights| {
233  				weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);
234  			})
235  			.build_or_panic()
236  	}
237  }
238
239	#[test]
240	fn test_proxy() {
241		assert!(
242			BlockWeights::get()
243				.per_class
244				.get(frame_support::dispatch::DispatchClass::Normal)
245				.max_extrinsic
246				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
247				.proof_size()
248				> 5201
249		);
250	}
251	#[test]
252	fn test_proxy_announced() {
253		assert!(
254			BlockWeights::get()
255				.per_class
256				.get(frame_support::dispatch::DispatchClass::Normal)
257				.max_extrinsic
258				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
259				.proof_size()
260				> 6193
261		);
262	}
263	#[test]
264	fn test_remove_announcement() {
265		assert!(
266			BlockWeights::get()
267				.per_class
268				.get(frame_support::dispatch::DispatchClass::Normal)
269				.max_extrinsic
270				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
271				.proof_size()
272				> 6193
273		);
274	}
275	#[test]
276	fn test_reject_announcement() {
277		assert!(
278			BlockWeights::get()
279				.per_class
280				.get(frame_support::dispatch::DispatchClass::Normal)
281				.max_extrinsic
282				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
283				.proof_size()
284				> 6193
285		);
286	}
287	#[test]
288	fn test_announce() {
289		assert!(
290			BlockWeights::get()
291				.per_class
292				.get(frame_support::dispatch::DispatchClass::Normal)
293				.max_extrinsic
294				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
295				.proof_size()
296				> 6193
297		);
298	}
299	#[test]
300	fn test_add_proxy() {
301		assert!(
302			BlockWeights::get()
303				.per_class
304				.get(frame_support::dispatch::DispatchClass::Normal)
305				.max_extrinsic
306				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
307				.proof_size()
308				> 5201
309		);
310	}
311	#[test]
312	fn test_remove_proxy() {
313		assert!(
314			BlockWeights::get()
315				.per_class
316				.get(frame_support::dispatch::DispatchClass::Normal)
317				.max_extrinsic
318				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
319				.proof_size()
320				> 5201
321		);
322	}
323	#[test]
324	fn test_remove_proxies() {
325		assert!(
326			BlockWeights::get()
327				.per_class
328				.get(frame_support::dispatch::DispatchClass::Normal)
329				.max_extrinsic
330				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
331				.proof_size()
332				> 5201
333		);
334	}
335	#[test]
336	fn test_create_pure() {
337		assert!(
338			BlockWeights::get()
339				.per_class
340				.get(frame_support::dispatch::DispatchClass::Normal)
341				.max_extrinsic
342				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
343				.proof_size()
344				> 5201
345		);
346	}
347	#[test]
348	fn test_kill_pure() {
349		assert!(
350			BlockWeights::get()
351				.per_class
352				.get(frame_support::dispatch::DispatchClass::Normal)
353				.max_extrinsic
354				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
355				.proof_size()
356				> 5201
357		);
358	}
359	#[test]
360	fn test_poke_deposit() {
361		assert!(
362			BlockWeights::get()
363				.per_class
364				.get(frame_support::dispatch::DispatchClass::Normal)
365				.max_extrinsic
366				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
367				.proof_size()
368				> 6193
369		);
370	}
371}