referrerpolicy=no-referrer-when-downgrade

pallet_recovery/
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_recovery`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2025-04-16, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `25e4b24639fd`, 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_recovery
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/recovery/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_recovery`.
72pub trait WeightInfo {
73	fn as_recovered() -> Weight;
74	fn set_recovered() -> Weight;
75	fn create_recovery(n: u32, ) -> Weight;
76	fn initiate_recovery() -> Weight;
77	fn vouch_recovery(n: u32, ) -> Weight;
78	fn claim_recovery(n: u32, ) -> Weight;
79	fn close_recovery(n: u32, ) -> Weight;
80	fn remove_recovery(n: u32, ) -> Weight;
81	fn cancel_recovered() -> Weight;
82	fn poke_deposit(n: u32, ) -> Weight;
83}
84
85/// Weights for `pallet_recovery` using the Substrate node and recommended hardware.
86pub struct SubstrateWeight<T>(PhantomData<T>);
87impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
88	/// Storage: `Recovery::Proxy` (r:1 w:0)
89	/// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
90	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
91	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
92	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
93	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
94	fn as_recovered() -> Weight {
95		// Proof Size summary in bytes:
96		//  Measured:  `530`
97		//  Estimated: `3997`
98		// Minimum execution time: 18_724_000 picoseconds.
99		Weight::from_parts(19_503_000, 3997)
100			.saturating_add(T::DbWeight::get().reads(3_u64))
101	}
102	/// Storage: `Recovery::Proxy` (r:0 w:1)
103	/// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
104	fn set_recovered() -> Weight {
105		// Proof Size summary in bytes:
106		//  Measured:  `0`
107		//  Estimated: `0`
108		// Minimum execution time: 6_933_000 picoseconds.
109		Weight::from_parts(7_249_000, 0)
110			.saturating_add(T::DbWeight::get().writes(1_u64))
111	}
112	/// Storage: `Recovery::Recoverable` (r:1 w:1)
113	/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
114	/// The range of component `n` is `[1, 9]`.
115	fn create_recovery(n: u32, ) -> Weight {
116		// Proof Size summary in bytes:
117		//  Measured:  `279`
118		//  Estimated: `3816`
119		// Minimum execution time: 26_004_000 picoseconds.
120		Weight::from_parts(27_597_455, 3816)
121			// Standard Error: 7_992
122			.saturating_add(Weight::from_parts(165_970, 0).saturating_mul(n.into()))
123			.saturating_add(T::DbWeight::get().reads(1_u64))
124			.saturating_add(T::DbWeight::get().writes(1_u64))
125	}
126	/// Storage: `Recovery::Recoverable` (r:1 w:0)
127	/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
128	/// Storage: `Recovery::ActiveRecoveries` (r:1 w:1)
129	/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
130	fn initiate_recovery() -> Weight {
131		// Proof Size summary in bytes:
132		//  Measured:  `376`
133		//  Estimated: `3854`
134		// Minimum execution time: 33_370_000 picoseconds.
135		Weight::from_parts(34_078_000, 3854)
136			.saturating_add(T::DbWeight::get().reads(2_u64))
137			.saturating_add(T::DbWeight::get().writes(1_u64))
138	}
139	/// Storage: `Recovery::Recoverable` (r:1 w:0)
140	/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
141	/// Storage: `Recovery::ActiveRecoveries` (r:1 w:1)
142	/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
143	/// The range of component `n` is `[1, 9]`.
144	fn vouch_recovery(n: u32, ) -> Weight {
145		// Proof Size summary in bytes:
146		//  Measured:  `464 + n * (64 ±0)`
147		//  Estimated: `3854`
148		// Minimum execution time: 21_199_000 picoseconds.
149		Weight::from_parts(22_295_139, 3854)
150			// Standard Error: 5_681
151			.saturating_add(Weight::from_parts(255_188, 0).saturating_mul(n.into()))
152			.saturating_add(T::DbWeight::get().reads(2_u64))
153			.saturating_add(T::DbWeight::get().writes(1_u64))
154	}
155	/// Storage: `Recovery::Recoverable` (r:1 w:0)
156	/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
157	/// Storage: `Recovery::ActiveRecoveries` (r:1 w:0)
158	/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
159	/// Storage: `Recovery::Proxy` (r:1 w:1)
160	/// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
161	/// The range of component `n` is `[1, 9]`.
162	fn claim_recovery(n: u32, ) -> Weight {
163		// Proof Size summary in bytes:
164		//  Measured:  `496 + n * (64 ±0)`
165		//  Estimated: `3854`
166		// Minimum execution time: 26_340_000 picoseconds.
167		Weight::from_parts(27_828_030, 3854)
168			// Standard Error: 7_254
169			.saturating_add(Weight::from_parts(113_751, 0).saturating_mul(n.into()))
170			.saturating_add(T::DbWeight::get().reads(3_u64))
171			.saturating_add(T::DbWeight::get().writes(1_u64))
172	}
173	/// Storage: `Recovery::ActiveRecoveries` (r:1 w:1)
174	/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
175	/// Storage: `System::Account` (r:1 w:1)
176	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
177	/// The range of component `n` is `[1, 9]`.
178	fn close_recovery(n: u32, ) -> Weight {
179		// Proof Size summary in bytes:
180		//  Measured:  `617 + n * (32 ±0)`
181		//  Estimated: `3854`
182		// Minimum execution time: 36_912_000 picoseconds.
183		Weight::from_parts(38_818_613, 3854)
184			// Standard Error: 7_806
185			.saturating_add(Weight::from_parts(149_710, 0).saturating_mul(n.into()))
186			.saturating_add(T::DbWeight::get().reads(2_u64))
187			.saturating_add(T::DbWeight::get().writes(2_u64))
188	}
189	/// Storage: `Recovery::ActiveRecoveries` (r:1 w:0)
190	/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
191	/// Storage: `Recovery::Recoverable` (r:1 w:1)
192	/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
193	/// The range of component `n` is `[1, 9]`.
194	fn remove_recovery(n: u32, ) -> Weight {
195		// Proof Size summary in bytes:
196		//  Measured:  `374 + n * (32 ±0)`
197		//  Estimated: `3854`
198		// Minimum execution time: 30_824_000 picoseconds.
199		Weight::from_parts(31_960_172, 3854)
200			// Standard Error: 10_777
201			.saturating_add(Weight::from_parts(237_226, 0).saturating_mul(n.into()))
202			.saturating_add(T::DbWeight::get().reads(2_u64))
203			.saturating_add(T::DbWeight::get().writes(1_u64))
204	}
205	/// Storage: `Recovery::Proxy` (r:1 w:1)
206	/// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
207	fn cancel_recovered() -> Weight {
208		// Proof Size summary in bytes:
209		//  Measured:  `385`
210		//  Estimated: `3545`
211		// Minimum execution time: 15_369_000 picoseconds.
212		Weight::from_parts(15_730_000, 3545)
213			.saturating_add(T::DbWeight::get().reads(1_u64))
214			.saturating_add(T::DbWeight::get().writes(1_u64))
215	}
216	/// Storage: `Recovery::Recoverable` (r:1 w:1)
217	/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
218	/// Storage: `Recovery::ActiveRecoveries` (r:1 w:1)
219	/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
220	/// The range of component `n` is `[1, 9]`.
221	fn poke_deposit(_n: u32, ) -> Weight {
222		// Proof Size summary in bytes:
223		//  Measured:  `1110`
224		//  Estimated: `3854`
225		// Minimum execution time: 46_517_000 picoseconds.
226		Weight::from_parts(49_326_481, 3854)
227			.saturating_add(T::DbWeight::get().reads(2_u64))
228			.saturating_add(T::DbWeight::get().writes(2_u64))
229	}
230}
231
232// For backwards compatibility and tests.
233impl WeightInfo for () {
234	/// Storage: `Recovery::Proxy` (r:1 w:0)
235	/// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
236	/// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
237	/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
238	/// Storage: `TxPause::PausedCalls` (r:1 w:0)
239	/// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
240	fn as_recovered() -> Weight {
241		// Proof Size summary in bytes:
242		//  Measured:  `530`
243		//  Estimated: `3997`
244		// Minimum execution time: 18_724_000 picoseconds.
245		Weight::from_parts(19_503_000, 3997)
246			.saturating_add(RocksDbWeight::get().reads(3_u64))
247	}
248	/// Storage: `Recovery::Proxy` (r:0 w:1)
249	/// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
250	fn set_recovered() -> Weight {
251		// Proof Size summary in bytes:
252		//  Measured:  `0`
253		//  Estimated: `0`
254		// Minimum execution time: 6_933_000 picoseconds.
255		Weight::from_parts(7_249_000, 0)
256			.saturating_add(RocksDbWeight::get().writes(1_u64))
257	}
258	/// Storage: `Recovery::Recoverable` (r:1 w:1)
259	/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
260	/// The range of component `n` is `[1, 9]`.
261	fn create_recovery(n: u32, ) -> Weight {
262		// Proof Size summary in bytes:
263		//  Measured:  `279`
264		//  Estimated: `3816`
265		// Minimum execution time: 26_004_000 picoseconds.
266		Weight::from_parts(27_597_455, 3816)
267			// Standard Error: 7_992
268			.saturating_add(Weight::from_parts(165_970, 0).saturating_mul(n.into()))
269			.saturating_add(RocksDbWeight::get().reads(1_u64))
270			.saturating_add(RocksDbWeight::get().writes(1_u64))
271	}
272	/// Storage: `Recovery::Recoverable` (r:1 w:0)
273	/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
274	/// Storage: `Recovery::ActiveRecoveries` (r:1 w:1)
275	/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
276	fn initiate_recovery() -> Weight {
277		// Proof Size summary in bytes:
278		//  Measured:  `376`
279		//  Estimated: `3854`
280		// Minimum execution time: 33_370_000 picoseconds.
281		Weight::from_parts(34_078_000, 3854)
282			.saturating_add(RocksDbWeight::get().reads(2_u64))
283			.saturating_add(RocksDbWeight::get().writes(1_u64))
284	}
285	/// Storage: `Recovery::Recoverable` (r:1 w:0)
286	/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
287	/// Storage: `Recovery::ActiveRecoveries` (r:1 w:1)
288	/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
289	/// The range of component `n` is `[1, 9]`.
290	fn vouch_recovery(n: u32, ) -> Weight {
291		// Proof Size summary in bytes:
292		//  Measured:  `464 + n * (64 ±0)`
293		//  Estimated: `3854`
294		// Minimum execution time: 21_199_000 picoseconds.
295		Weight::from_parts(22_295_139, 3854)
296			// Standard Error: 5_681
297			.saturating_add(Weight::from_parts(255_188, 0).saturating_mul(n.into()))
298			.saturating_add(RocksDbWeight::get().reads(2_u64))
299			.saturating_add(RocksDbWeight::get().writes(1_u64))
300	}
301	/// Storage: `Recovery::Recoverable` (r:1 w:0)
302	/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
303	/// Storage: `Recovery::ActiveRecoveries` (r:1 w:0)
304	/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
305	/// Storage: `Recovery::Proxy` (r:1 w:1)
306	/// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
307	/// The range of component `n` is `[1, 9]`.
308	fn claim_recovery(n: u32, ) -> Weight {
309		// Proof Size summary in bytes:
310		//  Measured:  `496 + n * (64 ±0)`
311		//  Estimated: `3854`
312		// Minimum execution time: 26_340_000 picoseconds.
313		Weight::from_parts(27_828_030, 3854)
314			// Standard Error: 7_254
315			.saturating_add(Weight::from_parts(113_751, 0).saturating_mul(n.into()))
316			.saturating_add(RocksDbWeight::get().reads(3_u64))
317			.saturating_add(RocksDbWeight::get().writes(1_u64))
318	}
319	/// Storage: `Recovery::ActiveRecoveries` (r:1 w:1)
320	/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
321	/// Storage: `System::Account` (r:1 w:1)
322	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
323	/// The range of component `n` is `[1, 9]`.
324	fn close_recovery(n: u32, ) -> Weight {
325		// Proof Size summary in bytes:
326		//  Measured:  `617 + n * (32 ±0)`
327		//  Estimated: `3854`
328		// Minimum execution time: 36_912_000 picoseconds.
329		Weight::from_parts(38_818_613, 3854)
330			// Standard Error: 7_806
331			.saturating_add(Weight::from_parts(149_710, 0).saturating_mul(n.into()))
332			.saturating_add(RocksDbWeight::get().reads(2_u64))
333			.saturating_add(RocksDbWeight::get().writes(2_u64))
334	}
335	/// Storage: `Recovery::ActiveRecoveries` (r:1 w:0)
336	/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
337	/// Storage: `Recovery::Recoverable` (r:1 w:1)
338	/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
339	/// The range of component `n` is `[1, 9]`.
340	fn remove_recovery(n: u32, ) -> Weight {
341		// Proof Size summary in bytes:
342		//  Measured:  `374 + n * (32 ±0)`
343		//  Estimated: `3854`
344		// Minimum execution time: 30_824_000 picoseconds.
345		Weight::from_parts(31_960_172, 3854)
346			// Standard Error: 10_777
347			.saturating_add(Weight::from_parts(237_226, 0).saturating_mul(n.into()))
348			.saturating_add(RocksDbWeight::get().reads(2_u64))
349			.saturating_add(RocksDbWeight::get().writes(1_u64))
350	}
351	/// Storage: `Recovery::Proxy` (r:1 w:1)
352	/// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
353	fn cancel_recovered() -> Weight {
354		// Proof Size summary in bytes:
355		//  Measured:  `385`
356		//  Estimated: `3545`
357		// Minimum execution time: 15_369_000 picoseconds.
358		Weight::from_parts(15_730_000, 3545)
359			.saturating_add(RocksDbWeight::get().reads(1_u64))
360			.saturating_add(RocksDbWeight::get().writes(1_u64))
361	}
362	/// Storage: `Recovery::Recoverable` (r:1 w:1)
363	/// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`)
364	/// Storage: `Recovery::ActiveRecoveries` (r:1 w:1)
365	/// Proof: `Recovery::ActiveRecoveries` (`max_values`: None, `max_size`: Some(389), added: 2864, mode: `MaxEncodedLen`)
366	/// The range of component `n` is `[1, 9]`.
367	fn poke_deposit(_n: u32, ) -> Weight {
368		// Proof Size summary in bytes:
369		//  Measured:  `1110`
370		//  Estimated: `3854`
371		// Minimum execution time: 46_517_000 picoseconds.
372		Weight::from_parts(49_326_481, 3854)
373			.saturating_add(RocksDbWeight::get().reads(2_u64))
374			.saturating_add(RocksDbWeight::get().writes(2_u64))
375	}
376}