referrerpolicy=no-referrer-when-downgrade

pallet_whitelist/
weights.rs

1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// 	http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18// This file is part of Substrate.
19
20// Copyright (C) Parity Technologies (UK) Ltd.
21// SPDX-License-Identifier: Apache-2.0
22
23// Licensed under the Apache License, Version 2.0 (the "License");
24// you may not use this file except in compliance with the License.
25// You may obtain a copy of the License at
26//
27// 	http://www.apache.org/licenses/LICENSE-2.0
28//
29// Unless required by applicable law or agreed to in writing, software
30// distributed under the License is distributed on an "AS IS" BASIS,
31// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32// See the License for the specific language governing permissions and
33// limitations under the License.
34
35//! Autogenerated weights for `pallet_whitelist`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2026-10-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `7260648bc50a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
41//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
42
43// Executed Command:
44// frame-omni-bencher
45// v1
46// benchmark
47// pallet
48// --extrinsic=*
49// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
50// --pallet=pallet_whitelist
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/whitelist/src/weights.rs
53// --wasm-execution=compiled
54// --steps=50
55// --repeat=20
56// --heap-pages=4096
57// --template=substrate/.maintain/frame-umbrella-weight-template.hbs
58// --no-storage-info
59// --no-min-squares
60// --no-median-slopes
61// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic,pallet_nomination_pools,pallet_remark,pallet_transaction_storage
62
63#![cfg_attr(rustfmt, rustfmt_skip)]
64#![allow(unused_parens)]
65#![allow(unused_imports)]
66#![allow(missing_docs)]
67#![allow(dead_code)]
68
69use frame::weights_prelude::*;
70
71/// Weight functions needed for `pallet_whitelist`.
72pub trait WeightInfo {
73	fn whitelist_call() -> Weight;
74	fn remove_whitelisted_call() -> Weight;
75	fn defer_dispatch(n: u32, ) -> Weight;
76	fn remove_deferred_dispatch() -> Weight;
77	fn dispatch_whitelisted_call(n: u32, ) -> Weight;
78	fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight;
79	fn authorize_dispatch_whitelisted_call(n: u32, ) -> Weight;
80	fn authorize_dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight;
81}
82
83/// Weights for `pallet_whitelist` using the Substrate node and recommended hardware.
84pub struct SubstrateWeight<T>(PhantomData<T>);
85impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
86	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
87	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
88	/// Storage: `Preimage::StatusFor` (r:1 w:0)
89	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
90	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
91	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
92	fn whitelist_call() -> Weight {
93		// Proof Size summary in bytes:
94		//  Measured:  `245`
95		//  Estimated: `3556`
96		// Minimum execution time: 18_567_000 picoseconds.
97		Weight::from_parts(20_024_000, 3556)
98			.saturating_add(T::DbWeight::get().reads(3_u64))
99			.saturating_add(T::DbWeight::get().writes(2_u64))
100	}
101	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
102	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
103	/// Storage: `Preimage::StatusFor` (r:1 w:0)
104	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
105	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
106	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
107	fn remove_whitelisted_call() -> Weight {
108		// Proof Size summary in bytes:
109		//  Measured:  `374`
110		//  Estimated: `3556`
111		// Minimum execution time: 20_770_000 picoseconds.
112		Weight::from_parts(22_198_000, 3556)
113			.saturating_add(T::DbWeight::get().reads(3_u64))
114			.saturating_add(T::DbWeight::get().writes(2_u64))
115	}
116	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:0)
117	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
118	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
119	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
120	/// The range of component `n` is `[1, 10000]`.
121	fn defer_dispatch(n: u32, ) -> Weight {
122		// Proof Size summary in bytes:
123		//  Measured:  `241`
124		//  Estimated: `3509`
125		// Minimum execution time: 14_064_000 picoseconds.
126		Weight::from_parts(15_137_018, 3509)
127			// Standard Error: 0
128			.saturating_add(Weight::from_parts(1_381, 0).saturating_mul(n.into()))
129			.saturating_add(T::DbWeight::get().reads(2_u64))
130			.saturating_add(T::DbWeight::get().writes(1_u64))
131	}
132	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
133	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
134	fn remove_deferred_dispatch() -> Weight {
135		// Proof Size summary in bytes:
136		//  Measured:  `310`
137		//  Estimated: `3509`
138		// Minimum execution time: 12_986_000 picoseconds.
139		Weight::from_parts(14_141_000, 3509)
140			.saturating_add(T::DbWeight::get().reads(1_u64))
141			.saturating_add(T::DbWeight::get().writes(1_u64))
142	}
143	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
144	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
145	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
146	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
147	/// Storage: `Preimage::PreimageFor` (r:1 w:1)
148	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
149	/// Storage: `Preimage::StatusFor` (r:1 w:0)
150	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
151	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
152	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
153	/// The range of component `n` is `[1, 4194294]`.
154	fn dispatch_whitelisted_call(n: u32, ) -> Weight {
155		// Proof Size summary in bytes:
156		//  Measured:  `515 + n * (1 ±0)`
157		//  Estimated: `3979 + n * (1 ±0)`
158		// Minimum execution time: 41_550_000 picoseconds.
159		Weight::from_parts(42_217_000, 3979)
160			// Standard Error: 15
161			.saturating_add(Weight::from_parts(1_776, 0).saturating_mul(n.into()))
162			.saturating_add(T::DbWeight::get().reads(5_u64))
163			.saturating_add(T::DbWeight::get().writes(4_u64))
164			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
165	}
166	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
167	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
168	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
169	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
170	/// Storage: `Preimage::StatusFor` (r:1 w:0)
171	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
172	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
173	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
174	/// The range of component `n` is `[1, 10000]`.
175	fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight {
176		// Proof Size summary in bytes:
177		//  Measured:  `439`
178		//  Estimated: `3556`
179		// Minimum execution time: 33_131_000 picoseconds.
180		Weight::from_parts(34_853_877, 3556)
181			// Standard Error: 1
182			.saturating_add(Weight::from_parts(1_398, 0).saturating_mul(n.into()))
183			.saturating_add(T::DbWeight::get().reads(4_u64))
184			.saturating_add(T::DbWeight::get().writes(3_u64))
185	}
186	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:0)
187	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
188	/// Storage: `Preimage::PreimageFor` (r:1 w:0)
189	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
190	/// The range of component `n` is `[1, 4194294]`.
191	fn authorize_dispatch_whitelisted_call(n: u32, ) -> Weight {
192		// Proof Size summary in bytes:
193		//  Measured:  `420 + n * (1 ±0)`
194		//  Estimated: `3884 + n * (1 ±0)`
195		// Minimum execution time: 14_851_000 picoseconds.
196		Weight::from_parts(15_105_000, 3884)
197			// Standard Error: 16
198			.saturating_add(Weight::from_parts(1_841, 0).saturating_mul(n.into()))
199			.saturating_add(T::DbWeight::get().reads(2_u64))
200			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
201	}
202	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:0)
203	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
204	/// The range of component `n` is `[1, 14942198]`.
205	fn authorize_dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight {
206		// Proof Size summary in bytes:
207		//  Measured:  `306`
208		//  Estimated: `3505`
209		// Minimum execution time: 7_833_000 picoseconds.
210		Weight::from_parts(8_016_000, 3505)
211			// Standard Error: 1
212			.saturating_add(Weight::from_parts(1_735, 0).saturating_mul(n.into()))
213			.saturating_add(T::DbWeight::get().reads(1_u64))
214	}
215}
216
217// For backwards compatibility and tests.
218impl WeightInfo for () {
219	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
220	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
221	/// Storage: `Preimage::StatusFor` (r:1 w:0)
222	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
223	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
224	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
225	fn whitelist_call() -> Weight {
226		// Proof Size summary in bytes:
227		//  Measured:  `245`
228		//  Estimated: `3556`
229		// Minimum execution time: 18_567_000 picoseconds.
230		Weight::from_parts(20_024_000, 3556)
231			.saturating_add(RocksDbWeight::get().reads(3_u64))
232			.saturating_add(RocksDbWeight::get().writes(2_u64))
233	}
234	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
235	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
236	/// Storage: `Preimage::StatusFor` (r:1 w:0)
237	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
238	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
239	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
240	fn remove_whitelisted_call() -> Weight {
241		// Proof Size summary in bytes:
242		//  Measured:  `374`
243		//  Estimated: `3556`
244		// Minimum execution time: 20_770_000 picoseconds.
245		Weight::from_parts(22_198_000, 3556)
246			.saturating_add(RocksDbWeight::get().reads(3_u64))
247			.saturating_add(RocksDbWeight::get().writes(2_u64))
248	}
249	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:0)
250	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
251	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
252	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
253	/// The range of component `n` is `[1, 10000]`.
254	fn defer_dispatch(n: u32, ) -> Weight {
255		// Proof Size summary in bytes:
256		//  Measured:  `241`
257		//  Estimated: `3509`
258		// Minimum execution time: 14_064_000 picoseconds.
259		Weight::from_parts(15_137_018, 3509)
260			// Standard Error: 0
261			.saturating_add(Weight::from_parts(1_381, 0).saturating_mul(n.into()))
262			.saturating_add(RocksDbWeight::get().reads(2_u64))
263			.saturating_add(RocksDbWeight::get().writes(1_u64))
264	}
265	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
266	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
267	fn remove_deferred_dispatch() -> Weight {
268		// Proof Size summary in bytes:
269		//  Measured:  `310`
270		//  Estimated: `3509`
271		// Minimum execution time: 12_986_000 picoseconds.
272		Weight::from_parts(14_141_000, 3509)
273			.saturating_add(RocksDbWeight::get().reads(1_u64))
274			.saturating_add(RocksDbWeight::get().writes(1_u64))
275	}
276	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
277	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
278	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
279	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
280	/// Storage: `Preimage::PreimageFor` (r:1 w:1)
281	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
282	/// Storage: `Preimage::StatusFor` (r:1 w:0)
283	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
284	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
285	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
286	/// The range of component `n` is `[1, 4194294]`.
287	fn dispatch_whitelisted_call(n: u32, ) -> Weight {
288		// Proof Size summary in bytes:
289		//  Measured:  `515 + n * (1 ±0)`
290		//  Estimated: `3979 + n * (1 ±0)`
291		// Minimum execution time: 41_550_000 picoseconds.
292		Weight::from_parts(42_217_000, 3979)
293			// Standard Error: 15
294			.saturating_add(Weight::from_parts(1_776, 0).saturating_mul(n.into()))
295			.saturating_add(RocksDbWeight::get().reads(5_u64))
296			.saturating_add(RocksDbWeight::get().writes(4_u64))
297			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
298	}
299	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
300	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
301	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
302	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
303	/// Storage: `Preimage::StatusFor` (r:1 w:0)
304	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
305	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
306	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
307	/// The range of component `n` is `[1, 10000]`.
308	fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight {
309		// Proof Size summary in bytes:
310		//  Measured:  `439`
311		//  Estimated: `3556`
312		// Minimum execution time: 33_131_000 picoseconds.
313		Weight::from_parts(34_853_877, 3556)
314			// Standard Error: 1
315			.saturating_add(Weight::from_parts(1_398, 0).saturating_mul(n.into()))
316			.saturating_add(RocksDbWeight::get().reads(4_u64))
317			.saturating_add(RocksDbWeight::get().writes(3_u64))
318	}
319	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:0)
320	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
321	/// Storage: `Preimage::PreimageFor` (r:1 w:0)
322	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
323	/// The range of component `n` is `[1, 4194294]`.
324	fn authorize_dispatch_whitelisted_call(n: u32, ) -> Weight {
325		// Proof Size summary in bytes:
326		//  Measured:  `420 + n * (1 ±0)`
327		//  Estimated: `3884 + n * (1 ±0)`
328		// Minimum execution time: 14_851_000 picoseconds.
329		Weight::from_parts(15_105_000, 3884)
330			// Standard Error: 16
331			.saturating_add(Weight::from_parts(1_841, 0).saturating_mul(n.into()))
332			.saturating_add(RocksDbWeight::get().reads(2_u64))
333			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
334	}
335	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:0)
336	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
337	/// The range of component `n` is `[1, 14942198]`.
338	fn authorize_dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight {
339		// Proof Size summary in bytes:
340		//  Measured:  `306`
341		//  Estimated: `3505`
342		// Minimum execution time: 7_833_000 picoseconds.
343		Weight::from_parts(8_016_000, 3505)
344			// Standard Error: 1
345			.saturating_add(Weight::from_parts(1_735, 0).saturating_mul(n.into()))
346			.saturating_add(RocksDbWeight::get().reads(1_u64))
347	}
348}