referrerpolicy=no-referrer-when-downgrade

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: 2026-04-02, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `d27f6b96fa08`, 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_rebag() -> 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:1)
86	/// Proof: `VoterList::PendingRebag` (`max_values`: None, `max_size`: Some(40), added: 2515, 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: 74_928_000 picoseconds.
100		Weight::from_parts(81_000_000, 11506)
101			.saturating_add(T::DbWeight::get().reads(9_u64))
102			.saturating_add(T::DbWeight::get().writes(6_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:1)
107	/// Proof: `VoterList::PendingRebag` (`max_values`: None, `max_size`: Some(40), added: 2515, 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: 72_974_000 picoseconds.
121		Weight::from_parts(80_038_000, 8877)
122			.saturating_add(T::DbWeight::get().reads(9_u64))
123			.saturating_add(T::DbWeight::get().writes(6_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: 80_328_000 picoseconds.
142		Weight::from_parts(87_211_000, 11506)
143			.saturating_add(T::DbWeight::get().reads(11_u64))
144			.saturating_add(T::DbWeight::get().writes(6_u64))
145	}
146	/// Storage: `VoterList::Lock` (r:1 w:0)
147	/// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
148	/// Storage: `VoterList::PendingRebag` (r:1 w:1)
149	/// Proof: `VoterList::PendingRebag` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
150	/// Storage: `VoterList::CounterForPendingRebag` (r:1 w:1)
151	/// Proof: `VoterList::CounterForPendingRebag` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
152	/// Storage: `VoterList::ListNodes` (r:4 w:4)
153	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
154	/// Storage: `Staking::Bonded` (r:1 w:0)
155	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
156	/// Storage: `Staking::Ledger` (r:1 w:0)
157	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
158	/// Storage: `VoterList::ListBags` (r:1 w:1)
159	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
160	fn on_idle_rebag() -> Weight {
161		// Proof Size summary in bytes:
162		//  Measured:  `1905`
163		//  Estimated: `11506`
164		// Minimum execution time: 73_723_000 picoseconds.
165		Weight::from_parts(79_518_000, 11506)
166			.saturating_add(T::DbWeight::get().reads(10_u64))
167			.saturating_add(T::DbWeight::get().writes(7_u64))
168	}
169}
170
171// For backwards compatibility and tests.
172impl WeightInfo for () {
173	/// Storage: `VoterList::Lock` (r:1 w:0)
174	/// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
175	/// Storage: `VoterList::PendingRebag` (r:1 w:1)
176	/// Proof: `VoterList::PendingRebag` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
177	/// Storage: `VoterList::ListNodes` (r:4 w:4)
178	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
179	/// Storage: `Staking::Bonded` (r:1 w:0)
180	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
181	/// Storage: `Staking::Ledger` (r:1 w:0)
182	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
183	/// Storage: `VoterList::ListBags` (r:1 w:1)
184	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
185	fn rebag_non_terminal() -> Weight {
186		// Proof Size summary in bytes:
187		//  Measured:  `1818`
188		//  Estimated: `11506`
189		// Minimum execution time: 74_928_000 picoseconds.
190		Weight::from_parts(81_000_000, 11506)
191			.saturating_add(RocksDbWeight::get().reads(9_u64))
192			.saturating_add(RocksDbWeight::get().writes(6_u64))
193	}
194	/// Storage: `VoterList::Lock` (r:1 w:0)
195	/// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
196	/// Storage: `VoterList::PendingRebag` (r:1 w:1)
197	/// Proof: `VoterList::PendingRebag` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
198	/// Storage: `VoterList::ListNodes` (r:3 w:3)
199	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
200	/// Storage: `Staking::Bonded` (r:1 w:0)
201	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
202	/// Storage: `Staking::Ledger` (r:1 w:0)
203	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
204	/// Storage: `VoterList::ListBags` (r:2 w:2)
205	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
206	fn rebag_terminal() -> Weight {
207		// Proof Size summary in bytes:
208		//  Measured:  `1712`
209		//  Estimated: `8877`
210		// Minimum execution time: 72_974_000 picoseconds.
211		Weight::from_parts(80_038_000, 8877)
212			.saturating_add(RocksDbWeight::get().reads(9_u64))
213			.saturating_add(RocksDbWeight::get().writes(6_u64))
214	}
215	/// Storage: `VoterList::Lock` (r:1 w:0)
216	/// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
217	/// Storage: `VoterList::ListNodes` (r:4 w:4)
218	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
219	/// Storage: `Staking::Bonded` (r:2 w:0)
220	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
221	/// Storage: `Staking::Ledger` (r:2 w:0)
222	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
223	/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
224	/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
225	/// Storage: `VoterList::ListBags` (r:1 w:1)
226	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
227	fn put_in_front_of() -> Weight {
228		// Proof Size summary in bytes:
229		//  Measured:  `2024`
230		//  Estimated: `11506`
231		// Minimum execution time: 80_328_000 picoseconds.
232		Weight::from_parts(87_211_000, 11506)
233			.saturating_add(RocksDbWeight::get().reads(11_u64))
234			.saturating_add(RocksDbWeight::get().writes(6_u64))
235	}
236	/// Storage: `VoterList::Lock` (r:1 w:0)
237	/// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
238	/// Storage: `VoterList::PendingRebag` (r:1 w:1)
239	/// Proof: `VoterList::PendingRebag` (`max_values`: None, `max_size`: Some(40), added: 2515, mode: `MaxEncodedLen`)
240	/// Storage: `VoterList::CounterForPendingRebag` (r:1 w:1)
241	/// Proof: `VoterList::CounterForPendingRebag` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
242	/// Storage: `VoterList::ListNodes` (r:4 w:4)
243	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
244	/// Storage: `Staking::Bonded` (r:1 w:0)
245	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
246	/// Storage: `Staking::Ledger` (r:1 w:0)
247	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
248	/// Storage: `VoterList::ListBags` (r:1 w:1)
249	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
250	fn on_idle_rebag() -> Weight {
251		// Proof Size summary in bytes:
252		//  Measured:  `1905`
253		//  Estimated: `11506`
254		// Minimum execution time: 73_723_000 picoseconds.
255		Weight::from_parts(79_518_000, 11506)
256			.saturating_add(RocksDbWeight::get().reads(10_u64))
257			.saturating_add(RocksDbWeight::get().writes(7_u64))
258	}
259}