pallet_glutton/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_glutton`
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_glutton
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/glutton/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_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
71use core::marker::PhantomData;
72
73/// Weight functions needed for `pallet_glutton`.
74pub trait WeightInfo {
75 fn initialize_pallet_grow(n: u32, ) -> Weight;
76 fn initialize_pallet_shrink(n: u32, ) -> Weight;
77 fn waste_ref_time_iter(i: u32, ) -> Weight;
78 fn waste_proof_size_some(i: u32, ) -> Weight;
79 fn on_idle_high_proof_waste() -> Weight;
80 fn on_idle_low_proof_waste() -> Weight;
81 fn empty_on_idle() -> Weight;
82 fn set_compute() -> Weight;
83 fn set_storage() -> Weight;
84}
85
86/// Weights for `pallet_glutton` using the Substrate node and recommended hardware.
87pub struct SubstrateWeight<T>(PhantomData<T>);
88impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
89 /// Storage: `Glutton::TrashDataCount` (r:1 w:1)
90 /// Proof: `Glutton::TrashDataCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
91 /// Storage: `Glutton::TrashData` (r:0 w:1000)
92 /// Proof: `Glutton::TrashData` (`max_values`: Some(65000), `max_size`: Some(1036), added: 3016, mode: `MaxEncodedLen`)
93 /// The range of component `n` is `[0, 1000]`.
94 fn initialize_pallet_grow(n: u32, ) -> Weight {
95 // Proof Size summary in bytes:
96 // Measured: `0`
97 // Estimated: `1489`
98 // Minimum execution time: 4_557_000 picoseconds.
99 Weight::from_parts(4_660_000, 1489)
100 // Standard Error: 2_163
101 .saturating_add(Weight::from_parts(10_339_879, 0).saturating_mul(n.into()))
102 .saturating_add(T::DbWeight::get().reads(1_u64))
103 .saturating_add(T::DbWeight::get().writes(1_u64))
104 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
105 }
106 /// Storage: `Glutton::TrashDataCount` (r:1 w:1)
107 /// Proof: `Glutton::TrashDataCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
108 /// Storage: `Glutton::TrashData` (r:0 w:1000)
109 /// Proof: `Glutton::TrashData` (`max_values`: Some(65000), `max_size`: Some(1036), added: 3016, mode: `MaxEncodedLen`)
110 /// The range of component `n` is `[0, 1000]`.
111 fn initialize_pallet_shrink(n: u32, ) -> Weight {
112 // Proof Size summary in bytes:
113 // Measured: `0`
114 // Estimated: `1489`
115 // Minimum execution time: 4_922_000 picoseconds.
116 Weight::from_parts(5_004_000, 1489)
117 // Standard Error: 1_139
118 .saturating_add(Weight::from_parts(1_166_537, 0).saturating_mul(n.into()))
119 .saturating_add(T::DbWeight::get().reads(1_u64))
120 .saturating_add(T::DbWeight::get().writes(1_u64))
121 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
122 }
123 /// The range of component `i` is `[0, 100000]`.
124 fn waste_ref_time_iter(i: u32, ) -> Weight {
125 // Proof Size summary in bytes:
126 // Measured: `0`
127 // Estimated: `0`
128 // Minimum execution time: 644_000 picoseconds.
129 Weight::from_parts(2_924_654, 0)
130 // Standard Error: 9
131 .saturating_add(Weight::from_parts(102_155, 0).saturating_mul(i.into()))
132 }
133 /// Storage: `Glutton::TrashData` (r:5000 w:0)
134 /// Proof: `Glutton::TrashData` (`max_values`: Some(65000), `max_size`: Some(1036), added: 3016, mode: `MaxEncodedLen`)
135 /// The range of component `i` is `[0, 5000]`.
136 fn waste_proof_size_some(i: u32, ) -> Weight {
137 // Proof Size summary in bytes:
138 // Measured: `118478 + i * (1022 ±0)`
139 // Estimated: `990 + i * (3016 ±0)`
140 // Minimum execution time: 434_000 picoseconds.
141 Weight::from_parts(327_172_459, 990)
142 // Standard Error: 5_517
143 .saturating_add(Weight::from_parts(6_487_717, 0).saturating_mul(i.into()))
144 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(i.into())))
145 .saturating_add(Weight::from_parts(0, 3016).saturating_mul(i.into()))
146 }
147 /// Storage: `Glutton::Storage` (r:1 w:0)
148 /// Proof: `Glutton::Storage` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
149 /// Storage: `Glutton::Compute` (r:1 w:0)
150 /// Proof: `Glutton::Compute` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
151 /// Storage: `Glutton::TrashData` (r:1737 w:0)
152 /// Proof: `Glutton::TrashData` (`max_values`: Some(65000), `max_size`: Some(1036), added: 3016, mode: `MaxEncodedLen`)
153 fn on_idle_high_proof_waste() -> Weight {
154 // Proof Size summary in bytes:
155 // Measured: `1900378`
156 // Estimated: `5239782`
157 // Minimum execution time: 53_542_464_000 picoseconds.
158 Weight::from_parts(53_694_275_000, 5239782)
159 .saturating_add(T::DbWeight::get().reads(1739_u64))
160 }
161 /// Storage: `Glutton::Storage` (r:1 w:0)
162 /// Proof: `Glutton::Storage` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
163 /// Storage: `Glutton::Compute` (r:1 w:0)
164 /// Proof: `Glutton::Compute` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
165 /// Storage: `Glutton::TrashData` (r:5 w:0)
166 /// Proof: `Glutton::TrashData` (`max_values`: Some(65000), `max_size`: Some(1036), added: 3016, mode: `MaxEncodedLen`)
167 fn on_idle_low_proof_waste() -> Weight {
168 // Proof Size summary in bytes:
169 // Measured: `9428`
170 // Estimated: `16070`
171 // Minimum execution time: 95_059_615_000 picoseconds.
172 Weight::from_parts(95_174_107_000, 16070)
173 .saturating_add(T::DbWeight::get().reads(7_u64))
174 }
175 /// Storage: `Glutton::Storage` (r:1 w:0)
176 /// Proof: `Glutton::Storage` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
177 /// Storage: `Glutton::Compute` (r:1 w:0)
178 /// Proof: `Glutton::Compute` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
179 fn empty_on_idle() -> Weight {
180 // Proof Size summary in bytes:
181 // Measured: `0`
182 // Estimated: `1493`
183 // Minimum execution time: 1_703_000 picoseconds.
184 Weight::from_parts(1_784_000, 1493)
185 .saturating_add(T::DbWeight::get().reads(2_u64))
186 }
187 /// Storage: `Glutton::Compute` (r:0 w:1)
188 /// Proof: `Glutton::Compute` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
189 fn set_compute() -> Weight {
190 // Proof Size summary in bytes:
191 // Measured: `0`
192 // Estimated: `0`
193 // Minimum execution time: 4_351_000 picoseconds.
194 Weight::from_parts(4_510_000, 0)
195 .saturating_add(T::DbWeight::get().writes(1_u64))
196 }
197 /// Storage: `Glutton::Storage` (r:0 w:1)
198 /// Proof: `Glutton::Storage` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
199 fn set_storage() -> Weight {
200 // Proof Size summary in bytes:
201 // Measured: `0`
202 // Estimated: `0`
203 // Minimum execution time: 4_253_000 picoseconds.
204 Weight::from_parts(4_471_000, 0)
205 .saturating_add(T::DbWeight::get().writes(1_u64))
206 }
207}
208
209// For backwards compatibility and tests.
210impl WeightInfo for () {
211 /// Storage: `Glutton::TrashDataCount` (r:1 w:1)
212 /// Proof: `Glutton::TrashDataCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
213 /// Storage: `Glutton::TrashData` (r:0 w:1000)
214 /// Proof: `Glutton::TrashData` (`max_values`: Some(65000), `max_size`: Some(1036), added: 3016, mode: `MaxEncodedLen`)
215 /// The range of component `n` is `[0, 1000]`.
216 fn initialize_pallet_grow(n: u32, ) -> Weight {
217 // Proof Size summary in bytes:
218 // Measured: `0`
219 // Estimated: `1489`
220 // Minimum execution time: 4_557_000 picoseconds.
221 Weight::from_parts(4_660_000, 1489)
222 // Standard Error: 2_163
223 .saturating_add(Weight::from_parts(10_339_879, 0).saturating_mul(n.into()))
224 .saturating_add(RocksDbWeight::get().reads(1_u64))
225 .saturating_add(RocksDbWeight::get().writes(1_u64))
226 .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into())))
227 }
228 /// Storage: `Glutton::TrashDataCount` (r:1 w:1)
229 /// Proof: `Glutton::TrashDataCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
230 /// Storage: `Glutton::TrashData` (r:0 w:1000)
231 /// Proof: `Glutton::TrashData` (`max_values`: Some(65000), `max_size`: Some(1036), added: 3016, mode: `MaxEncodedLen`)
232 /// The range of component `n` is `[0, 1000]`.
233 fn initialize_pallet_shrink(n: u32, ) -> Weight {
234 // Proof Size summary in bytes:
235 // Measured: `0`
236 // Estimated: `1489`
237 // Minimum execution time: 4_922_000 picoseconds.
238 Weight::from_parts(5_004_000, 1489)
239 // Standard Error: 1_139
240 .saturating_add(Weight::from_parts(1_166_537, 0).saturating_mul(n.into()))
241 .saturating_add(RocksDbWeight::get().reads(1_u64))
242 .saturating_add(RocksDbWeight::get().writes(1_u64))
243 .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into())))
244 }
245 /// The range of component `i` is `[0, 100000]`.
246 fn waste_ref_time_iter(i: u32, ) -> Weight {
247 // Proof Size summary in bytes:
248 // Measured: `0`
249 // Estimated: `0`
250 // Minimum execution time: 644_000 picoseconds.
251 Weight::from_parts(2_924_654, 0)
252 // Standard Error: 9
253 .saturating_add(Weight::from_parts(102_155, 0).saturating_mul(i.into()))
254 }
255 /// Storage: `Glutton::TrashData` (r:5000 w:0)
256 /// Proof: `Glutton::TrashData` (`max_values`: Some(65000), `max_size`: Some(1036), added: 3016, mode: `MaxEncodedLen`)
257 /// The range of component `i` is `[0, 5000]`.
258 fn waste_proof_size_some(i: u32, ) -> Weight {
259 // Proof Size summary in bytes:
260 // Measured: `118478 + i * (1022 ±0)`
261 // Estimated: `990 + i * (3016 ±0)`
262 // Minimum execution time: 434_000 picoseconds.
263 Weight::from_parts(327_172_459, 990)
264 // Standard Error: 5_517
265 .saturating_add(Weight::from_parts(6_487_717, 0).saturating_mul(i.into()))
266 .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(i.into())))
267 .saturating_add(Weight::from_parts(0, 3016).saturating_mul(i.into()))
268 }
269 /// Storage: `Glutton::Storage` (r:1 w:0)
270 /// Proof: `Glutton::Storage` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
271 /// Storage: `Glutton::Compute` (r:1 w:0)
272 /// Proof: `Glutton::Compute` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
273 /// Storage: `Glutton::TrashData` (r:1737 w:0)
274 /// Proof: `Glutton::TrashData` (`max_values`: Some(65000), `max_size`: Some(1036), added: 3016, mode: `MaxEncodedLen`)
275 fn on_idle_high_proof_waste() -> Weight {
276 // Proof Size summary in bytes:
277 // Measured: `1900378`
278 // Estimated: `5239782`
279 // Minimum execution time: 53_542_464_000 picoseconds.
280 Weight::from_parts(53_694_275_000, 5239782)
281 .saturating_add(RocksDbWeight::get().reads(1739_u64))
282 }
283 /// Storage: `Glutton::Storage` (r:1 w:0)
284 /// Proof: `Glutton::Storage` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
285 /// Storage: `Glutton::Compute` (r:1 w:0)
286 /// Proof: `Glutton::Compute` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
287 /// Storage: `Glutton::TrashData` (r:5 w:0)
288 /// Proof: `Glutton::TrashData` (`max_values`: Some(65000), `max_size`: Some(1036), added: 3016, mode: `MaxEncodedLen`)
289 fn on_idle_low_proof_waste() -> Weight {
290 // Proof Size summary in bytes:
291 // Measured: `9428`
292 // Estimated: `16070`
293 // Minimum execution time: 95_059_615_000 picoseconds.
294 Weight::from_parts(95_174_107_000, 16070)
295 .saturating_add(RocksDbWeight::get().reads(7_u64))
296 }
297 /// Storage: `Glutton::Storage` (r:1 w:0)
298 /// Proof: `Glutton::Storage` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
299 /// Storage: `Glutton::Compute` (r:1 w:0)
300 /// Proof: `Glutton::Compute` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
301 fn empty_on_idle() -> Weight {
302 // Proof Size summary in bytes:
303 // Measured: `0`
304 // Estimated: `1493`
305 // Minimum execution time: 1_703_000 picoseconds.
306 Weight::from_parts(1_784_000, 1493)
307 .saturating_add(RocksDbWeight::get().reads(2_u64))
308 }
309 /// Storage: `Glutton::Compute` (r:0 w:1)
310 /// Proof: `Glutton::Compute` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
311 fn set_compute() -> Weight {
312 // Proof Size summary in bytes:
313 // Measured: `0`
314 // Estimated: `0`
315 // Minimum execution time: 4_351_000 picoseconds.
316 Weight::from_parts(4_510_000, 0)
317 .saturating_add(RocksDbWeight::get().writes(1_u64))
318 }
319 /// Storage: `Glutton::Storage` (r:0 w:1)
320 /// Proof: `Glutton::Storage` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
321 fn set_storage() -> Weight {
322 // Proof Size summary in bytes:
323 // Measured: `0`
324 // Estimated: `0`
325 // Minimum execution time: 4_253_000 picoseconds.
326 Weight::from_parts(4_471_000, 0)
327 .saturating_add(RocksDbWeight::get().writes(1_u64))
328 }
329}