pallet_election_provider_multi_phase/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_election_provider_multi_phase`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `4563561839a5`, 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_election_provider_multi_phase
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/election-provider-multi-phase/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// --genesis-builder-policy=none
62// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic,pallet_nomination_pools,pallet_remark,pallet_transaction_storage,pallet_election_provider_multi_block,pallet_election_provider_multi_block::signed,pallet_election_provider_multi_block::unsigned,pallet_election_provider_multi_block::verifier
63
64#![cfg_attr(rustfmt, rustfmt_skip)]
65#![allow(unused_parens)]
66#![allow(unused_imports)]
67#![allow(missing_docs)]
68#![allow(dead_code)]
69
70use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
71use core::marker::PhantomData;
72
73/// Weight functions needed for `pallet_election_provider_multi_phase`.
74pub trait WeightInfo {
75 fn on_initialize_nothing() -> Weight;
76 fn on_initialize_open_signed() -> Weight;
77 fn on_initialize_open_unsigned() -> Weight;
78 fn finalize_signed_phase_accept_solution() -> Weight;
79 fn finalize_signed_phase_reject_solution() -> Weight;
80 fn create_snapshot_internal(v: u32, t: u32, ) -> Weight;
81 fn elect_queued(a: u32, d: u32, ) -> Weight;
82 fn submit() -> Weight;
83 fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight;
84 fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight;
85}
86
87/// Weights for `pallet_election_provider_multi_phase` using the Substrate node and recommended hardware.
88pub struct SubstrateWeight<T>(PhantomData<T>);
89impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
90 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
91 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
92 fn on_initialize_nothing() -> Weight {
93 // Proof Size summary in bytes:
94 // Measured: `0`
95 // Estimated: `1485`
96 // Minimum execution time: 1_355_000 picoseconds.
97 Weight::from_parts(1_403_000, 1485)
98 .saturating_add(T::DbWeight::get().reads(1_u64))
99 }
100 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
101 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
102 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1)
103 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
104 fn on_initialize_open_signed() -> Weight {
105 // Proof Size summary in bytes:
106 // Measured: `0`
107 // Estimated: `1485`
108 // Minimum execution time: 5_350_000 picoseconds.
109 Weight::from_parts(5_507_000, 1485)
110 .saturating_add(T::DbWeight::get().reads(2_u64))
111 .saturating_add(T::DbWeight::get().writes(1_u64))
112 }
113 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
114 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
115 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1)
116 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
117 fn on_initialize_open_unsigned() -> Weight {
118 // Proof Size summary in bytes:
119 // Measured: `0`
120 // Estimated: `1485`
121 // Minimum execution time: 6_110_000 picoseconds.
122 Weight::from_parts(6_312_000, 1485)
123 .saturating_add(T::DbWeight::get().reads(2_u64))
124 .saturating_add(T::DbWeight::get().writes(1_u64))
125 }
126 /// Storage: `System::Account` (r:1 w:1)
127 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
128 /// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:0 w:1)
129 /// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
130 fn finalize_signed_phase_accept_solution() -> Weight {
131 // Proof Size summary in bytes:
132 // Measured: `52`
133 // Estimated: `3593`
134 // Minimum execution time: 24_085_000 picoseconds.
135 Weight::from_parts(24_495_000, 3593)
136 .saturating_add(T::DbWeight::get().reads(1_u64))
137 .saturating_add(T::DbWeight::get().writes(2_u64))
138 }
139 /// Storage: `System::Account` (r:1 w:1)
140 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
141 fn finalize_signed_phase_reject_solution() -> Weight {
142 // Proof Size summary in bytes:
143 // Measured: `52`
144 // Estimated: `3593`
145 // Minimum execution time: 16_509_000 picoseconds.
146 Weight::from_parts(17_064_000, 3593)
147 .saturating_add(T::DbWeight::get().reads(1_u64))
148 .saturating_add(T::DbWeight::get().writes(1_u64))
149 }
150 /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:0 w:1)
151 /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
152 /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:0 w:1)
153 /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
154 /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:0 w:1)
155 /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
156 /// The range of component `v` is `[1000, 2000]`.
157 /// The range of component `t` is `[500, 1000]`.
158 fn create_snapshot_internal(v: u32, t: u32, ) -> Weight {
159 // Proof Size summary in bytes:
160 // Measured: `0`
161 // Estimated: `0`
162 // Minimum execution time: 502_941_000 picoseconds.
163 Weight::from_parts(3_670_497, 0)
164 // Standard Error: 2_331
165 .saturating_add(Weight::from_parts(417_190, 0).saturating_mul(v.into()))
166 // Standard Error: 4_660
167 .saturating_add(Weight::from_parts(123_320, 0).saturating_mul(t.into()))
168 .saturating_add(T::DbWeight::get().writes(3_u64))
169 }
170 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1)
171 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionIndices` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
172 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (r:1 w:1)
173 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
174 /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:1)
175 /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
176 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionsMap` (r:1 w:0)
177 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionsMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
178 /// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:1 w:1)
179 /// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
180 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:1)
181 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
182 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1)
183 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
184 /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:0 w:1)
185 /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
186 /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:0 w:1)
187 /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
188 /// The range of component `a` is `[500, 800]`.
189 /// The range of component `d` is `[200, 400]`.
190 fn elect_queued(a: u32, d: u32, ) -> Weight {
191 // Proof Size summary in bytes:
192 // Measured: `204 + a * (768 ±0) + d * (48 ±0)`
193 // Estimated: `3756 + a * (768 ±0) + d * (49 ±0)`
194 // Minimum execution time: 351_780_000 picoseconds.
195 Weight::from_parts(377_006_000, 3756)
196 // Standard Error: 8_676
197 .saturating_add(Weight::from_parts(497_086, 0).saturating_mul(a.into()))
198 .saturating_add(T::DbWeight::get().reads(7_u64))
199 .saturating_add(T::DbWeight::get().writes(8_u64))
200 .saturating_add(Weight::from_parts(0, 768).saturating_mul(a.into()))
201 .saturating_add(Weight::from_parts(0, 49).saturating_mul(d.into()))
202 }
203 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
204 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
205 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
206 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
207 /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:0)
208 /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
209 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1)
210 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionIndices` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
211 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (r:1 w:1)
212 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
213 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionsMap` (r:0 w:1)
214 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionsMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
215 fn submit() -> Weight {
216 // Proof Size summary in bytes:
217 // Measured: `683`
218 // Estimated: `2168`
219 // Minimum execution time: 40_602_000 picoseconds.
220 Weight::from_parts(41_937_000, 2168)
221 .saturating_add(T::DbWeight::get().reads(5_u64))
222 .saturating_add(T::DbWeight::get().writes(3_u64))
223 }
224 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
225 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
226 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
227 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
228 /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:1 w:0)
229 /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
230 /// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:1 w:1)
231 /// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
232 /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:0)
233 /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
234 /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:1 w:0)
235 /// Proof: `ElectionProviderMultiPhase::Snapshot` (`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 submit_unsigned(v: u32, t: u32, a: u32, _d: u32, ) -> Weight {
243 // Proof Size summary in bytes:
244 // Measured: `89 + t * (32 ±0) + v * (553 ±0)`
245 // Estimated: `1574 + t * (32 ±0) + v * (553 ±0)`
246 // Minimum execution time: 5_664_045_000 picoseconds.
247 Weight::from_parts(5_771_637_000, 1574)
248 // Standard Error: 18_838
249 .saturating_add(Weight::from_parts(202_471, 0).saturating_mul(v.into()))
250 // Standard Error: 55_824
251 .saturating_add(Weight::from_parts(4_436_597, 0).saturating_mul(a.into()))
252 .saturating_add(T::DbWeight::get().reads(7_u64))
253 .saturating_add(T::DbWeight::get().writes(1_u64))
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 /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:1 w:0)
258 /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
259 /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:1 w:0)
260 /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
261 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
262 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
263 /// Storage: `ElectionProviderMultiPhase::MinimumUntrustedScore` (r:1 w:0)
264 /// Proof: `ElectionProviderMultiPhase::MinimumUntrustedScore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
265 /// The range of component `v` is `[1000, 2000]`.
266 /// The range of component `t` is `[500, 1000]`.
267 /// The range of component `a` is `[500, 800]`.
268 /// The range of component `d` is `[200, 400]`.
269 fn feasibility_check(v: u32, t: u32, a: u32, _d: u32, ) -> Weight {
270 // Proof Size summary in bytes:
271 // Measured: `64 + t * (32 ±0) + v * (553 ±0)`
272 // Estimated: `1549 + t * (32 ±0) + v * (553 ±0)`
273 // Minimum execution time: 4_805_475_000 picoseconds.
274 Weight::from_parts(4_914_697_000, 1549)
275 // Standard Error: 18_827
276 .saturating_add(Weight::from_parts(384_743, 0).saturating_mul(v.into()))
277 // Standard Error: 55_792
278 .saturating_add(Weight::from_parts(2_733_267, 0).saturating_mul(a.into()))
279 .saturating_add(T::DbWeight::get().reads(4_u64))
280 .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into()))
281 .saturating_add(Weight::from_parts(0, 553).saturating_mul(v.into()))
282 }
283}
284
285// For backwards compatibility and tests.
286impl WeightInfo for () {
287 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
288 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
289 fn on_initialize_nothing() -> Weight {
290 // Proof Size summary in bytes:
291 // Measured: `0`
292 // Estimated: `1485`
293 // Minimum execution time: 1_355_000 picoseconds.
294 Weight::from_parts(1_403_000, 1485)
295 .saturating_add(RocksDbWeight::get().reads(1_u64))
296 }
297 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
298 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
299 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1)
300 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
301 fn on_initialize_open_signed() -> Weight {
302 // Proof Size summary in bytes:
303 // Measured: `0`
304 // Estimated: `1485`
305 // Minimum execution time: 5_350_000 picoseconds.
306 Weight::from_parts(5_507_000, 1485)
307 .saturating_add(RocksDbWeight::get().reads(2_u64))
308 .saturating_add(RocksDbWeight::get().writes(1_u64))
309 }
310 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
311 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
312 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1)
313 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
314 fn on_initialize_open_unsigned() -> Weight {
315 // Proof Size summary in bytes:
316 // Measured: `0`
317 // Estimated: `1485`
318 // Minimum execution time: 6_110_000 picoseconds.
319 Weight::from_parts(6_312_000, 1485)
320 .saturating_add(RocksDbWeight::get().reads(2_u64))
321 .saturating_add(RocksDbWeight::get().writes(1_u64))
322 }
323 /// Storage: `System::Account` (r:1 w:1)
324 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
325 /// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:0 w:1)
326 /// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
327 fn finalize_signed_phase_accept_solution() -> Weight {
328 // Proof Size summary in bytes:
329 // Measured: `52`
330 // Estimated: `3593`
331 // Minimum execution time: 24_085_000 picoseconds.
332 Weight::from_parts(24_495_000, 3593)
333 .saturating_add(RocksDbWeight::get().reads(1_u64))
334 .saturating_add(RocksDbWeight::get().writes(2_u64))
335 }
336 /// Storage: `System::Account` (r:1 w:1)
337 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
338 fn finalize_signed_phase_reject_solution() -> Weight {
339 // Proof Size summary in bytes:
340 // Measured: `52`
341 // Estimated: `3593`
342 // Minimum execution time: 16_509_000 picoseconds.
343 Weight::from_parts(17_064_000, 3593)
344 .saturating_add(RocksDbWeight::get().reads(1_u64))
345 .saturating_add(RocksDbWeight::get().writes(1_u64))
346 }
347 /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:0 w:1)
348 /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
349 /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:0 w:1)
350 /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
351 /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:0 w:1)
352 /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
353 /// The range of component `v` is `[1000, 2000]`.
354 /// The range of component `t` is `[500, 1000]`.
355 fn create_snapshot_internal(v: u32, t: u32, ) -> Weight {
356 // Proof Size summary in bytes:
357 // Measured: `0`
358 // Estimated: `0`
359 // Minimum execution time: 502_941_000 picoseconds.
360 Weight::from_parts(3_670_497, 0)
361 // Standard Error: 2_331
362 .saturating_add(Weight::from_parts(417_190, 0).saturating_mul(v.into()))
363 // Standard Error: 4_660
364 .saturating_add(Weight::from_parts(123_320, 0).saturating_mul(t.into()))
365 .saturating_add(RocksDbWeight::get().writes(3_u64))
366 }
367 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1)
368 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionIndices` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
369 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (r:1 w:1)
370 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
371 /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:1)
372 /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
373 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionsMap` (r:1 w:0)
374 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionsMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
375 /// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:1 w:1)
376 /// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
377 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:1)
378 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
379 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:1)
380 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
381 /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:0 w:1)
382 /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
383 /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:0 w:1)
384 /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
385 /// The range of component `a` is `[500, 800]`.
386 /// The range of component `d` is `[200, 400]`.
387 fn elect_queued(a: u32, d: u32, ) -> Weight {
388 // Proof Size summary in bytes:
389 // Measured: `204 + a * (768 ±0) + d * (48 ±0)`
390 // Estimated: `3756 + a * (768 ±0) + d * (49 ±0)`
391 // Minimum execution time: 351_780_000 picoseconds.
392 Weight::from_parts(377_006_000, 3756)
393 // Standard Error: 8_676
394 .saturating_add(Weight::from_parts(497_086, 0).saturating_mul(a.into()))
395 .saturating_add(RocksDbWeight::get().reads(7_u64))
396 .saturating_add(RocksDbWeight::get().writes(8_u64))
397 .saturating_add(Weight::from_parts(0, 768).saturating_mul(a.into()))
398 .saturating_add(Weight::from_parts(0, 49).saturating_mul(d.into()))
399 }
400 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
401 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
402 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
403 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
404 /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:0)
405 /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
406 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1)
407 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionIndices` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
408 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (r:1 w:1)
409 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionNextIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
410 /// Storage: `ElectionProviderMultiPhase::SignedSubmissionsMap` (r:0 w:1)
411 /// Proof: `ElectionProviderMultiPhase::SignedSubmissionsMap` (`max_values`: None, `max_size`: None, mode: `Measured`)
412 fn submit() -> Weight {
413 // Proof Size summary in bytes:
414 // Measured: `683`
415 // Estimated: `2168`
416 // Minimum execution time: 40_602_000 picoseconds.
417 Weight::from_parts(41_937_000, 2168)
418 .saturating_add(RocksDbWeight::get().reads(5_u64))
419 .saturating_add(RocksDbWeight::get().writes(3_u64))
420 }
421 /// Storage: `ElectionProviderMultiPhase::CurrentPhase` (r:1 w:0)
422 /// Proof: `ElectionProviderMultiPhase::CurrentPhase` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
423 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
424 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
425 /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:1 w:0)
426 /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
427 /// Storage: `ElectionProviderMultiPhase::QueuedSolution` (r:1 w:1)
428 /// Proof: `ElectionProviderMultiPhase::QueuedSolution` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
429 /// Storage: `ElectionProviderMultiPhase::SnapshotMetadata` (r:1 w:0)
430 /// Proof: `ElectionProviderMultiPhase::SnapshotMetadata` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
431 /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:1 w:0)
432 /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
433 /// Storage: `ElectionProviderMultiPhase::MinimumUntrustedScore` (r:1 w:0)
434 /// Proof: `ElectionProviderMultiPhase::MinimumUntrustedScore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
435 /// The range of component `v` is `[1000, 2000]`.
436 /// The range of component `t` is `[500, 1000]`.
437 /// The range of component `a` is `[500, 800]`.
438 /// The range of component `d` is `[200, 400]`.
439 fn submit_unsigned(v: u32, t: u32, a: u32, _d: u32, ) -> Weight {
440 // Proof Size summary in bytes:
441 // Measured: `89 + t * (32 ±0) + v * (553 ±0)`
442 // Estimated: `1574 + t * (32 ±0) + v * (553 ±0)`
443 // Minimum execution time: 5_664_045_000 picoseconds.
444 Weight::from_parts(5_771_637_000, 1574)
445 // Standard Error: 18_838
446 .saturating_add(Weight::from_parts(202_471, 0).saturating_mul(v.into()))
447 // Standard Error: 55_824
448 .saturating_add(Weight::from_parts(4_436_597, 0).saturating_mul(a.into()))
449 .saturating_add(RocksDbWeight::get().reads(7_u64))
450 .saturating_add(RocksDbWeight::get().writes(1_u64))
451 .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into()))
452 .saturating_add(Weight::from_parts(0, 553).saturating_mul(v.into()))
453 }
454 /// Storage: `ElectionProviderMultiPhase::DesiredTargets` (r:1 w:0)
455 /// Proof: `ElectionProviderMultiPhase::DesiredTargets` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
456 /// Storage: `ElectionProviderMultiPhase::Snapshot` (r:1 w:0)
457 /// Proof: `ElectionProviderMultiPhase::Snapshot` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
458 /// Storage: `ElectionProviderMultiPhase::Round` (r:1 w:0)
459 /// Proof: `ElectionProviderMultiPhase::Round` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
460 /// Storage: `ElectionProviderMultiPhase::MinimumUntrustedScore` (r:1 w:0)
461 /// Proof: `ElectionProviderMultiPhase::MinimumUntrustedScore` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
462 /// The range of component `v` is `[1000, 2000]`.
463 /// The range of component `t` is `[500, 1000]`.
464 /// The range of component `a` is `[500, 800]`.
465 /// The range of component `d` is `[200, 400]`.
466 fn feasibility_check(v: u32, t: u32, a: u32, _d: u32, ) -> Weight {
467 // Proof Size summary in bytes:
468 // Measured: `64 + t * (32 ±0) + v * (553 ±0)`
469 // Estimated: `1549 + t * (32 ±0) + v * (553 ±0)`
470 // Minimum execution time: 4_805_475_000 picoseconds.
471 Weight::from_parts(4_914_697_000, 1549)
472 // Standard Error: 18_827
473 .saturating_add(Weight::from_parts(384_743, 0).saturating_mul(v.into()))
474 // Standard Error: 55_792
475 .saturating_add(Weight::from_parts(2_733_267, 0).saturating_mul(a.into()))
476 .saturating_add(RocksDbWeight::get().reads(4_u64))
477 .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into()))
478 .saturating_add(Weight::from_parts(0, 553).saturating_mul(v.into()))
479 }
480}