pallet_staking_async_parachain_runtime/weights/pallet_collator_selection.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//! Autogenerated weights for `pallet_collator_selection`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21//! DATE: 2023-07-31, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `runner-ynta1nyy-project-238-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
24//! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-next-westend-dev")`, DB CACHE: 1024
25
26// Executed Command:
27// ./target/production/polkadot-parachain
28// benchmark
29// pallet
30// --chain=asset-hub-next-westend-dev
31// --wasm-execution=compiled
32// --pallet=pallet_collator_selection
33// --no-storage-info
34// --no-median-slopes
35// --no-min-squares
36// --extrinsic=*
37// --steps=50
38// --repeat=20
39// --json
40// --header=./file_header.txt
41// --output=./parachains/runtimes/assets/asset-hub-next-westend/src/weights/
42
43#![cfg_attr(rustfmt, rustfmt_skip)]
44#![allow(unused_parens)]
45#![allow(unused_imports)]
46#![allow(missing_docs)]
47
48use frame_support::{traits::Get, weights::Weight};
49use core::marker::PhantomData;
50
51/// Weight functions for `pallet_collator_selection`.
52pub struct WeightInfo<T>(PhantomData<T>);
53impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightInfo<T> {
54 /// Storage: `Session::NextKeys` (r:20 w:0)
55 /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
56 /// Storage: `CollatorSelection::Invulnerables` (r:0 w:1)
57 /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
58 /// The range of component `b` is `[1, 20]`.
59 fn set_invulnerables(b: u32, ) -> Weight {
60 // Proof Size summary in bytes:
61 // Measured: `163 + b * (79 ±0)`
62 // Estimated: `1154 + b * (2555 ±0)`
63 // Minimum execution time: 14_105_000 picoseconds.
64 Weight::from_parts(12_034_824, 0)
65 .saturating_add(Weight::from_parts(0, 1154))
66 // Standard Error: 7_023
67 .saturating_add(Weight::from_parts(3_121_830, 0).saturating_mul(b.into()))
68 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into())))
69 .saturating_add(T::DbWeight::get().writes(1))
70 .saturating_add(Weight::from_parts(0, 2555).saturating_mul(b.into()))
71 }
72 /// Storage: `Session::NextKeys` (r:1 w:0)
73 /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
74 /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1)
75 /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
76 /// Storage: `CollatorSelection::Candidates` (r:1 w:1)
77 /// Proof: `CollatorSelection::Candidates` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
78 /// Storage: `System::Account` (r:1 w:1)
79 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
80 /// The range of component `b` is `[1, 19]`.
81 /// The range of component `c` is `[1, 99]`.
82 fn add_invulnerable(b: u32, c: u32, ) -> Weight {
83 // Proof Size summary in bytes:
84 // Measured: `756 + b * (32 ±0) + c * (53 ±0)`
85 // Estimated: `6287 + b * (37 ±0) + c * (53 ±0)`
86 // Minimum execution time: 47_466_000 picoseconds.
87 Weight::from_parts(42_189_027, 0)
88 .saturating_add(Weight::from_parts(0, 6287))
89 // Standard Error: 14_224
90 .saturating_add(Weight::from_parts(291_155, 0).saturating_mul(b.into()))
91 // Standard Error: 2_696
92 .saturating_add(Weight::from_parts(233_090, 0).saturating_mul(c.into()))
93 .saturating_add(T::DbWeight::get().reads(4))
94 .saturating_add(T::DbWeight::get().writes(3))
95 .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into()))
96 .saturating_add(Weight::from_parts(0, 53).saturating_mul(c.into()))
97 }
98 /// Storage: `CollatorSelection::Candidates` (r:1 w:0)
99 /// Proof: `CollatorSelection::Candidates` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
100 /// Storage: `CollatorSelection::Invulnerables` (r:1 w:1)
101 /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
102 /// The range of component `b` is `[5, 20]`.
103 fn remove_invulnerable(b: u32, ) -> Weight {
104 // Proof Size summary in bytes:
105 // Measured: `119 + b * (32 ±0)`
106 // Estimated: `6287`
107 // Minimum execution time: 15_278_000 picoseconds.
108 Weight::from_parts(15_424_907, 0)
109 .saturating_add(Weight::from_parts(0, 6287))
110 // Standard Error: 4_281
111 .saturating_add(Weight::from_parts(197_354, 0).saturating_mul(b.into()))
112 .saturating_add(T::DbWeight::get().reads(2))
113 .saturating_add(T::DbWeight::get().writes(1))
114 }
115 /// Storage: `CollatorSelection::DesiredCandidates` (r:0 w:1)
116 /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
117 fn set_desired_candidates() -> Weight {
118 // Proof Size summary in bytes:
119 // Measured: `0`
120 // Estimated: `0`
121 // Minimum execution time: 7_170_000 picoseconds.
122 Weight::from_parts(7_455_000, 0)
123 .saturating_add(Weight::from_parts(0, 0))
124 .saturating_add(T::DbWeight::get().writes(1))
125 }
126 /// Storage: `CollatorSelection::CandidacyBond` (r:0 w:1)
127 /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
128 fn set_candidacy_bond(_c: u32, _k: u32) -> Weight {
129 // Proof Size summary in bytes:
130 // Measured: `0`
131 // Estimated: `0`
132 // Minimum execution time: 6_969_000 picoseconds.
133 Weight::from_parts(7_350_000, 0)
134 .saturating_add(Weight::from_parts(0, 0))
135 .saturating_add(T::DbWeight::get().writes(1))
136 }
137 /// Storage: `CollatorSelection::Candidates` (r:1 w:1)
138 /// Proof: `CollatorSelection::Candidates` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
139 /// Storage: `CollatorSelection::DesiredCandidates` (r:1 w:0)
140 /// Proof: `CollatorSelection::DesiredCandidates` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
141 /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
142 /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
143 /// Storage: `Session::NextKeys` (r:1 w:0)
144 /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
145 /// Storage: `CollatorSelection::CandidacyBond` (r:1 w:0)
146 /// Proof: `CollatorSelection::CandidacyBond` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
147 /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
148 /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
149 /// The range of component `c` is `[1, 99]`.
150 fn register_as_candidate(c: u32, ) -> Weight {
151 // Proof Size summary in bytes:
152 // Measured: `736 + c * (52 ±0)`
153 // Estimated: `6287 + c * (54 ±0)`
154 // Minimum execution time: 40_783_000 picoseconds.
155 Weight::from_parts(43_731_825, 0)
156 .saturating_add(Weight::from_parts(0, 6287))
157 // Standard Error: 2_328
158 .saturating_add(Weight::from_parts(232_983, 0).saturating_mul(c.into()))
159 .saturating_add(T::DbWeight::get().reads(5))
160 .saturating_add(T::DbWeight::get().writes(2))
161 .saturating_add(Weight::from_parts(0, 54).saturating_mul(c.into()))
162 }
163 /// Storage: `CollatorSelection::Candidates` (r:1 w:1)
164 /// Proof: `CollatorSelection::Candidates` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
165 /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
166 /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
167 /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
168 /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
169 /// The range of component `c` is `[4, 100]`.
170 fn leave_intent(c: u32, ) -> Weight {
171 // Proof Size summary in bytes:
172 // Measured: `306 + c * (50 ±0)`
173 // Estimated: `6287`
174 // Minimum execution time: 32_537_000 picoseconds.
175 Weight::from_parts(34_922_361, 0)
176 .saturating_add(Weight::from_parts(0, 6287))
177 // Standard Error: 2_494
178 .saturating_add(Weight::from_parts(199_859, 0).saturating_mul(c.into()))
179 .saturating_add(T::DbWeight::get().reads(2))
180 .saturating_add(T::DbWeight::get().writes(2))
181 }
182 fn update_bond(c: u32, ) -> Weight {
183 // Proof Size summary in bytes:
184 // Measured: `306 + c * (50 ±0)`
185 // Estimated: `6287`
186 // Minimum execution time: 34_814_000 picoseconds.
187 Weight::from_parts(36_371_520, 0)
188 .saturating_add(Weight::from_parts(0, 6287))
189 // Standard Error: 2_391
190 .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into()))
191 .saturating_add(T::DbWeight::get().reads(2))
192 .saturating_add(T::DbWeight::get().writes(2))
193 }
194 fn take_candidate_slot(c: u32, ) -> Weight {
195 // Proof Size summary in bytes:
196 // Measured: `306 + c * (50 ±0)`
197 // Estimated: `6287`
198 // Minimum execution time: 34_814_000 picoseconds.
199 Weight::from_parts(36_371_520, 0)
200 .saturating_add(Weight::from_parts(0, 6287))
201 // Standard Error: 2_391
202 .saturating_add(Weight::from_parts(201_700, 0).saturating_mul(c.into()))
203 .saturating_add(T::DbWeight::get().reads(2))
204 .saturating_add(T::DbWeight::get().writes(2))
205 }
206 /// Storage: `System::Account` (r:2 w:2)
207 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
208 /// Storage: `System::BlockWeight` (r:1 w:1)
209 /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`)
210 /// Storage: `CollatorSelection::LastAuthoredBlock` (r:0 w:1)
211 /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
212 fn note_author() -> Weight {
213 // Proof Size summary in bytes:
214 // Measured: `103`
215 // Estimated: `6196`
216 // Minimum execution time: 43_240_000 picoseconds.
217 Weight::from_parts(44_434_000, 0)
218 .saturating_add(Weight::from_parts(0, 6196))
219 .saturating_add(T::DbWeight::get().reads(3))
220 .saturating_add(T::DbWeight::get().writes(4))
221 }
222 /// Storage: `CollatorSelection::Candidates` (r:1 w:0)
223 /// Proof: `CollatorSelection::Candidates` (`max_values`: Some(1), `max_size`: Some(4802), added: 5297, mode: `MaxEncodedLen`)
224 /// Storage: `CollatorSelection::LastAuthoredBlock` (r:100 w:0)
225 /// Proof: `CollatorSelection::LastAuthoredBlock` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
226 /// Storage: `CollatorSelection::Invulnerables` (r:1 w:0)
227 /// Proof: `CollatorSelection::Invulnerables` (`max_values`: Some(1), `max_size`: Some(641), added: 1136, mode: `MaxEncodedLen`)
228 /// Storage: `System::BlockWeight` (r:1 w:1)
229 /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`)
230 /// Storage: `System::Account` (r:97 w:97)
231 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
232 /// The range of component `r` is `[1, 100]`.
233 /// The range of component `c` is `[1, 100]`.
234 fn new_session(r: u32, c: u32, ) -> Weight {
235 // Proof Size summary in bytes:
236 // Measured: `2243 + c * (97 ±0) + r * (112 ±0)`
237 // Estimated: `6287 + c * (2519 ±0) + r * (2603 ±0)`
238 // Minimum execution time: 16_841_000 picoseconds.
239 Weight::from_parts(17_460_000, 0)
240 .saturating_add(Weight::from_parts(0, 6287))
241 // Standard Error: 347_803
242 .saturating_add(Weight::from_parts(15_008_101, 0).saturating_mul(c.into()))
243 .saturating_add(T::DbWeight::get().reads(4))
244 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
245 .saturating_add(T::DbWeight::get().writes(1))
246 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
247 .saturating_add(Weight::from_parts(0, 2519).saturating_mul(c.into()))
248 .saturating_add(Weight::from_parts(0, 2603).saturating_mul(r.into()))
249 }
250}