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-07-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `491c1b21d17b`, 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}
80
81/// Weights for `pallet_whitelist` using the Substrate node and recommended hardware.
82pub struct SubstrateWeight<T>(PhantomData<T>);
83impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
84	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
85	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
86	/// Storage: `Preimage::StatusFor` (r:1 w:0)
87	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
88	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
89	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
90	fn whitelist_call() -> Weight {
91		// Proof Size summary in bytes:
92		//  Measured:  `245`
93		//  Estimated: `3556`
94		// Minimum execution time: 18_375_000 picoseconds.
95		Weight::from_parts(19_751_000, 3556)
96			.saturating_add(T::DbWeight::get().reads(3_u64))
97			.saturating_add(T::DbWeight::get().writes(2_u64))
98	}
99	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
100	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
101	/// Storage: `Preimage::StatusFor` (r:1 w:0)
102	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
103	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
104	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
105	fn remove_whitelisted_call() -> Weight {
106		// Proof Size summary in bytes:
107		//  Measured:  `374`
108		//  Estimated: `3556`
109		// Minimum execution time: 20_841_000 picoseconds.
110		Weight::from_parts(22_206_000, 3556)
111			.saturating_add(T::DbWeight::get().reads(3_u64))
112			.saturating_add(T::DbWeight::get().writes(2_u64))
113	}
114	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:0)
115	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
116	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
117	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
118	/// The range of component `n` is `[1, 10000]`.
119	fn defer_dispatch(n: u32, ) -> Weight {
120		// Proof Size summary in bytes:
121		//  Measured:  `241`
122		//  Estimated: `3509`
123		// Minimum execution time: 14_130_000 picoseconds.
124		Weight::from_parts(15_138_054, 3509)
125			// Standard Error: 0
126			.saturating_add(Weight::from_parts(1_295, 0).saturating_mul(n.into()))
127			.saturating_add(T::DbWeight::get().reads(2_u64))
128			.saturating_add(T::DbWeight::get().writes(1_u64))
129	}
130	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
131	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
132	fn remove_deferred_dispatch() -> Weight {
133		// Proof Size summary in bytes:
134		//  Measured:  `310`
135		//  Estimated: `3509`
136		// Minimum execution time: 13_096_000 picoseconds.
137		Weight::from_parts(14_284_000, 3509)
138			.saturating_add(T::DbWeight::get().reads(1_u64))
139			.saturating_add(T::DbWeight::get().writes(1_u64))
140	}
141	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
142	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
143	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
144	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
145	/// Storage: `Preimage::PreimageFor` (r:1 w:1)
146	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
147	/// Storage: `Preimage::StatusFor` (r:1 w:0)
148	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
149	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
150	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
151	/// The range of component `n` is `[1, 4194294]`.
152	fn dispatch_whitelisted_call(n: u32, ) -> Weight {
153		// Proof Size summary in bytes:
154		//  Measured:  `515 + n * (1 ±0)`
155		//  Estimated: `3979 + n * (1 ±0)`
156		// Minimum execution time: 41_618_000 picoseconds.
157		Weight::from_parts(42_372_000, 3979)
158			// Standard Error: 16
159			.saturating_add(Weight::from_parts(1_544, 0).saturating_mul(n.into()))
160			.saturating_add(T::DbWeight::get().reads(5_u64))
161			.saturating_add(T::DbWeight::get().writes(4_u64))
162			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
163	}
164	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
165	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
166	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
167	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
168	/// Storage: `Preimage::StatusFor` (r:1 w:0)
169	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
170	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
171	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
172	/// The range of component `n` is `[1, 10000]`.
173	fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight {
174		// Proof Size summary in bytes:
175		//  Measured:  `439`
176		//  Estimated: `3556`
177		// Minimum execution time: 32_813_000 picoseconds.
178		Weight::from_parts(34_794_243, 3556)
179			// Standard Error: 0
180			.saturating_add(Weight::from_parts(1_299, 0).saturating_mul(n.into()))
181			.saturating_add(T::DbWeight::get().reads(4_u64))
182			.saturating_add(T::DbWeight::get().writes(3_u64))
183	}
184}
185
186// For backwards compatibility and tests.
187impl WeightInfo for () {
188	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
189	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
190	/// Storage: `Preimage::StatusFor` (r:1 w:0)
191	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
192	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
193	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
194	fn whitelist_call() -> Weight {
195		// Proof Size summary in bytes:
196		//  Measured:  `245`
197		//  Estimated: `3556`
198		// Minimum execution time: 18_375_000 picoseconds.
199		Weight::from_parts(19_751_000, 3556)
200			.saturating_add(RocksDbWeight::get().reads(3_u64))
201			.saturating_add(RocksDbWeight::get().writes(2_u64))
202	}
203	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
204	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
205	/// Storage: `Preimage::StatusFor` (r:1 w:0)
206	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
207	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
208	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
209	fn remove_whitelisted_call() -> Weight {
210		// Proof Size summary in bytes:
211		//  Measured:  `374`
212		//  Estimated: `3556`
213		// Minimum execution time: 20_841_000 picoseconds.
214		Weight::from_parts(22_206_000, 3556)
215			.saturating_add(RocksDbWeight::get().reads(3_u64))
216			.saturating_add(RocksDbWeight::get().writes(2_u64))
217	}
218	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:0)
219	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
220	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
221	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
222	/// The range of component `n` is `[1, 10000]`.
223	fn defer_dispatch(n: u32, ) -> Weight {
224		// Proof Size summary in bytes:
225		//  Measured:  `241`
226		//  Estimated: `3509`
227		// Minimum execution time: 14_130_000 picoseconds.
228		Weight::from_parts(15_138_054, 3509)
229			// Standard Error: 0
230			.saturating_add(Weight::from_parts(1_295, 0).saturating_mul(n.into()))
231			.saturating_add(RocksDbWeight::get().reads(2_u64))
232			.saturating_add(RocksDbWeight::get().writes(1_u64))
233	}
234	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
235	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
236	fn remove_deferred_dispatch() -> Weight {
237		// Proof Size summary in bytes:
238		//  Measured:  `310`
239		//  Estimated: `3509`
240		// Minimum execution time: 13_096_000 picoseconds.
241		Weight::from_parts(14_284_000, 3509)
242			.saturating_add(RocksDbWeight::get().reads(1_u64))
243			.saturating_add(RocksDbWeight::get().writes(1_u64))
244	}
245	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
246	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
247	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
248	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
249	/// Storage: `Preimage::PreimageFor` (r:1 w:1)
250	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
251	/// Storage: `Preimage::StatusFor` (r:1 w:0)
252	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
253	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
254	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
255	/// The range of component `n` is `[1, 4194294]`.
256	fn dispatch_whitelisted_call(n: u32, ) -> Weight {
257		// Proof Size summary in bytes:
258		//  Measured:  `515 + n * (1 ±0)`
259		//  Estimated: `3979 + n * (1 ±0)`
260		// Minimum execution time: 41_618_000 picoseconds.
261		Weight::from_parts(42_372_000, 3979)
262			// Standard Error: 16
263			.saturating_add(Weight::from_parts(1_544, 0).saturating_mul(n.into()))
264			.saturating_add(RocksDbWeight::get().reads(5_u64))
265			.saturating_add(RocksDbWeight::get().writes(4_u64))
266			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
267	}
268	/// Storage: `Whitelist::DeferredDispatch` (r:1 w:1)
269	/// Proof: `Whitelist::DeferredDispatch` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
270	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
271	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
272	/// Storage: `Preimage::StatusFor` (r:1 w:0)
273	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
274	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
275	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
276	/// The range of component `n` is `[1, 10000]`.
277	fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight {
278		// Proof Size summary in bytes:
279		//  Measured:  `439`
280		//  Estimated: `3556`
281		// Minimum execution time: 32_813_000 picoseconds.
282		Weight::from_parts(34_794_243, 3556)
283			// Standard Error: 0
284			.saturating_add(Weight::from_parts(1_299, 0).saturating_mul(n.into()))
285			.saturating_add(RocksDbWeight::get().reads(4_u64))
286			.saturating_add(RocksDbWeight::get().writes(3_u64))
287	}
288}