coretime_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: `050e4dc4313a`, 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/coretime-westend-runtime/coretime_westend_runtime.wasm
31// --pallet=pallet_collator_selection
32// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt
33// --output=./cumulus/parachains/runtimes/coretime/coretime-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: 13_058_000 picoseconds.
63 Weight::from_parts(10_426_379, 0)
64 .saturating_add(Weight::from_parts(0, 1155))
65 // Standard Error: 11_444
66 .saturating_add(Weight::from_parts(4_141_255, 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: `758 + b * (32 ±0) + c * (53 ±0)`
84 // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)`
85 // Minimum execution time: 49_709_000 picoseconds.
86 Weight::from_parts(50_379_163, 0)
87 .saturating_add(Weight::from_parts(0, 6287))
88 // Standard Error: 14_424
89 .saturating_add(Weight::from_parts(131_127, 0).saturating_mul(b.into()))
90 // Standard Error: 2_734
91 .saturating_add(Weight::from_parts(151_863, 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_087_000 picoseconds.
107 Weight::from_parts(12_950_293, 0)
108 .saturating_add(Weight::from_parts(0, 6287))
109 // Standard Error: 4_301
110 .saturating_add(Weight::from_parts(184_972, 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_090_000 picoseconds.
121 Weight::from_parts(5_455_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 * (181 ±0) + k * (113 ±0)`
138 // Estimated: `6287 + c * (901 ±29) + k * (901 ±29)`
139 // Minimum execution time: 11_044_000 picoseconds.
140 Weight::from_parts(11_224_000, 0)
141 .saturating_add(Weight::from_parts(0, 6287))
142 // Standard Error: 177_896
143 .saturating_add(Weight::from_parts(6_104_168, 0).saturating_mul(c.into()))
144 // Standard Error: 177_896
145 .saturating_add(Weight::from_parts(5_684_604, 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: `295 + c * (49 ±0)`
161 // Estimated: `6287`
162 // Minimum execution time: 29_427_000 picoseconds.
163 Weight::from_parts(32_633_516, 0)
164 .saturating_add(Weight::from_parts(0, 6287))
165 // Standard Error: 1_731
166 .saturating_add(Weight::from_parts(128_430, 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: 42_217_000 picoseconds.
186 Weight::from_parts(47_130_592, 0)
187 .saturating_add(Weight::from_parts(0, 6287))
188 // Standard Error: 3_496
189 .saturating_add(Weight::from_parts(219_059, 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_970_000 picoseconds.
212 Weight::from_parts(63_142_642, 0)
213 .saturating_add(Weight::from_parts(0, 6287))
214 // Standard Error: 4_373
215 .saturating_add(Weight::from_parts(350_641, 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_013_000 picoseconds.
232 Weight::from_parts(33_894_234, 0)
233 .saturating_add(Weight::from_parts(0, 6287))
234 // Standard Error: 3_394
235 .saturating_add(Weight::from_parts(303_231, 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: 43_540_000 picoseconds.
248 Weight::from_parts(44_240_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: `2146 + c * (97 ±0) + r * (113 ±0)`
268 // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)`
269 // Minimum execution time: 19_585_000 picoseconds.
270 Weight::from_parts(20_267_000, 0)
271 .saturating_add(Weight::from_parts(0, 6287))
272 // Standard Error: 333_311
273 .saturating_add(Weight::from_parts(15_652_469, 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}