referrerpolicy=no-referrer-when-downgrade

rococo_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-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `d3a9aad6f7a3`, 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/rococo-runtime/rococo_runtime.wasm
32// --pallet=pallet_preimage
33// --header=/__w/polkadot-sdk/polkadot-sdk/polkadot/file_header.txt
34// --output=./polkadot/runtime/rococo/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: `Parameters::Parameters` (r:2 w:0)
59	/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
60	/// Storage: `Balances::Holds` (r:1 w:1)
61	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
62	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
63	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
64	/// The range of component `s` is `[0, 4194304]`.
65	fn note_preimage(s: u32, ) -> Weight {
66		// Proof Size summary in bytes:
67		//  Measured:  `45`
68		//  Estimated: `6012`
69		// Minimum execution time: 53_899_000 picoseconds.
70		Weight::from_parts(54_621_000, 0)
71			.saturating_add(Weight::from_parts(0, 6012))
72			// Standard Error: 130
73			.saturating_add(Weight::from_parts(13_753, 0).saturating_mul(s.into()))
74			.saturating_add(T::DbWeight::get().reads(5))
75			.saturating_add(T::DbWeight::get().writes(3))
76	}
77	/// Storage: `Preimage::StatusFor` (r:1 w:0)
78	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
79	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
80	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
81	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
82	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
83	/// The range of component `s` is `[0, 4194304]`.
84	fn note_requested_preimage(s: u32, ) -> Weight {
85		// Proof Size summary in bytes:
86		//  Measured:  `105`
87		//  Estimated: `3556`
88		// Minimum execution time: 17_297_000 picoseconds.
89		Weight::from_parts(17_779_000, 0)
90			.saturating_add(Weight::from_parts(0, 3556))
91			// Standard Error: 133
92			.saturating_add(Weight::from_parts(13_695, 0).saturating_mul(s.into()))
93			.saturating_add(T::DbWeight::get().reads(2))
94			.saturating_add(T::DbWeight::get().writes(2))
95	}
96	/// Storage: `Preimage::StatusFor` (r:1 w:0)
97	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
98	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
99	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
100	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
101	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
102	/// The range of component `s` is `[0, 4194304]`.
103	fn note_no_deposit_preimage(s: u32, ) -> Weight {
104		// Proof Size summary in bytes:
105		//  Measured:  `105`
106		//  Estimated: `3556`
107		// Minimum execution time: 16_666_000 picoseconds.
108		Weight::from_parts(16_886_000, 0)
109			.saturating_add(Weight::from_parts(0, 3556))
110			// Standard Error: 133
111			.saturating_add(Weight::from_parts(13_719, 0).saturating_mul(s.into()))
112			.saturating_add(T::DbWeight::get().reads(2))
113			.saturating_add(T::DbWeight::get().writes(2))
114	}
115	/// Storage: `Preimage::StatusFor` (r:1 w:0)
116	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
117	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
118	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
119	/// Storage: `Balances::Holds` (r:1 w:1)
120	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
121	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
122	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
123	fn unnote_preimage() -> Weight {
124		// Proof Size summary in bytes:
125		//  Measured:  `242`
126		//  Estimated: `3568`
127		// Minimum execution time: 58_837_000 picoseconds.
128		Weight::from_parts(62_730_000, 0)
129			.saturating_add(Weight::from_parts(0, 3568))
130			.saturating_add(T::DbWeight::get().reads(3))
131			.saturating_add(T::DbWeight::get().writes(3))
132	}
133	/// Storage: `Preimage::StatusFor` (r:1 w:0)
134	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
135	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
136	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
137	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
138	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
139	fn unnote_no_deposit_preimage() -> Weight {
140		// Proof Size summary in bytes:
141		//  Measured:  `143`
142		//  Estimated: `3556`
143		// Minimum execution time: 29_826_000 picoseconds.
144		Weight::from_parts(32_245_000, 0)
145			.saturating_add(Weight::from_parts(0, 3556))
146			.saturating_add(T::DbWeight::get().reads(2))
147			.saturating_add(T::DbWeight::get().writes(2))
148	}
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	fn request_preimage() -> Weight {
154		// Proof Size summary in bytes:
155		//  Measured:  `187`
156		//  Estimated: `3556`
157		// Minimum execution time: 23_613_000 picoseconds.
158		Weight::from_parts(29_331_000, 0)
159			.saturating_add(Weight::from_parts(0, 3556))
160			.saturating_add(T::DbWeight::get().reads(2))
161			.saturating_add(T::DbWeight::get().writes(1))
162	}
163	/// Storage: `Preimage::StatusFor` (r:1 w:0)
164	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
165	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
166	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
167	fn request_no_deposit_preimage() -> Weight {
168		// Proof Size summary in bytes:
169		//  Measured:  `143`
170		//  Estimated: `3556`
171		// Minimum execution time: 17_098_000 picoseconds.
172		Weight::from_parts(20_367_000, 0)
173			.saturating_add(Weight::from_parts(0, 3556))
174			.saturating_add(T::DbWeight::get().reads(2))
175			.saturating_add(T::DbWeight::get().writes(1))
176	}
177	/// Storage: `Preimage::StatusFor` (r:1 w:0)
178	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
179	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
180	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
181	fn request_unnoted_preimage() -> Weight {
182		// Proof Size summary in bytes:
183		//  Measured:  `41`
184		//  Estimated: `3556`
185		// Minimum execution time: 17_049_000 picoseconds.
186		Weight::from_parts(18_673_000, 0)
187			.saturating_add(Weight::from_parts(0, 3556))
188			.saturating_add(T::DbWeight::get().reads(2))
189			.saturating_add(T::DbWeight::get().writes(1))
190	}
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	fn request_requested_preimage() -> Weight {
196		// Proof Size summary in bytes:
197		//  Measured:  `105`
198		//  Estimated: `3556`
199		// Minimum execution time: 11_900_000 picoseconds.
200		Weight::from_parts(12_500_000, 0)
201			.saturating_add(Weight::from_parts(0, 3556))
202			.saturating_add(T::DbWeight::get().reads(2))
203			.saturating_add(T::DbWeight::get().writes(1))
204	}
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	/// Storage: `Preimage::PreimageFor` (r:0 w:1)
210	/// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`)
211	fn unrequest_preimage() -> Weight {
212		// Proof Size summary in bytes:
213		//  Measured:  `143`
214		//  Estimated: `3556`
215		// Minimum execution time: 25_863_000 picoseconds.
216		Weight::from_parts(28_230_000, 0)
217			.saturating_add(Weight::from_parts(0, 3556))
218			.saturating_add(T::DbWeight::get().reads(2))
219			.saturating_add(T::DbWeight::get().writes(2))
220	}
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 unrequest_unnoted_preimage() -> Weight {
226		// Proof Size summary in bytes:
227		//  Measured:  `105`
228		//  Estimated: `3556`
229		// Minimum execution time: 11_962_000 picoseconds.
230		Weight::from_parts(13_250_000, 0)
231			.saturating_add(Weight::from_parts(0, 3556))
232			.saturating_add(T::DbWeight::get().reads(2))
233			.saturating_add(T::DbWeight::get().writes(1))
234	}
235	/// Storage: `Preimage::StatusFor` (r:1 w:0)
236	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
237	/// Storage: `Preimage::RequestStatusFor` (r:1 w:1)
238	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
239	fn unrequest_multi_referenced_preimage() -> Weight {
240		// Proof Size summary in bytes:
241		//  Measured:  `105`
242		//  Estimated: `3556`
243		// Minimum execution time: 11_656_000 picoseconds.
244		Weight::from_parts(12_846_000, 0)
245			.saturating_add(Weight::from_parts(0, 3556))
246			.saturating_add(T::DbWeight::get().reads(2))
247			.saturating_add(T::DbWeight::get().writes(1))
248	}
249	/// Storage: `Preimage::StatusFor` (r:1023 w:1023)
250	/// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
251	/// Storage: `System::Account` (r:1023 w:1023)
252	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
253	/// Storage: `Parameters::Parameters` (r:2 w:0)
254	/// Proof: `Parameters::Parameters` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
255	/// Storage: `Balances::Holds` (r:1023 w:1023)
256	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
257	/// Storage: `Preimage::RequestStatusFor` (r:0 w:1023)
258	/// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(91), added: 2566, mode: `MaxEncodedLen`)
259	/// The range of component `n` is `[1, 1024]`.
260	fn ensure_updated(n: u32, ) -> Weight {
261		// Proof Size summary in bytes:
262		//  Measured:  `0 + n * (227 ±0)`
263		//  Estimated: `6012 + n * (2603 ±0)`
264		// Minimum execution time: 61_032_000 picoseconds.
265		Weight::from_parts(63_195_000, 0)
266			.saturating_add(Weight::from_parts(0, 6012))
267			// Standard Error: 51_433
268			.saturating_add(Weight::from_parts(57_910_931, 0).saturating_mul(n.into()))
269			.saturating_add(T::DbWeight::get().reads(2))
270			.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into())))
271			.saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(n.into())))
272			.saturating_add(Weight::from_parts(0, 2603).saturating_mul(n.into()))
273	}
274}