pallet_bags_list/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_bags_list`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2025-09-12, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `9907067fc6f8`, 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_bags_list
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/bags-list/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// --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_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
70use core::marker::PhantomData;
71
72/// Weight functions needed for `pallet_bags_list`.
73pub trait WeightInfo {
74 fn rebag_non_terminal() -> Weight;
75 fn rebag_terminal() -> Weight;
76 fn put_in_front_of() -> Weight;
77 fn on_idle() -> Weight;
78}
79
80/// Weights for `pallet_bags_list` using the Substrate node and recommended hardware.
81pub struct SubstrateWeight<T>(PhantomData<T>);
82impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
83 /// Storage: `VoterList::Lock` (r:1 w:0)
84 /// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
85 /// Storage: `VoterList::PendingRebag` (r:1 w:0)
86 /// Proof: `VoterList::PendingRebag` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
87 /// Storage: `VoterList::ListNodes` (r:4 w:4)
88 /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
89 /// Storage: `Staking::Bonded` (r:1 w:0)
90 /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
91 /// Storage: `Staking::Ledger` (r:1 w:0)
92 /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
93 /// Storage: `VoterList::ListBags` (r:1 w:1)
94 /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
95 fn rebag_non_terminal() -> Weight {
96 // Proof Size summary in bytes:
97 // Measured: `1818`
98 // Estimated: `11506`
99 // Minimum execution time: 75_224_000 picoseconds.
100 Weight::from_parts(77_682_000, 11506)
101 .saturating_add(T::DbWeight::get().reads(9_u64))
102 .saturating_add(T::DbWeight::get().writes(5_u64))
103 }
104 /// Storage: `VoterList::Lock` (r:1 w:0)
105 /// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
106 /// Storage: `VoterList::PendingRebag` (r:1 w:0)
107 /// Proof: `VoterList::PendingRebag` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
108 /// Storage: `VoterList::ListNodes` (r:3 w:3)
109 /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
110 /// Storage: `Staking::Bonded` (r:1 w:0)
111 /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
112 /// Storage: `Staking::Ledger` (r:1 w:0)
113 /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
114 /// Storage: `VoterList::ListBags` (r:2 w:2)
115 /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
116 fn rebag_terminal() -> Weight {
117 // Proof Size summary in bytes:
118 // Measured: `1712`
119 // Estimated: `8877`
120 // Minimum execution time: 73_169_000 picoseconds.
121 Weight::from_parts(75_025_000, 8877)
122 .saturating_add(T::DbWeight::get().reads(9_u64))
123 .saturating_add(T::DbWeight::get().writes(5_u64))
124 }
125 /// Storage: `VoterList::Lock` (r:1 w:0)
126 /// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
127 /// Storage: `VoterList::ListNodes` (r:4 w:4)
128 /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
129 /// Storage: `Staking::Bonded` (r:2 w:0)
130 /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
131 /// Storage: `Staking::Ledger` (r:2 w:0)
132 /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
133 /// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
134 /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
135 /// Storage: `VoterList::ListBags` (r:1 w:1)
136 /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
137 fn put_in_front_of() -> Weight {
138 // Proof Size summary in bytes:
139 // Measured: `2024`
140 // Estimated: `11506`
141 // Minimum execution time: 85_000_000 picoseconds.
142 Weight::from_parts(88_005_000, 11506)
143 .saturating_add(T::DbWeight::get().reads(11_u64))
144 .saturating_add(T::DbWeight::get().writes(6_u64))
145 }
146 /// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
147 /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
148 /// Storage: `VoterList::CounterForPendingRebag` (r:1 w:1)
149 /// Proof: `VoterList::CounterForPendingRebag` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
150 /// Storage: `VoterList::Lock` (r:1 w:0)
151 /// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
152 /// Storage: `VoterList::NextNodeAutoRebagged` (r:1 w:1)
153 /// Proof: `VoterList::NextNodeAutoRebagged` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
154 /// Storage: `VoterList::PendingRebag` (r:12 w:3)
155 /// Proof: `VoterList::PendingRebag` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
156 /// Storage: `VoterList::ListBags` (r:199 w:3)
157 /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
158 /// Storage: `VoterList::ListNodes` (r:11 w:10)
159 /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
160 /// Storage: `Staking::Bonded` (r:10 w:0)
161 /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
162 /// Storage: `Staking::Ledger` (r:9 w:0)
163 /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
164 fn on_idle() -> Weight {
165 // Proof Size summary in bytes:
166 // Measured: `4933`
167 // Estimated: `509833`
168 // Minimum execution time: 801_938_000 picoseconds.
169 Weight::from_parts(824_412_000, 509833)
170 .saturating_add(T::DbWeight::get().reads(245_u64))
171 .saturating_add(T::DbWeight::get().writes(19_u64))
172 }
173}
174
175// For backwards compatibility and tests.
176impl WeightInfo for () {
177 /// Storage: `VoterList::Lock` (r:1 w:0)
178 /// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
179 /// Storage: `VoterList::PendingRebag` (r:1 w:0)
180 /// Proof: `VoterList::PendingRebag` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
181 /// Storage: `VoterList::ListNodes` (r:4 w:4)
182 /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
183 /// Storage: `Staking::Bonded` (r:1 w:0)
184 /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
185 /// Storage: `Staking::Ledger` (r:1 w:0)
186 /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
187 /// Storage: `VoterList::ListBags` (r:1 w:1)
188 /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
189 fn rebag_non_terminal() -> Weight {
190 // Proof Size summary in bytes:
191 // Measured: `1818`
192 // Estimated: `11506`
193 // Minimum execution time: 75_224_000 picoseconds.
194 Weight::from_parts(77_682_000, 11506)
195 .saturating_add(RocksDbWeight::get().reads(9_u64))
196 .saturating_add(RocksDbWeight::get().writes(5_u64))
197 }
198 /// Storage: `VoterList::Lock` (r:1 w:0)
199 /// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
200 /// Storage: `VoterList::PendingRebag` (r:1 w:0)
201 /// Proof: `VoterList::PendingRebag` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
202 /// Storage: `VoterList::ListNodes` (r:3 w:3)
203 /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
204 /// Storage: `Staking::Bonded` (r:1 w:0)
205 /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
206 /// Storage: `Staking::Ledger` (r:1 w:0)
207 /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
208 /// Storage: `VoterList::ListBags` (r:2 w:2)
209 /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
210 fn rebag_terminal() -> Weight {
211 // Proof Size summary in bytes:
212 // Measured: `1712`
213 // Estimated: `8877`
214 // Minimum execution time: 73_169_000 picoseconds.
215 Weight::from_parts(75_025_000, 8877)
216 .saturating_add(RocksDbWeight::get().reads(9_u64))
217 .saturating_add(RocksDbWeight::get().writes(5_u64))
218 }
219 /// Storage: `VoterList::Lock` (r:1 w:0)
220 /// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
221 /// Storage: `VoterList::ListNodes` (r:4 w:4)
222 /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
223 /// Storage: `Staking::Bonded` (r:2 w:0)
224 /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
225 /// Storage: `Staking::Ledger` (r:2 w:0)
226 /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
227 /// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
228 /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
229 /// Storage: `VoterList::ListBags` (r:1 w:1)
230 /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
231 fn put_in_front_of() -> Weight {
232 // Proof Size summary in bytes:
233 // Measured: `2024`
234 // Estimated: `11506`
235 // Minimum execution time: 85_000_000 picoseconds.
236 Weight::from_parts(88_005_000, 11506)
237 .saturating_add(RocksDbWeight::get().reads(11_u64))
238 .saturating_add(RocksDbWeight::get().writes(6_u64))
239 }
240 /// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
241 /// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
242 /// Storage: `VoterList::CounterForPendingRebag` (r:1 w:1)
243 /// Proof: `VoterList::CounterForPendingRebag` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
244 /// Storage: `VoterList::Lock` (r:1 w:0)
245 /// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
246 /// Storage: `VoterList::NextNodeAutoRebagged` (r:1 w:1)
247 /// Proof: `VoterList::NextNodeAutoRebagged` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
248 /// Storage: `VoterList::PendingRebag` (r:12 w:3)
249 /// Proof: `VoterList::PendingRebag` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`)
250 /// Storage: `VoterList::ListBags` (r:199 w:3)
251 /// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
252 /// Storage: `VoterList::ListNodes` (r:11 w:10)
253 /// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
254 /// Storage: `Staking::Bonded` (r:10 w:0)
255 /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
256 /// Storage: `Staking::Ledger` (r:9 w:0)
257 /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
258 fn on_idle() -> Weight {
259 // Proof Size summary in bytes:
260 // Measured: `4933`
261 // Estimated: `509833`
262 // Minimum execution time: 801_938_000 picoseconds.
263 Weight::from_parts(824_412_000, 509833)
264 .saturating_add(RocksDbWeight::get().reads(245_u64))
265 .saturating_add(RocksDbWeight::get().writes(19_u64))
266 }
267}