referrerpolicy=no-referrer-when-downgrade

westend_runtime/weights/
pallet_preimage.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Polkadot.
3
4// Polkadot is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Polkadot is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Polkadot.  If not, see <http://www.gnu.org/licenses/>.
16
17//! Autogenerated weights for `pallet_preimage`
18//!
19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
20//! DATE: 2025-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
23//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
24
25// Executed Command:
26// frame-omni-bencher
27// v1
28// benchmark
29// pallet
30// --extrinsic=*
31// --runtime=target/production/wbuild/westend-runtime/westend_runtime.wasm
32// --pallet=pallet_preimage
33// --header=/__w/polkadot-sdk/polkadot-sdk/polkadot/file_header.txt
34// --output=./polkadot/runtime/westend/src/weights
35// --wasm-execution=compiled
36// --steps=50
37// --repeat=20
38// --heap-pages=4096
39// --no-storage-info
40// --no-min-squares
41// --no-median-slopes
42
43#![cfg_attr(rustfmt, rustfmt_skip)]
44#![allow(unused_parens)]
45#![allow(unused_imports)]
46#![allow(missing_docs)]
47
48use frame_support::{traits::Get, weights::Weight};
49use core::marker::PhantomData;
50
51/// Weight functions for `pallet_preimage`.
52pub struct WeightInfo<T>(PhantomData<T>);
53impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> {
54	/// Storage: `Preimage::StatusFor` (r:1 w:0)
55	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
56	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
57	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
58	/// Storage: `Balances::Holds` (r:1 w:1)
59	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
60	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
61	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
62	/// The range of component `s` is `[0, 4194304]`.
63	fn note_preimage(s: u32, ) -> Weight {
64		// Proof Size summary in bytes:
65		//  Measured:  `97`
66		//  Estimated: `3568`
67		// Minimum execution time: 53_384_000 picoseconds.
68		Weight::from_parts(54_357_000, 0)
69			.saturating_add(Weight::from_parts(0, 3568))
70			// Standard Error: 169
71			.saturating_add(Weight::from_parts(17_382, 0).saturating_mul(s.into()))
72			.saturating_add(T::DbWeight::get().reads(3))
73			.saturating_add(T::DbWeight::get().writes(3))
74	}
75	/// Storage: `Preimage::StatusFor` (r:1 w:0)
76	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
77	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
78	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
79	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
80	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
81	/// The range of component `s` is `[0, 4194304]`.
82	fn note_requested_preimage(s: u32, ) -> Weight {
83		// Proof Size summary in bytes:
84		//  Measured:  `106`
85		//  Estimated: `3556`
86		// Minimum execution time: 21_147_000 picoseconds.
87		Weight::from_parts(21_420_000, 0)
88			.saturating_add(Weight::from_parts(0, 3556))
89			// Standard Error: 169
90			.saturating_add(Weight::from_parts(17_415, 0).saturating_mul(s.into()))
91			.saturating_add(T::DbWeight::get().reads(2))
92			.saturating_add(T::DbWeight::get().writes(2))
93	}
94	/// Storage: `Preimage::StatusFor` (r:1 w:0)
95	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
96	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
97	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
98	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
99	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
100	/// The range of component `s` is `[0, 4194304]`.
101	fn note_no_deposit_preimage(s: u32, ) -> Weight {
102		// Proof Size summary in bytes:
103		//  Measured:  `106`
104		//  Estimated: `3556`
105		// Minimum execution time: 20_034_000 picoseconds.
106		Weight::from_parts(20_458_000, 0)
107			.saturating_add(Weight::from_parts(0, 3556))
108			// Standard Error: 170
109			.saturating_add(Weight::from_parts(17_397, 0).saturating_mul(s.into()))
110			.saturating_add(T::DbWeight::get().reads(2))
111			.saturating_add(T::DbWeight::get().writes(2))
112	}
113	/// Storage: `Preimage::StatusFor` (r:1 w:0)
114	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
115	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
116	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
117	/// Storage: `Balances::Holds` (r:1 w:1)
118	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
119	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
120	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
121	fn unnote_preimage() -> Weight {
122		// Proof Size summary in bytes:
123		//  Measured:  `281`
124		//  Estimated: `3568`
125		// Minimum execution time: 72_904_000 picoseconds.
126		Weight::from_parts(75_167_000, 0)
127			.saturating_add(Weight::from_parts(0, 3568))
128			.saturating_add(T::DbWeight::get().reads(3))
129			.saturating_add(T::DbWeight::get().writes(3))
130	}
131	/// Storage: `Preimage::StatusFor` (r:1 w:0)
132	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
133	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
134	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
135	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
136	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
137	fn unnote_no_deposit_preimage() -> Weight {
138		// Proof Size summary in bytes:
139		//  Measured:  `144`
140		//  Estimated: `3556`
141		// Minimum execution time: 43_235_000 picoseconds.
142		Weight::from_parts(47_464_000, 0)
143			.saturating_add(Weight::from_parts(0, 3556))
144			.saturating_add(T::DbWeight::get().reads(2))
145			.saturating_add(T::DbWeight::get().writes(2))
146	}
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	fn request_preimage() -> Weight {
152		// Proof Size summary in bytes:
153		//  Measured:  `188`
154		//  Estimated: `3556`
155		// Minimum execution time: 35_314_000 picoseconds.
156		Weight::from_parts(38_994_000, 0)
157			.saturating_add(Weight::from_parts(0, 3556))
158			.saturating_add(T::DbWeight::get().reads(2))
159			.saturating_add(T::DbWeight::get().writes(1))
160	}
161	/// Storage: `Preimage::StatusFor` (r:1 w:0)
162	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
163	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
164	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
165	fn request_no_deposit_preimage() -> Weight {
166		// Proof Size summary in bytes:
167		//  Measured:  `144`
168		//  Estimated: `3556`
169		// Minimum execution time: 32_514_000 picoseconds.
170		Weight::from_parts(34_566_000, 0)
171			.saturating_add(Weight::from_parts(0, 3556))
172			.saturating_add(T::DbWeight::get().reads(2))
173			.saturating_add(T::DbWeight::get().writes(1))
174	}
175	/// Storage: `Preimage::StatusFor` (r:1 w:0)
176	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
177	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
178	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
179	fn request_unnoted_preimage() -> Weight {
180		// Proof Size summary in bytes:
181		//  Measured:  `42`
182		//  Estimated: `3556`
183		// Minimum execution time: 24_339_000 picoseconds.
184		Weight::from_parts(26_465_000, 0)
185			.saturating_add(Weight::from_parts(0, 3556))
186			.saturating_add(T::DbWeight::get().reads(2))
187			.saturating_add(T::DbWeight::get().writes(1))
188	}
189	/// Storage: `Preimage::StatusFor` (r:1 w:0)
190	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
191	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
192	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
193	fn request_requested_preimage() -> Weight {
194		// Proof Size summary in bytes:
195		//  Measured:  `106`
196		//  Estimated: `3556`
197		// Minimum execution time: 24_256_000 picoseconds.
198		Weight::from_parts(25_363_000, 0)
199			.saturating_add(Weight::from_parts(0, 3556))
200			.saturating_add(T::DbWeight::get().reads(2))
201			.saturating_add(T::DbWeight::get().writes(1))
202	}
203	/// Storage: `Preimage::StatusFor` (r:1 w:0)
204	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
205	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
206	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
207	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
208	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
209	fn unrequest_preimage() -> Weight {
210		// Proof Size summary in bytes:
211		//  Measured:  `144`
212		//  Estimated: `3556`
213		// Minimum execution time: 42_454_000 picoseconds.
214		Weight::from_parts(46_055_000, 0)
215			.saturating_add(Weight::from_parts(0, 3556))
216			.saturating_add(T::DbWeight::get().reads(2))
217			.saturating_add(T::DbWeight::get().writes(2))
218	}
219	/// Storage: `Preimage::StatusFor` (r:1 w:0)
220	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
221	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
222	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
223	fn unrequest_unnoted_preimage() -> Weight {
224		// Proof Size summary in bytes:
225		//  Measured:  `106`
226		//  Estimated: `3556`
227		// Minimum execution time: 24_498_000 picoseconds.
228		Weight::from_parts(26_934_000, 0)
229			.saturating_add(Weight::from_parts(0, 3556))
230			.saturating_add(T::DbWeight::get().reads(2))
231			.saturating_add(T::DbWeight::get().writes(1))
232	}
233	/// Storage: `Preimage::StatusFor` (r:1 w:0)
234	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
235	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
236	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
237	fn unrequest_multi_referenced_preimage() -> Weight {
238		// Proof Size summary in bytes:
239		//  Measured:  `106`
240		//  Estimated: `3556`
241		// Minimum execution time: 24_328_000 picoseconds.
242		Weight::from_parts(25_802_000, 0)
243			.saturating_add(Weight::from_parts(0, 3556))
244			.saturating_add(T::DbWeight::get().reads(2))
245			.saturating_add(T::DbWeight::get().writes(1))
246	}
247	/// Storage: `Preimage::StatusFor` (r:1023 w:1023)
248	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
249	/// Storage: `System::Account` (r:1023 w:1023)
250	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
251	/// Storage: `Balances::Holds` (r:1023 w:1023)
252	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
253	/// Storage: `Preimage::RequestStatusFor` (r:0 w:1023)
254	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
255	/// The range of component `n` is `[1, 1024]`.
256	fn ensure_updated(n: u32, ) -> Weight {
257		// Proof Size summary in bytes:
258		//  Measured:  `0 + n * (227 ±0)`
259		//  Estimated: `990 + n * (2603 ±0)`
260		// Minimum execution time: 60_700_000 picoseconds.
261		Weight::from_parts(61_580_000, 0)
262			.saturating_add(Weight::from_parts(0, 990))
263			// Standard Error: 73_173
264			.saturating_add(Weight::from_parts(60_030_952, 0).saturating_mul(n.into()))
265			.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
266			.saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
267			.saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into()))
268	}
269}