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: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `4563561839a5`, 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-weight-template.hbs
58// --no-storage-info
59// --no-min-squares
60// --no-median-slopes
61// --genesis-builder-policy=none
62// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic,pallet_nomination_pools,pallet_remark,pallet_transaction_storage,pallet_election_provider_multi_block,pallet_election_provider_multi_block::signed,pallet_election_provider_multi_block::unsigned,pallet_election_provider_multi_block::verifier
63
64#![cfg_attr(rustfmt, rustfmt_skip)]
65#![allow(unused_parens)]
66#![allow(unused_imports)]
67#![allow(missing_docs)]
68#![allow(dead_code)]
69
70use frame::weights_prelude::*;
71use core::marker::PhantomData;
72
73/// Weight functions needed for `pallet_whitelist`.
74pub trait WeightInfo {
75	fn whitelist_call() -> Weight;
76	fn remove_whitelisted_call() -> 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:  `0`
93		//  Estimated: `3556`
94		// Minimum execution time: 12_978_000 picoseconds.
95		Weight::from_parts(13_434_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:  `45`
108		//  Estimated: `3556`
109		// Minimum execution time: 12_959_000 picoseconds.
110		Weight::from_parts(13_371_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:1)
115	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
116	/// Storage: `Preimage::PreimageFor` (r:1 w:1)
117	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
118	/// Storage: `Preimage::StatusFor` (r:1 w:0)
119	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
120	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
121	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
122	/// The range of component `n` is `[1, 4194294]`.
123	fn dispatch_whitelisted_call(n: u32, ) -> Weight {
124		// Proof Size summary in bytes:
125		//  Measured:  `114 + n * (1 ±0)`
126		//  Estimated: `3578 + n * (1 ±0)`
127		// Minimum execution time: 24_702_000 picoseconds.
128		Weight::from_parts(25_001_000, 3578)
129			// Standard Error: 259
130			.saturating_add(Weight::from_parts(23_372, 0).saturating_mul(n.into()))
131			.saturating_add(T::DbWeight::get().reads(4_u64))
132			.saturating_add(T::DbWeight::get().writes(3_u64))
133			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
134	}
135	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
136	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
137	/// Storage: `Preimage::StatusFor` (r:1 w:0)
138	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
139	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
140	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
141	/// The range of component `n` is `[1, 10000]`.
142	fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight {
143		// Proof Size summary in bytes:
144		//  Measured:  `45`
145		//  Estimated: `3556`
146		// Minimum execution time: 16_083_000 picoseconds.
147		Weight::from_parts(16_582_910, 3556)
148			// Standard Error: 3
149			.saturating_add(Weight::from_parts(1_325, 0).saturating_mul(n.into()))
150			.saturating_add(T::DbWeight::get().reads(3_u64))
151			.saturating_add(T::DbWeight::get().writes(2_u64))
152	}
153}
154
155// For backwards compatibility and tests.
156impl WeightInfo for () {
157	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
158	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
159	/// Storage: `Preimage::StatusFor` (r:1 w:0)
160	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
161	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
162	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
163	fn whitelist_call() -> Weight {
164		// Proof Size summary in bytes:
165		//  Measured:  `0`
166		//  Estimated: `3556`
167		// Minimum execution time: 12_978_000 picoseconds.
168		Weight::from_parts(13_434_000, 3556)
169			.saturating_add(RocksDbWeight::get().reads(3_u64))
170			.saturating_add(RocksDbWeight::get().writes(2_u64))
171	}
172	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
173	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
174	/// Storage: `Preimage::StatusFor` (r:1 w:0)
175	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
176	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
177	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
178	fn remove_whitelisted_call() -> Weight {
179		// Proof Size summary in bytes:
180		//  Measured:  `45`
181		//  Estimated: `3556`
182		// Minimum execution time: 12_959_000 picoseconds.
183		Weight::from_parts(13_371_000, 3556)
184			.saturating_add(RocksDbWeight::get().reads(3_u64))
185			.saturating_add(RocksDbWeight::get().writes(2_u64))
186	}
187	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
188	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
189	/// Storage: `Preimage::PreimageFor` (r:1 w:1)
190	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`)
191	/// Storage: `Preimage::StatusFor` (r:1 w:0)
192	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
193	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
194	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
195	/// The range of component `n` is `[1, 4194294]`.
196	fn dispatch_whitelisted_call(n: u32, ) -> Weight {
197		// Proof Size summary in bytes:
198		//  Measured:  `114 + n * (1 ±0)`
199		//  Estimated: `3578 + n * (1 ±0)`
200		// Minimum execution time: 24_702_000 picoseconds.
201		Weight::from_parts(25_001_000, 3578)
202			// Standard Error: 259
203			.saturating_add(Weight::from_parts(23_372, 0).saturating_mul(n.into()))
204			.saturating_add(RocksDbWeight::get().reads(4_u64))
205			.saturating_add(RocksDbWeight::get().writes(3_u64))
206			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
207	}
208	/// Storage: `Whitelist::WhitelistedCall` (r:1 w:1)
209	/// Proof: `Whitelist::WhitelistedCall` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
210	/// Storage: `Preimage::StatusFor` (r:1 w:0)
211	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
212	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
213	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
214	/// The range of component `n` is `[1, 10000]`.
215	fn dispatch_whitelisted_call_with_preimage(n: u32, ) -> Weight {
216		// Proof Size summary in bytes:
217		//  Measured:  `45`
218		//  Estimated: `3556`
219		// Minimum execution time: 16_083_000 picoseconds.
220		Weight::from_parts(16_582_910, 3556)
221			// Standard Error: 3
222			.saturating_add(Weight::from_parts(1_325, 0).saturating_mul(n.into()))
223			.saturating_add(RocksDbWeight::get().reads(3_u64))
224			.saturating_add(RocksDbWeight::get().writes(2_u64))
225	}
226}