westend_runtime/weights/pallet_election_provider_multi_phase.rs
1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Polkadot.
3
4// Polkadot is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Polkadot is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
16
17//! Autogenerated weights for `pallet_election_provider_multi_phase`
18//!
19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
20//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `3a2e9ae8a8f5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
23//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
24
25// Executed Command:
26// frame-omni-bencher
27// v1
28// benchmark
29// pallet
30// --extrinsic=*
31// --runtime=target/production/wbuild/westend-runtime/westend_runtime.wasm
32// --pallet=pallet_election_provider_multi_phase
33// --header=/__w/polkadot-sdk/polkadot-sdk/polkadot/file_header.txt
34// --output=./polkadot/runtime/westend/src/weights
35// --wasm-execution=compiled
36// --steps=50
37// --repeat=20
38// --heap-pages=4096
39// --no-storage-info
40// --no-min-squares
41// --no-median-slopes
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_election_provider_multi_phase`.
52pub struct WeightInfo<T>(PhantomData<T>);
53impl<T: frame_system::Config> pallet_election_provider_multi_phase::WeightInfo for WeightInfo<T> {
54 /// Storage: `Staking::CurrentEra` (r:1 w:0)
55 /// Proof: `Staking::CurrentEra` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
56 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
57 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
58 fn on_initialize_nothing() -> Weight {
59 // Proof Size summary in bytes:
60 // Measured: `636`
61 // Estimated: `2121`
62 // Minimum execution time: 11_404_000 picoseconds.
63 Weight::from_parts(12_293_000, 0)
64 .saturating_add(Weight::from_parts(0, 2121))
65 .saturating_add(T::DbWeight::get().reads(2))
66 }
67 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
68 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
69 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1)
70 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
71 fn on_initialize_open_signed() -> Weight {
72 // Proof Size summary in bytes:
73 // Measured: `6`
74 // Estimated: `1491`
75 // Minimum execution time: 7_932_000 picoseconds.
76 Weight::from_parts(8_356_000, 0)
77 .saturating_add(Weight::from_parts(0, 1491))
78 .saturating_add(T::DbWeight::get().reads(2))
79 .saturating_add(T::DbWeight::get().writes(1))
80 }
81 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
82 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
83 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1)
84 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
85 fn on_initialize_open_unsigned() -> Weight {
86 // Proof Size summary in bytes:
87 // Measured: `6`
88 // Estimated: `1491`
89 // Minimum execution time: 8_851_000 picoseconds.
90 Weight::from_parts(9_202_000, 0)
91 .saturating_add(Weight::from_parts(0, 1491))
92 .saturating_add(T::DbWeight::get().reads(2))
93 .saturating_add(T::DbWeight::get().writes(1))
94 }
95 /// Storage: `System::Account` (r:1 w:1)
96 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
97 /// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:0 w:1)
98 /// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
99 fn finalize_signed_phase_accept_solution() -> Weight {
100 // Proof Size summary in bytes:
101 // Measured: `174`
102 // Estimated: `3593`
103 // Minimum execution time: 33_004_000 picoseconds.
104 Weight::from_parts(34_226_000, 0)
105 .saturating_add(Weight::from_parts(0, 3593))
106 .saturating_add(T::DbWeight::get().reads(1))
107 .saturating_add(T::DbWeight::get().writes(2))
108 }
109 /// Storage: `System::Account` (r:1 w:1)
110 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
111 fn finalize_signed_phase_reject_solution() -> Weight {
112 // Proof Size summary in bytes:
113 // Measured: `174`
114 // Estimated: `3593`
115 // Minimum execution time: 24_658_000 picoseconds.
116 Weight::from_parts(25_381_000, 0)
117 .saturating_add(Weight::from_parts(0, 3593))
118 .saturating_add(T::DbWeight::get().reads(1))
119 .saturating_add(T::DbWeight::get().writes(1))
120 }
121 /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:0 w:1)
122 /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
123 /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:0 w:1)
124 /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
125 /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:0 w:1)
126 /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
127 /// The range of component `v` is `[1000, 2000]`.
128 /// The range of component `t` is `[500, 1000]`.
129 fn create_snapshot_internal(v: u32, _t: u32, ) -> Weight {
130 // Proof Size summary in bytes:
131 // Measured: `0`
132 // Estimated: `0`
133 // Minimum execution time: 479_977_000 picoseconds.
134 Weight::from_parts(494_678_000, 0)
135 .saturating_add(Weight::from_parts(0, 0))
136 // Standard Error: 2_656
137 .saturating_add(Weight::from_parts(263_896, 0).saturating_mul(v.into()))
138 .saturating_add(T::DbWeight::get().writes(3))
139 }
140 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1)
141 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionIndices` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
142 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (r:1 w:1)
143 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
144 /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:1)
145 /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
146 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionsMap` (r:1 w:0)
147 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionsMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
148 /// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:1 w:1)
149 /// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
150 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:1)
151 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
152 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1)
153 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
154 /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:0 w:1)
155 /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
156 /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:0 w:1)
157 /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
158 /// The range of component `a` is `[500, 800]`.
159 /// The range of component `d` is `[200, 400]`.
160 fn elect_queued(a: u32, d: u32, ) -> Weight {
161 // Proof Size summary in bytes:
162 // Measured: `228 + a * (768 ±0) + d * (48 ±0)`
163 // Estimated: `3780 + a * (768 ±0) + d * (49 ±0)`
164 // Minimum execution time: 342_803_000 picoseconds.
165 Weight::from_parts(360_088_000, 0)
166 .saturating_add(Weight::from_parts(0, 3780))
167 // Standard Error: 4_645
168 .saturating_add(Weight::from_parts(286_216, 0).saturating_mul(a.into()))
169 .saturating_add(T::DbWeight::get().reads(7))
170 .saturating_add(T::DbWeight::get().writes(8))
171 .saturating_add(Weight::from_parts(0, 768).saturating_mul(a.into()))
172 .saturating_add(Weight::from_parts(0, 49).saturating_mul(d.into()))
173 }
174 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
175 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
176 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
177 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
178 /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:0)
179 /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
180 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1)
181 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionIndices` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
182 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (r:1 w:1)
183 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
184 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionsMap` (r:0 w:1)
185 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionsMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
186 fn submit() -> Weight {
187 // Proof Size summary in bytes:
188 // Measured: `7326`
189 // Estimated: `8811`
190 // Minimum execution time: 67_225_000 picoseconds.
191 Weight::from_parts(69_131_000, 0)
192 .saturating_add(Weight::from_parts(0, 8811))
193 .saturating_add(T::DbWeight::get().reads(5))
194 .saturating_add(T::DbWeight::get().writes(3))
195 }
196 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
197 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
198 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
199 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
200 /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:1 w:0)
201 /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
202 /// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:1 w:1)
203 /// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
204 /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:0)
205 /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
206 /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:1 w:0)
207 /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
208 /// Storage: `ElectionProviderMultiPhase::MinimumUntrustedScore` (r:1 w:0)
209 /// Proof: `ElectionProviderMultiPhase::MinimumUntrustedScore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
210 /// The range of component `v` is `[1000, 2000]`.
211 /// The range of component `t` is `[500, 1000]`.
212 /// The range of component `a` is `[500, 800]`.
213 /// The range of component `d` is `[200, 400]`.
214 fn submit_unsigned(v: u32, t: u32, a: u32, _d: u32, ) -> Weight {
215 // Proof Size summary in bytes:
216 // Measured: `110 + t * (32 ±0) + v * (553 ±0)`
217 // Estimated: `1595 + t * (32 ±0) + v * (553 ±0)`
218 // Minimum execution time: 5_383_153_000 picoseconds.
219 Weight::from_parts(5_492_225_000, 0)
220 .saturating_add(Weight::from_parts(0, 1595))
221 // Standard Error: 17_191
222 .saturating_add(Weight::from_parts(417_691, 0).saturating_mul(v.into()))
223 // Standard Error: 50_944
224 .saturating_add(Weight::from_parts(3_945_793, 0).saturating_mul(a.into()))
225 .saturating_add(T::DbWeight::get().reads(7))
226 .saturating_add(T::DbWeight::get().writes(1))
227 .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into()))
228 .saturating_add(Weight::from_parts(0, 553).saturating_mul(v.into()))
229 }
230 /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:1 w:0)
231 /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
232 /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:1 w:0)
233 /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
234 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
235 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
236 /// Storage: `ElectionProviderMultiPhase::MinimumUntrustedScore` (r:1 w:0)
237 /// Proof: `ElectionProviderMultiPhase::MinimumUntrustedScore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
238 /// The range of component `v` is `[1000, 2000]`.
239 /// The range of component `t` is `[500, 1000]`.
240 /// The range of component `a` is `[500, 800]`.
241 /// The range of component `d` is `[200, 400]`.
242 fn feasibility_check(v: u32, t: u32, a: u32, _d: u32, ) -> Weight {
243 // Proof Size summary in bytes:
244 // Measured: `85 + t * (32 ±0) + v * (553 ±0)`
245 // Estimated: `1570 + t * (32 ±0) + v * (553 ±0)`
246 // Minimum execution time: 4_550_837_000 picoseconds.
247 Weight::from_parts(4_628_052_000, 0)
248 .saturating_add(Weight::from_parts(0, 1570))
249 // Standard Error: 16_190
250 .saturating_add(Weight::from_parts(470_334, 0).saturating_mul(v.into()))
251 // Standard Error: 47_977
252 .saturating_add(Weight::from_parts(2_834_925, 0).saturating_mul(a.into()))
253 .saturating_add(T::DbWeight::get().reads(4))
254 .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into()))
255 .saturating_add(Weight::from_parts(0, 553).saturating_mul(v.into()))
256 }
257}