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: 2025-07-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `66f1737e2c94`, 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::ListNodes` (r:4 w:4)
86	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
87	/// Storage: `Staking::Bonded` (r:1 w:0)
88	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
89	/// Storage: `Staking::Ledger` (r:1 w:0)
90	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
91	/// Storage: `VoterList::ListBags` (r:1 w:1)
92	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
93	fn rebag_non_terminal() -> Weight {
94		// Proof Size summary in bytes:
95		//  Measured:  `1818`
96		//  Estimated: `11506`
97		// Minimum execution time: 70_816_000 picoseconds.
98		Weight::from_parts(73_697_000, 11506)
99			.saturating_add(T::DbWeight::get().reads(8_u64))
100			.saturating_add(T::DbWeight::get().writes(5_u64))
101	}
102	/// Storage: `VoterList::Lock` (r:1 w:0)
103	/// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
104	/// Storage: `VoterList::ListNodes` (r:3 w:3)
105	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
106	/// Storage: `Staking::Bonded` (r:1 w:0)
107	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
108	/// Storage: `Staking::Ledger` (r:1 w:0)
109	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
110	/// Storage: `VoterList::ListBags` (r:2 w:2)
111	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
112	fn rebag_terminal() -> Weight {
113		// Proof Size summary in bytes:
114		//  Measured:  `1712`
115		//  Estimated: `8877`
116		// Minimum execution time: 68_640_000 picoseconds.
117		Weight::from_parts(70_632_000, 8877)
118			.saturating_add(T::DbWeight::get().reads(8_u64))
119			.saturating_add(T::DbWeight::get().writes(5_u64))
120	}
121	/// Storage: `VoterList::Lock` (r:1 w:0)
122	/// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
123	/// Storage: `VoterList::ListNodes` (r:4 w:4)
124	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
125	/// Storage: `Staking::Bonded` (r:2 w:0)
126	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
127	/// Storage: `Staking::Ledger` (r:2 w:0)
128	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
129	/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
130	/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
131	/// Storage: `VoterList::ListBags` (r:1 w:1)
132	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
133	fn put_in_front_of() -> Weight {
134		// Proof Size summary in bytes:
135		//  Measured:  `2024`
136		//  Estimated: `11506`
137		// Minimum execution time: 79_740_000 picoseconds.
138		Weight::from_parts(81_090_000, 11506)
139			.saturating_add(T::DbWeight::get().reads(11_u64))
140			.saturating_add(T::DbWeight::get().writes(6_u64))
141	}
142	/// Storage: `VoterList::CounterForListNodes` (r:1 w:0)
143	/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
144	/// Storage: `VoterList::Lock` (r:1 w:0)
145	/// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
146	/// Storage: `VoterList::NextNodeAutoRebagged` (r:1 w:1)
147	/// Proof: `VoterList::NextNodeAutoRebagged` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
148	/// Storage: `VoterList::ListBags` (r:200 w:4)
149	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
150	/// Storage: `VoterList::ListNodes` (r:11 w:11)
151	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
152	/// Storage: `Staking::Bonded` (r:10 w:0)
153	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
154	/// Storage: `Staking::Ledger` (r:10 w:0)
155	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
156	fn on_idle() -> Weight {
157		// Proof Size summary in bytes:
158		//  Measured:  `4920`
159		//  Estimated: `512390`
160		// Minimum execution time: 706_288_000 picoseconds.
161		Weight::from_parts(716_009_000, 512390)
162			.saturating_add(T::DbWeight::get().reads(234_u64))
163			.saturating_add(T::DbWeight::get().writes(16_u64))
164	}
165}
166
167// For backwards compatibility and tests.
168impl WeightInfo for () {
169	/// Storage: `VoterList::Lock` (r:1 w:0)
170	/// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
171	/// Storage: `VoterList::ListNodes` (r:4 w:4)
172	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
173	/// Storage: `Staking::Bonded` (r:1 w:0)
174	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
175	/// Storage: `Staking::Ledger` (r:1 w:0)
176	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
177	/// Storage: `VoterList::ListBags` (r:1 w:1)
178	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
179	fn rebag_non_terminal() -> Weight {
180		// Proof Size summary in bytes:
181		//  Measured:  `1818`
182		//  Estimated: `11506`
183		// Minimum execution time: 70_816_000 picoseconds.
184		Weight::from_parts(73_697_000, 11506)
185			.saturating_add(RocksDbWeight::get().reads(8_u64))
186			.saturating_add(RocksDbWeight::get().writes(5_u64))
187	}
188	/// Storage: `VoterList::Lock` (r:1 w:0)
189	/// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
190	/// Storage: `VoterList::ListNodes` (r:3 w:3)
191	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
192	/// Storage: `Staking::Bonded` (r:1 w:0)
193	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
194	/// Storage: `Staking::Ledger` (r:1 w:0)
195	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
196	/// Storage: `VoterList::ListBags` (r:2 w:2)
197	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
198	fn rebag_terminal() -> Weight {
199		// Proof Size summary in bytes:
200		//  Measured:  `1712`
201		//  Estimated: `8877`
202		// Minimum execution time: 68_640_000 picoseconds.
203		Weight::from_parts(70_632_000, 8877)
204			.saturating_add(RocksDbWeight::get().reads(8_u64))
205			.saturating_add(RocksDbWeight::get().writes(5_u64))
206	}
207	/// Storage: `VoterList::Lock` (r:1 w:0)
208	/// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
209	/// Storage: `VoterList::ListNodes` (r:4 w:4)
210	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
211	/// Storage: `Staking::Bonded` (r:2 w:0)
212	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
213	/// Storage: `Staking::Ledger` (r:2 w:0)
214	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
215	/// Storage: `VoterList::CounterForListNodes` (r:1 w:1)
216	/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
217	/// Storage: `VoterList::ListBags` (r:1 w:1)
218	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
219	fn put_in_front_of() -> Weight {
220		// Proof Size summary in bytes:
221		//  Measured:  `2024`
222		//  Estimated: `11506`
223		// Minimum execution time: 79_740_000 picoseconds.
224		Weight::from_parts(81_090_000, 11506)
225			.saturating_add(RocksDbWeight::get().reads(11_u64))
226			.saturating_add(RocksDbWeight::get().writes(6_u64))
227	}
228	/// Storage: `VoterList::CounterForListNodes` (r:1 w:0)
229	/// Proof: `VoterList::CounterForListNodes` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
230	/// Storage: `VoterList::Lock` (r:1 w:0)
231	/// Proof: `VoterList::Lock` (`max_values`: Some(1), `max_size`: Some(0), added: 495, mode: `MaxEncodedLen`)
232	/// Storage: `VoterList::NextNodeAutoRebagged` (r:1 w:1)
233	/// Proof: `VoterList::NextNodeAutoRebagged` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
234	/// Storage: `VoterList::ListBags` (r:200 w:4)
235	/// Proof: `VoterList::ListBags` (`max_values`: None, `max_size`: Some(82), added: 2557, mode: `MaxEncodedLen`)
236	/// Storage: `VoterList::ListNodes` (r:11 w:11)
237	/// Proof: `VoterList::ListNodes` (`max_values`: None, `max_size`: Some(154), added: 2629, mode: `MaxEncodedLen`)
238	/// Storage: `Staking::Bonded` (r:10 w:0)
239	/// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`)
240	/// Storage: `Staking::Ledger` (r:10 w:0)
241	/// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`)
242	fn on_idle() -> Weight {
243		// Proof Size summary in bytes:
244		//  Measured:  `4920`
245		//  Estimated: `512390`
246		// Minimum execution time: 706_288_000 picoseconds.
247		Weight::from_parts(716_009_000, 512390)
248			.saturating_add(RocksDbWeight::get().reads(234_u64))
249			.saturating_add(RocksDbWeight::get().writes(16_u64))
250	}
251}