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 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_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_304_000 picoseconds.
44		Weight::from_parts(17_092_913, 5201)
45			// Standard Error: 1_057
46			.saturating_add(Weight::from_parts(37_418, 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: 40_509_000 picoseconds.
62		Weight::from_parts(41_009_116, 6193)
63			// Standard Error: 2_094
64			.saturating_add(Weight::from_parts(181_575, 0).saturating_mul(a.into()))
65			// Standard Error: 2_163
66			.saturating_add(Weight::from_parts(36_817, 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: 28_525_000 picoseconds.
81		Weight::from_parts(29_669_613, 6193)
82			// Standard Error: 1_618
83			.saturating_add(Weight::from_parts(167_195, 0).saturating_mul(a.into()))
84			// Standard Error: 1_672
85			.saturating_add(Weight::from_parts(5_301, 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: 28_435_000 picoseconds.
100		Weight::from_parts(30_272_772, 6193)
101			// Standard Error: 4_360
102			.saturating_add(Weight::from_parts(162_701, 0).saturating_mul(a.into()))
103			.saturating_add(T::DbWeight::get().reads(2_u64))
104			.saturating_add(T::DbWeight::get().writes(2_u64))
105	}
106	/// Storage: `Proxy::Proxies` (r:1 w:0)
107	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
108	/// Storage: `Proxy::Announcements` (r:1 w:1)
109	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
110	/// Storage: `System::Account` (r:1 w:1)
111	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
112	/// The range of component `a` is `[0, 31]`.
113	/// The range of component `p` is `[1, 31]`.
114	fn announce(a: u32, p: u32, ) -> Weight {
115		// Proof Size summary in bytes:
116		//  Measured:  `420 + a * (68 ±0) + p * (37 ±0)`
117		//  Estimated: `6193`
118		// Minimum execution time: 36_191_000 picoseconds.
119		Weight::from_parts(37_037_023, 6193)
120			// Standard Error: 1_908
121			.saturating_add(Weight::from_parts(164_634, 0).saturating_mul(a.into()))
122			// Standard Error: 1_971
123			.saturating_add(Weight::from_parts(36_479, 0).saturating_mul(p.into()))
124			.saturating_add(T::DbWeight::get().reads(3_u64))
125			.saturating_add(T::DbWeight::get().writes(2_u64))
126	}
127	/// Storage: `Proxy::Proxies` (r:1 w:1)
128	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
129	/// The range of component `p` is `[1, 31]`.
130	fn add_proxy(p: u32, ) -> Weight {
131		// Proof Size summary in bytes:
132		//  Measured:  `161 + p * (37 ±0)`
133		//  Estimated: `5201`
134		// Minimum execution time: 27_144_000 picoseconds.
135		Weight::from_parts(27_961_018, 5201)
136			// Standard Error: 1_260
137			.saturating_add(Weight::from_parts(48_600, 0).saturating_mul(p.into()))
138			.saturating_add(T::DbWeight::get().reads(1_u64))
139			.saturating_add(T::DbWeight::get().writes(1_u64))
140	}
141	/// Storage: `Proxy::Proxies` (r:1 w:1)
142	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
143	/// The range of component `p` is `[1, 31]`.
144	fn remove_proxy(p: u32, ) -> Weight {
145		// Proof Size summary in bytes:
146		//  Measured:  `161 + p * (37 ±0)`
147		//  Estimated: `5201`
148		// Minimum execution time: 26_898_000 picoseconds.
149		Weight::from_parts(28_104_292, 5201)
150			// Standard Error: 1_280
151			.saturating_add(Weight::from_parts(53_821, 0).saturating_mul(p.into()))
152			.saturating_add(T::DbWeight::get().reads(1_u64))
153			.saturating_add(T::DbWeight::get().writes(1_u64))
154	}
155	/// Storage: `Proxy::Proxies` (r:1 w:1)
156	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
157	/// The range of component `p` is `[1, 31]`.
158	fn remove_proxies(p: u32, ) -> Weight {
159		// Proof Size summary in bytes:
160		//  Measured:  `161 + p * (37 ±0)`
161		//  Estimated: `5201`
162		// Minimum execution time: 24_158_000 picoseconds.
163		Weight::from_parts(25_252_452, 5201)
164			// Standard Error: 1_318
165			.saturating_add(Weight::from_parts(32_669, 0).saturating_mul(p.into()))
166			.saturating_add(T::DbWeight::get().reads(1_u64))
167			.saturating_add(T::DbWeight::get().writes(1_u64))
168	}
169	/// Storage: `Proxy::Proxies` (r:1 w:1)
170	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
171	/// The range of component `p` is `[1, 31]`.
172	fn create_pure(p: u32, ) -> Weight {
173		// Proof Size summary in bytes:
174		//  Measured:  `173`
175		//  Estimated: `5201`
176		// Minimum execution time: 28_299_000 picoseconds.
177		Weight::from_parts(29_317_835, 5201)
178			// Standard Error: 1_262
179			.saturating_add(Weight::from_parts(23_150, 0).saturating_mul(p.into()))
180			.saturating_add(T::DbWeight::get().reads(1_u64))
181			.saturating_add(T::DbWeight::get().writes(1_u64))
182	}
183	/// Storage: `Proxy::Proxies` (r:1 w:1)
184	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
185	/// The range of component `p` is `[0, 30]`.
186	fn kill_pure(p: u32, ) -> Weight {
187		// Proof Size summary in bytes:
188		//  Measured:  `198 + p * (37 ±0)`
189		//  Estimated: `5201`
190		// Minimum execution time: 27_216_000 picoseconds.
191		Weight::from_parts(28_490_074, 5201)
192			// Standard Error: 1_273
193			.saturating_add(Weight::from_parts(35_968, 0).saturating_mul(p.into()))
194			.saturating_add(T::DbWeight::get().reads(1_u64))
195			.saturating_add(T::DbWeight::get().writes(1_u64))
196	}
197	/// Storage: `Proxy::Proxies` (r:1 w:1)
198	/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
199	/// Storage: `System::Account` (r:1 w:1)
200	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
201	/// Storage: `Proxy::Announcements` (r:1 w:1)
202	/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
203	fn poke_deposit() -> Weight {
204		// Proof Size summary in bytes:
205		//  Measured:  `524`
206		//  Estimated: `6193`
207		// Minimum execution time: 48_379_000 picoseconds.
208		Weight::from_parts(49_216_000, 6193)
209			.saturating_add(T::DbWeight::get().reads(3_u64))
210			.saturating_add(T::DbWeight::get().writes(3_u64))
211	}
212}
213
214
215#[cfg(test)]
216mod tests {
217  use frame_support::{traits::Get, weights::Weight, dispatch::DispatchClass};
218  use crate::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
219  use crate::weights::extrinsic_weights::ExtrinsicBaseWeight;
220
221  #[allow(dead_code)]
222  struct BlockWeights;
223  impl Get<frame_system::limits::BlockWeights> for BlockWeights {
224  	fn get() -> frame_system::limits::BlockWeights {
225  		frame_system::limits::BlockWeights::builder()
226  			.base_block(Weight::zero())
227  			.for_class(DispatchClass::all(), |weights| {
228  				weights.base_extrinsic = ExtrinsicBaseWeight::get();
229  			})
230  			.for_class(DispatchClass::non_mandatory(), |weights| {
231  				weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);
232  			})
233  			.build_or_panic()
234  	}
235  }
236
237	#[test]
238	fn test_proxy() {
239		assert!(
240			BlockWeights::get()
241				.per_class
242				.get(frame_support::dispatch::DispatchClass::Normal)
243				.max_extrinsic
244				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
245				.proof_size()
246				> 5201
247		);
248	}
249	#[test]
250	fn test_proxy_announced() {
251		assert!(
252			BlockWeights::get()
253				.per_class
254				.get(frame_support::dispatch::DispatchClass::Normal)
255				.max_extrinsic
256				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
257				.proof_size()
258				> 6193
259		);
260	}
261	#[test]
262	fn test_remove_announcement() {
263		assert!(
264			BlockWeights::get()
265				.per_class
266				.get(frame_support::dispatch::DispatchClass::Normal)
267				.max_extrinsic
268				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
269				.proof_size()
270				> 6193
271		);
272	}
273	#[test]
274	fn test_reject_announcement() {
275		assert!(
276			BlockWeights::get()
277				.per_class
278				.get(frame_support::dispatch::DispatchClass::Normal)
279				.max_extrinsic
280				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
281				.proof_size()
282				> 6193
283		);
284	}
285	#[test]
286	fn test_announce() {
287		assert!(
288			BlockWeights::get()
289				.per_class
290				.get(frame_support::dispatch::DispatchClass::Normal)
291				.max_extrinsic
292				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
293				.proof_size()
294				> 6193
295		);
296	}
297	#[test]
298	fn test_add_proxy() {
299		assert!(
300			BlockWeights::get()
301				.per_class
302				.get(frame_support::dispatch::DispatchClass::Normal)
303				.max_extrinsic
304				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
305				.proof_size()
306				> 5201
307		);
308	}
309	#[test]
310	fn test_remove_proxy() {
311		assert!(
312			BlockWeights::get()
313				.per_class
314				.get(frame_support::dispatch::DispatchClass::Normal)
315				.max_extrinsic
316				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
317				.proof_size()
318				> 5201
319		);
320	}
321	#[test]
322	fn test_remove_proxies() {
323		assert!(
324			BlockWeights::get()
325				.per_class
326				.get(frame_support::dispatch::DispatchClass::Normal)
327				.max_extrinsic
328				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
329				.proof_size()
330				> 5201
331		);
332	}
333	#[test]
334	fn test_create_pure() {
335		assert!(
336			BlockWeights::get()
337				.per_class
338				.get(frame_support::dispatch::DispatchClass::Normal)
339				.max_extrinsic
340				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
341				.proof_size()
342				> 5201
343		);
344	}
345	#[test]
346	fn test_kill_pure() {
347		assert!(
348			BlockWeights::get()
349				.per_class
350				.get(frame_support::dispatch::DispatchClass::Normal)
351				.max_extrinsic
352				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
353				.proof_size()
354				> 5201
355		);
356	}
357	#[test]
358	fn test_poke_deposit() {
359		assert!(
360			BlockWeights::get()
361				.per_class
362				.get(frame_support::dispatch::DispatchClass::Normal)
363				.max_extrinsic
364				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
365				.proof_size()
366				> 6193
367		);
368	}
369}