referrerpolicy=no-referrer-when-downgrade

people_westend_runtime/weights/
pallet_collator_selection.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// SPDX-License-Identifier: Apache-2.0
3
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// 	http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! Autogenerated weights for `pallet_collator_selection`
17//!
18//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
19//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
20//! WORST CASE MAP SIZE: `1000000`
21//! HOSTNAME: `b9a9df1fcddf`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
22//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
23
24// Executed Command:
25// frame-omni-bencher
26// v1
27// benchmark
28// pallet
29// --extrinsic=*
30// --runtime=target/production/wbuild/people-westend-runtime/people_westend_runtime.wasm
31// --pallet=pallet_collator_selection
32// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt
33// --output=./cumulus/parachains/runtimes/people/people-westend/src/weights
34// --wasm-execution=compiled
35// --steps=50
36// --repeat=20
37// --heap-pages=4096
38// --no-storage-info
39// --no-min-squares
40// --no-median-slopes
41
42#![cfg_attr(rustfmt, rustfmt_skip)]
43#![allow(unused_parens)]
44#![allow(unused_imports)]
45#![allow(missing_docs)]
46
47use frame_support::{traits::Get, weights::Weight};
48use core::marker::PhantomData;
49
50/// Weight functions for `pallet_collator_selection`.
51pub struct WeightInfo<T>(PhantomData<T>);
52impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightInfo<T> {
53	/// Storage: `Session::NextKeys` (r:20 w:0)
54	/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
55	/// Storage: `CollatorSelection::Invulnerables` (r:0 w:1)
56	/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
57	/// The range of component `b` is `[1, 20]`.
58	fn set_invulnerables(b: u32, ) -> Weight {
59		// Proof Size summary in bytes:
60		//  Measured:  `164 + b * (79 ±0)`
61		//  Estimated: `1155 + b * (2555 ±0)`
62		// Minimum execution time: 12_993_000 picoseconds.
63		Weight::from_parts(10_972_400, 0)
64			.saturating_add(Weight::from_parts(0, 1155))
65			// Standard Error: 11_752
66			.saturating_add(Weight::from_parts(4_036_342, 0).saturating_mul(b.into()))
67			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into())))
68			.saturating_add(T::DbWeight::get().writes(1))
69			.saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into()))
70	}
71	/// Storage: `Session::NextKeys` (r:1 w:0)
72	/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
73	/// Storage: `CollatorSelection::Invulnerables` (r:1 w:1)
74	/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
75	/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
76	/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
77	/// Storage: `System::Account` (r:1 w:1)
78	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
79	/// The range of component `b` is `[1, 19]`.
80	/// The range of component `c` is `[1, 99]`.
81	fn add_invulnerable(b: u32, c: u32, ) -> Weight {
82		// Proof Size summary in bytes:
83		//  Measured:  `757 + b * (32 ±0) + c * (53 ±0)`
84		//  Estimated: `6287 + b * (37 ±0) + c * (53 ±0)`
85		// Minimum execution time: 49_749_000 picoseconds.
86		Weight::from_parts(50_231_845, 0)
87			.saturating_add(Weight::from_parts(0, 6287))
88			// Standard Error: 7_742
89			.saturating_add(Weight::from_parts(132_603, 0).saturating_mul(b.into()))
90			// Standard Error: 1_467
91			.saturating_add(Weight::from_parts(135_711, 0).saturating_mul(c.into()))
92			.saturating_add(T::DbWeight::get().reads(4))
93			.saturating_add(T::DbWeight::get().writes(3))
94			.saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into()))
95			.saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into()))
96	}
97	/// Storage: `CollatorSelection::CandidateList` (r:1 w:0)
98	/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
99	/// Storage: `CollatorSelection::Invulnerables` (r:1 w:1)
100	/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
101	/// The range of component `b` is `[5, 20]`.
102	fn remove_invulnerable(b: u32, ) -> Weight {
103		// Proof Size summary in bytes:
104		//  Measured:  `119 + b * (32 ±0)`
105		//  Estimated: `6287`
106		// Minimum execution time: 13_019_000 picoseconds.
107		Weight::from_parts(13_283_749, 0)
108			.saturating_add(Weight::from_parts(0, 6287))
109			// Standard Error: 2_031
110			.saturating_add(Weight::from_parts(154_331, 0).saturating_mul(b.into()))
111			.saturating_add(T::DbWeight::get().reads(2))
112			.saturating_add(T::DbWeight::get().writes(1))
113	}
114	/// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1)
115	/// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
116	fn set_desired_candidates() -> Weight {
117		// Proof Size summary in bytes:
118		//  Measured:  `0`
119		//  Estimated: `0`
120		// Minimum execution time: 5_183_000 picoseconds.
121		Weight::from_parts(5_396_000, 0)
122			.saturating_add(Weight::from_parts(0, 0))
123			.saturating_add(T::DbWeight::get().writes(1))
124	}
125	/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:1)
126	/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
127	/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
128	/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
129	/// Storage: `System::Account` (r:100 w:100)
130	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
131	/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:100)
132	/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
133	/// The range of component `c` is `[0, 100]`.
134	/// The range of component `k` is `[0, 100]`.
135	fn set_candidacy_bond(c: u32, k: u32, ) -> Weight {
136		// Proof Size summary in bytes:
137		//  Measured:  `0 + c * (180 ±0) + k * (112 ±0)`
138		//  Estimated: `6287 + c * (901 ±29) + k * (901 ±29)`
139		// Minimum execution time: 11_268_000 picoseconds.
140		Weight::from_parts(11_630_000, 0)
141			.saturating_add(Weight::from_parts(0, 6287))
142			// Standard Error: 175_305
143			.saturating_add(Weight::from_parts(5_993_379, 0).saturating_mul(c.into()))
144			// Standard Error: 175_305
145			.saturating_add(Weight::from_parts(5_578_368, 0).saturating_mul(k.into()))
146			.saturating_add(T::DbWeight::get().reads(2))
147			.saturating_add(T::DbWeight::get().writes(1))
148			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
149			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into())))
150			.saturating_add(Weight::from_parts(0, 901).saturating_mul(c.into()))
151			.saturating_add(Weight::from_parts(0, 901).saturating_mul(k.into()))
152	}
153	/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
154	/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
155	/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
156	/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
157	/// The range of component `c` is `[4, 100]`.
158	fn update_bond(c: u32, ) -> Weight {
159		// Proof Size summary in bytes:
160		//  Measured:  `287 + c * (50 ±0)`
161		//  Estimated: `6287`
162		// Minimum execution time: 29_536_000 picoseconds.
163		Weight::from_parts(32_437_842, 0)
164			.saturating_add(Weight::from_parts(0, 6287))
165			// Standard Error: 3_767
166			.saturating_add(Weight::from_parts(142_418, 0).saturating_mul(c.into()))
167			.saturating_add(T::DbWeight::get().reads(2))
168			.saturating_add(T::DbWeight::get().writes(1))
169	}
170	/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
171	/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
172	/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
173	/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
174	/// Storage: `Session::NextKeys` (r:1 w:0)
175	/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
176	/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
177	/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
178	/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
179	/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
180	/// The range of component `c` is `[1, 99]`.
181	fn register_as_candidate(c: u32, ) -> Weight {
182		// Proof Size summary in bytes:
183		//  Measured:  `724 + c * (52 ±0)`
184		//  Estimated: `6287 + c * (54 ±0)`
185		// Minimum execution time: 41_936_000 picoseconds.
186		Weight::from_parts(48_186_734, 0)
187			.saturating_add(Weight::from_parts(0, 6287))
188			// Standard Error: 3_600
189			.saturating_add(Weight::from_parts(166_714, 0).saturating_mul(c.into()))
190			.saturating_add(T::DbWeight::get().reads(4))
191			.saturating_add(T::DbWeight::get().writes(2))
192			.saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into()))
193	}
194	/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
195	/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
196	/// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
197	/// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
198	/// Storage: `Session::NextKeys` (r:1 w:0)
199	/// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
200	/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
201	/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
202	/// Storage: `System::Account` (r:1 w:1)
203	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
204	/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:2)
205	/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
206	/// The range of component `c` is `[4, 100]`.
207	fn take_candidate_slot(c: u32, ) -> Weight {
208		// Proof Size summary in bytes:
209		//  Measured:  `892 + c * (52 ±0)`
210		//  Estimated: `6287 + c * (55 ±0)`
211		// Minimum execution time: 60_920_000 picoseconds.
212		Weight::from_parts(66_215_050, 0)
213			.saturating_add(Weight::from_parts(0, 6287))
214			// Standard Error: 3_128
215			.saturating_add(Weight::from_parts(175_807, 0).saturating_mul(c.into()))
216			.saturating_add(T::DbWeight::get().reads(5))
217			.saturating_add(T::DbWeight::get().writes(4))
218			.saturating_add(Weight::from_parts(0, 55).saturating_mul(c.into()))
219	}
220	/// Storage: `CollatorSelection::CandidateList` (r:1 w:1)
221	/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
222	/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
223	/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
224	/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
225	/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
226	/// The range of component `c` is `[4, 100]`.
227	fn leave_intent(c: u32, ) -> Weight {
228		// Proof Size summary in bytes:
229		//  Measured:  `314 + c * (48 ±0)`
230		//  Estimated: `6287`
231		// Minimum execution time: 32_650_000 picoseconds.
232		Weight::from_parts(37_154_546, 0)
233			.saturating_add(Weight::from_parts(0, 6287))
234			// Standard Error: 3_936
235			.saturating_add(Weight::from_parts(180_028, 0).saturating_mul(c.into()))
236			.saturating_add(T::DbWeight::get().reads(2))
237			.saturating_add(T::DbWeight::get().writes(2))
238	}
239	/// Storage: `System::Account` (r:2 w:2)
240	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
241	/// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
242	/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
243	fn note_author() -> Weight {
244		// Proof Size summary in bytes:
245		//  Measured:  `103`
246		//  Estimated: `6196`
247		// Minimum execution time: 42_238_000 picoseconds.
248		Weight::from_parts(43_815_000, 0)
249			.saturating_add(Weight::from_parts(0, 6196))
250			.saturating_add(T::DbWeight::get().reads(2))
251			.saturating_add(T::DbWeight::get().writes(3))
252	}
253	/// Storage: `CollatorSelection::CandidateList` (r:1 w:0)
254	/// Proof: `CollatorSelection::CandidateList` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
255	/// Storage: `CollatorSelection::LastAuthoredBlock` (r:100 w:0)
256	/// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
257	/// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
258	/// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
259	/// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0)
260	/// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
261	/// Storage: `System::Account` (r:97 w:97)
262	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
263	/// The range of component `r` is `[1, 100]`.
264	/// The range of component `c` is `[1, 100]`.
265	fn new_session(r: u32, c: u32, ) -> Weight {
266		// Proof Size summary in bytes:
267		//  Measured:  `2180 + c * (97 ±0) + r * (112 ±0)`
268		//  Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)`
269		// Minimum execution time: 20_138_000 picoseconds.
270		Weight::from_parts(20_568_000, 0)
271			.saturating_add(Weight::from_parts(0, 6287))
272			// Standard Error: 311_519
273			.saturating_add(Weight::from_parts(14_402_342, 0).saturating_mul(c.into()))
274			.saturating_add(T::DbWeight::get().reads(4))
275			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
276			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
277			.saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into()))
278			.saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into()))
279	}
280}