Add Proof Size to Weight Output (#11637)

* initial impl

* add template test

* linear fit proof size

* always record proof when tracking storage

* calculate worst case pov

* remove duplicate worst case

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* more comment output

* add cli for worst case map size

* update name

* clap does not support underscores

* rename

* expose worst case map values

* improve some comments

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* update template

* cargo run --quiet --profile=production  --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_assets --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/assets/src/weights.rs --template=./.maintain/frame-weight-template.hbs

* fix fmt

* more fmt

* more fmt

* Dont panic when there is no proof

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix test features

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Whitelist :extrinsic_index

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use whitelist when recording proof

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add logs

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add PoV testing pallet

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Deploy PoV testing pallet

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Storage benches reside in the PoV pallet

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Linear regress PoV per component

Splits the PoV calculation into "measured" and "estimated".
The measured part is reported by the Proof recorder and linear
regressed over all components at once.
The estimated part is calculated as worst-case by using the max
PoV size per storage access and calculating one linear regress per
component. This gives each component a (possibly) independent PoV.
For now the measured size will always be lower than the PoV on
Polkadot since it is measured on an empty snapshot. The measured
part is therefor only used as diagnostic for debugging.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Put PoV into the weight templates

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* fmt

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Extra alanysis choise for PoV

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add+Fix tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Make benches faster

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Cleanup

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use same template comments

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* ".git/.scripts/bench-bot.sh" pallet dev pallet_balances

* ".git/.scripts/bench-bot.sh" pallet dev pallet_democracy

* Update referenda mock BlockWeights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Take measured value size into account

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* clippy

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* ".git/.scripts/bench-bot.sh" pallet dev pallet_scheduler

* WIP

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* proof_size: None

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* WIP

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* WIP

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* WIP

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* ugly, but works

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* WIP

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* WIP

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* WIP

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* wup

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* WIP

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* WIP

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* WIP

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* WIP

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add pov_mode attribute to the benchmarks! macro

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use pov_mode attribute in PoV benchmarking

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Scheduler, Whitelist: Add pov_mode attr

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update PoV weights

* Add CLI arg: default-pov-mode

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* fmt

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* fix

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Revert "Update PoV weights"

This reverts commit 2f3ac2387396470b118122a6ff8fa4ee12216f4b.

* Revert "WIP"

This reverts commit c34b538cd2bc45da4544e887180184e30957904a.

* Revert first approach

This reverts commit range 8ddaa2fffe5930f225a30bee314d0b7c94c344dd^..4c84f8748e5395852a9e0e25b0404953fee1a59e

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Clippy

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add extra benchmarks

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_alliance

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_whitelist

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_scheduler

* fmt

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Clippy

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Clippy 🤦

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add reference benchmarks

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix doc comments

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Undo logging

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add 'Ignored' pov_mode

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Allow multiple attributes per benchmark

Turns out that the current benchmarking syntax does not support
multiple attributes per bench 🤦. Changing it to support that
since otherwise the `pov_mode` would conflict with the others.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Validate pov_mode syntax

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Ignore PoV for all contract benchmarks

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Test

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* test

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Bump macro recursion limit

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* fmt

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update contract weights

They dont have a PoV component anymore.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* fix test ffs

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* pov_mode is unsupported in V2 syntax

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix pallet ui tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* update pallet ui

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix pallet ui tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update weights

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
Co-authored-by: Your Name <you@example.com>
This commit is contained in:
Shawn Tabrizi
2023-01-26 19:35:39 -03:00
committed by GitHub
parent 41f819eb48
commit 1b27ae9549
74 changed files with 18668 additions and 9111 deletions
+419 -230
View File
@@ -1,6 +1,6 @@
// This file is part of Substrate.
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
// Copyright (C) 2023 Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,7 +18,8 @@
//! Autogenerated weights for pallet_elections_phragmen
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-11-07, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-01-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bm2`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
@@ -64,306 +65,494 @@ pub trait WeightInfo {
/// Weights for pallet_elections_phragmen using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Storage: Elections Candidates (r:1 w:0)
// Storage: Elections Members (r:1 w:0)
// Storage: Elections RunnersUp (r:1 w:0)
// Storage: Elections Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// Storage: Elections Candidates (r:1 w:0)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Members (r:1 w:0)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:0)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Voting (r:1 w:1)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Balances Locks (r:1 w:1)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// The range of component `v` is `[1, 16]`.
fn vote_equal(v: u32, ) -> Weight {
// Minimum execution time: 38_496 nanoseconds.
Weight::from_ref_time(39_424_348 as u64)
// Standard Error: 3_547
.saturating_add(Weight::from_ref_time(119_971 as u64).saturating_mul(v as u64))
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Proof Size summary in bytes:
// Measured: `499 + v * (80 ±0)`
// Estimated: `9726 + v * (320 ±0)`
// Minimum execution time: 25_407 nanoseconds.
Weight::from_parts(26_035_742, 9726)
// Standard Error: 2_162
.saturating_add(Weight::from_ref_time(120_321).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(320).saturating_mul(v.into()))
}
// Storage: Elections Candidates (r:1 w:0)
// Storage: Elections Members (r:1 w:0)
// Storage: Elections RunnersUp (r:1 w:0)
// Storage: Elections Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// Storage: Elections Candidates (r:1 w:0)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Members (r:1 w:0)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:0)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Voting (r:1 w:1)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Balances Locks (r:1 w:1)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// The range of component `v` is `[2, 16]`.
fn vote_more(v: u32, ) -> Weight {
// Minimum execution time: 49_459 nanoseconds.
Weight::from_ref_time(50_225_486 as u64)
// Standard Error: 3_160
.saturating_add(Weight::from_ref_time(170_360 as u64).saturating_mul(v as u64))
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Proof Size summary in bytes:
// Measured: `467 + v * (80 ±0)`
// Estimated: `9598 + v * (320 ±0)`
// Minimum execution time: 34_477 nanoseconds.
Weight::from_parts(35_197_694, 9598)
// Standard Error: 2_089
.saturating_add(Weight::from_ref_time(116_792).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(320).saturating_mul(v.into()))
}
// Storage: Elections Candidates (r:1 w:0)
// Storage: Elections Members (r:1 w:0)
// Storage: Elections RunnersUp (r:1 w:0)
// Storage: Elections Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// Storage: Elections Candidates (r:1 w:0)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Members (r:1 w:0)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:0)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Voting (r:1 w:1)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Balances Locks (r:1 w:1)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// The range of component `v` is `[2, 16]`.
fn vote_less(v: u32, ) -> Weight {
// Minimum execution time: 48_712 nanoseconds.
Weight::from_ref_time(49_463_298 as u64)
// Standard Error: 2_678
.saturating_add(Weight::from_ref_time(231_771 as u64).saturating_mul(v as u64))
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Proof Size summary in bytes:
// Measured: `499 + v * (80 ±0)`
// Estimated: `9726 + v * (320 ±0)`
// Minimum execution time: 34_573 nanoseconds.
Weight::from_parts(35_254_508, 9726)
// Standard Error: 2_076
.saturating_add(Weight::from_ref_time(110_656).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(320).saturating_mul(v.into()))
}
// Storage: Elections Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// Storage: Elections Voting (r:1 w:1)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Balances Locks (r:1 w:1)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
fn remove_voter() -> Weight {
// Minimum execution time: 48_359 nanoseconds.
Weight::from_ref_time(48_767_000 as u64)
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
// Proof Size summary in bytes:
// Measured: `989`
// Estimated: `7238`
// Minimum execution time: 31_469 nanoseconds.
Weight::from_parts(31_877_000, 7238)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
// Storage: Elections Candidates (r:1 w:1)
// Storage: Elections Members (r:1 w:0)
// Storage: Elections RunnersUp (r:1 w:0)
/// Storage: Elections Candidates (r:1 w:1)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Members (r:1 w:0)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:0)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// The range of component `c` is `[1, 1000]`.
fn submit_candidacy(c: u32, ) -> Weight {
// Minimum execution time: 43_369 nanoseconds.
Weight::from_ref_time(49_587_113 as u64)
// Standard Error: 1_008
.saturating_add(Weight::from_ref_time(77_752 as u64).saturating_mul(c as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
// Proof Size summary in bytes:
// Measured: `1687 + c * (48 ±0)`
// Estimated: `6540 + c * (144 ±0)`
// Minimum execution time: 26_969 nanoseconds.
Weight::from_parts(28_584_266, 6540)
// Standard Error: 93
.saturating_add(Weight::from_ref_time(52_393).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(144).saturating_mul(c.into()))
}
// Storage: Elections Candidates (r:1 w:1)
/// Storage: Elections Candidates (r:1 w:1)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// The range of component `c` is `[1, 1000]`.
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
// Minimum execution time: 41_321 nanoseconds.
Weight::from_ref_time(50_803_289 as u64)
// Standard Error: 1_159
.saturating_add(Weight::from_ref_time(57_239 as u64).saturating_mul(c as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
// Proof Size summary in bytes:
// Measured: `348 + c * (48 ±0)`
// Estimated: `830 + c * (48 ±0)`
// Minimum execution time: 23_635 nanoseconds.
Weight::from_parts(23_482_193, 830)
// Standard Error: 103
.saturating_add(Weight::from_ref_time(33_759).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(48).saturating_mul(c.into()))
}
// Storage: Elections Members (r:1 w:1)
// Storage: Elections RunnersUp (r:1 w:1)
// Storage: Council Prime (r:1 w:1)
// Storage: Council Proposals (r:1 w:0)
// Storage: Council Members (r:0 w:1)
/// Storage: Elections Members (r:1 w:1)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:1)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Prime (r:1 w:1)
/// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Proposals (r:1 w:0)
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Members (r:0 w:1)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
fn renounce_candidacy_members() -> Weight {
// Minimum execution time: 53_542 nanoseconds.
Weight::from_ref_time(54_481_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
// Proof Size summary in bytes:
// Measured: `2027`
// Estimated: `12115`
// Minimum execution time: 39_124 nanoseconds.
Weight::from_parts(39_575_000, 12115)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
// Storage: Elections RunnersUp (r:1 w:1)
/// Storage: Elections RunnersUp (r:1 w:1)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
fn renounce_candidacy_runners_up() -> Weight {
// Minimum execution time: 41_825 nanoseconds.
Weight::from_ref_time(42_248_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
// Proof Size summary in bytes:
// Measured: `975`
// Estimated: `1470`
// Minimum execution time: 25_377 nanoseconds.
Weight::from_parts(25_696_000, 1470)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
// Storage: Benchmark Override (r:0 w:0)
/// Storage: Benchmark Override (r:0 w:0)
/// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured)
fn remove_member_without_replacement() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_000_000_000 nanoseconds.
Weight::from_ref_time(2_000_000_000_000 as u64)
Weight::from_ref_time(2_000_000_000_000)
}
// Storage: Elections Members (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Elections RunnersUp (r:1 w:1)
// Storage: Council Prime (r:1 w:1)
// Storage: Council Proposals (r:1 w:0)
// Storage: Council Members (r:0 w:1)
/// Storage: Elections Members (r:1 w:1)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: Elections RunnersUp (r:1 w:1)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Prime (r:1 w:1)
/// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Proposals (r:1 w:0)
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Members (r:0 w:1)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
fn remove_member_with_replacement() -> Weight {
// Minimum execution time: 62_600 nanoseconds.
Weight::from_ref_time(63_152_000 as u64)
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
// Proof Size summary in bytes:
// Measured: `2027`
// Estimated: `14718`
// Minimum execution time: 44_919 nanoseconds.
Weight::from_parts(45_548_000, 14718)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
// Storage: Elections Voting (r:5001 w:5000)
// Storage: Elections Members (r:1 w:0)
// Storage: Elections RunnersUp (r:1 w:0)
// Storage: Elections Candidates (r:1 w:0)
// Storage: Balances Locks (r:5000 w:5000)
// Storage: System Account (r:5000 w:5000)
/// Storage: Elections Voting (r:10001 w:10000)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Elections Members (r:1 w:0)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:0)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Candidates (r:1 w:0)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Balances Locks (r:10000 w:10000)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// Storage: System Account (r:10000 w:10000)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// The range of component `v` is `[5000, 10000]`.
/// The range of component `d` is `[0, 5000]`.
fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight {
// Minimum execution time: 297_149_264 nanoseconds.
Weight::from_ref_time(297_898_499_000 as u64)
// Standard Error: 263_819
.saturating_add(Weight::from_ref_time(37_914_985 as u64).saturating_mul(v as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(v as u64)))
.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(v as u64)))
// Proof Size summary in bytes:
// Measured: `36028 + v * (872 ±0)`
// Estimated: `149172 + v * (12340 ±0)`
// Minimum execution time: 297_544_939 nanoseconds.
Weight::from_parts(298_088_024_000, 149172)
// Standard Error: 264_599
.saturating_add(Weight::from_ref_time(38_142_857).saturating_mul(v.into()))
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_proof_size(12340).saturating_mul(v.into()))
}
// Storage: Elections Candidates (r:1 w:1)
// Storage: Elections Members (r:1 w:1)
// Storage: Elections RunnersUp (r:1 w:1)
// Storage: Elections Voting (r:10001 w:0)
// Storage: Council Proposals (r:1 w:0)
// Storage: Elections ElectionRounds (r:1 w:1)
// Storage: Council Members (r:0 w:1)
// Storage: Council Prime (r:0 w:1)
// Storage: System Account (r:1 w:1)
/// Storage: Elections Candidates (r:1 w:1)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Members (r:1 w:1)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:1)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Voting (r:10001 w:0)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Council Proposals (r:1 w:0)
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: System Account (r:980 w:980)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: Elections ElectionRounds (r:1 w:1)
/// Proof Skipped: Elections ElectionRounds (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Members (r:0 w:1)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Prime (r:0 w:1)
/// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured)
/// The range of component `c` is `[1, 1000]`.
/// The range of component `v` is `[1, 10000]`.
/// The range of component `e` is `[10000, 160000]`.
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
// Minimum execution time: 22_034_317 nanoseconds.
Weight::from_ref_time(22_110_020_000 as u64)
// Standard Error: 235_528
.saturating_add(Weight::from_ref_time(25_553_585 as u64).saturating_mul(v as u64))
// Standard Error: 15_114
.saturating_add(Weight::from_ref_time(1_032_330 as u64).saturating_mul(e as u64))
.saturating_add(T::DbWeight::get().reads(280 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64)))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64)))
.saturating_add(T::DbWeight::get().writes(6 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64)))
// Proof Size summary in bytes:
// Measured: `0 + v * (639 ±0) + e * (28 ±0)`
// Estimated: `5350105 + c * (2582 ±0) + v * (5721 ±6) + e * (123 ±0)`
// Minimum execution time: 21_844_965 nanoseconds.
Weight::from_parts(21_979_826_000, 5350105)
// Standard Error: 229_799
.saturating_add(Weight::from_ref_time(24_976_612).saturating_mul(v.into()))
// Standard Error: 14_747
.saturating_add(Weight::from_ref_time(1_025_848).saturating_mul(e.into()))
.saturating_add(T::DbWeight::get().reads(280_u64))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(T::DbWeight::get().writes(6_u64))
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_proof_size(2582).saturating_mul(c.into()))
.saturating_add(Weight::from_proof_size(5721).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(123).saturating_mul(e.into()))
}
}
// For backwards compatibility and tests
impl WeightInfo for () {
// Storage: Elections Candidates (r:1 w:0)
// Storage: Elections Members (r:1 w:0)
// Storage: Elections RunnersUp (r:1 w:0)
// Storage: Elections Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// Storage: Elections Candidates (r:1 w:0)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Members (r:1 w:0)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:0)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Voting (r:1 w:1)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Balances Locks (r:1 w:1)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// The range of component `v` is `[1, 16]`.
fn vote_equal(v: u32, ) -> Weight {
// Minimum execution time: 38_496 nanoseconds.
Weight::from_ref_time(39_424_348 as u64)
// Standard Error: 3_547
.saturating_add(Weight::from_ref_time(119_971 as u64).saturating_mul(v as u64))
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Proof Size summary in bytes:
// Measured: `499 + v * (80 ±0)`
// Estimated: `9726 + v * (320 ±0)`
// Minimum execution time: 25_407 nanoseconds.
Weight::from_parts(26_035_742, 9726)
// Standard Error: 2_162
.saturating_add(Weight::from_ref_time(120_321).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(320).saturating_mul(v.into()))
}
// Storage: Elections Candidates (r:1 w:0)
// Storage: Elections Members (r:1 w:0)
// Storage: Elections RunnersUp (r:1 w:0)
// Storage: Elections Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// Storage: Elections Candidates (r:1 w:0)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Members (r:1 w:0)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:0)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Voting (r:1 w:1)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Balances Locks (r:1 w:1)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// The range of component `v` is `[2, 16]`.
fn vote_more(v: u32, ) -> Weight {
// Minimum execution time: 49_459 nanoseconds.
Weight::from_ref_time(50_225_486 as u64)
// Standard Error: 3_160
.saturating_add(Weight::from_ref_time(170_360 as u64).saturating_mul(v as u64))
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Proof Size summary in bytes:
// Measured: `467 + v * (80 ±0)`
// Estimated: `9598 + v * (320 ±0)`
// Minimum execution time: 34_477 nanoseconds.
Weight::from_parts(35_197_694, 9598)
// Standard Error: 2_089
.saturating_add(Weight::from_ref_time(116_792).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(320).saturating_mul(v.into()))
}
// Storage: Elections Candidates (r:1 w:0)
// Storage: Elections Members (r:1 w:0)
// Storage: Elections RunnersUp (r:1 w:0)
// Storage: Elections Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// Storage: Elections Candidates (r:1 w:0)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Members (r:1 w:0)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:0)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Voting (r:1 w:1)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Balances Locks (r:1 w:1)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// The range of component `v` is `[2, 16]`.
fn vote_less(v: u32, ) -> Weight {
// Minimum execution time: 48_712 nanoseconds.
Weight::from_ref_time(49_463_298 as u64)
// Standard Error: 2_678
.saturating_add(Weight::from_ref_time(231_771 as u64).saturating_mul(v as u64))
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Proof Size summary in bytes:
// Measured: `499 + v * (80 ±0)`
// Estimated: `9726 + v * (320 ±0)`
// Minimum execution time: 34_573 nanoseconds.
Weight::from_parts(35_254_508, 9726)
// Standard Error: 2_076
.saturating_add(Weight::from_ref_time(110_656).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
.saturating_add(Weight::from_proof_size(320).saturating_mul(v.into()))
}
// Storage: Elections Voting (r:1 w:1)
// Storage: Balances Locks (r:1 w:1)
/// Storage: Elections Voting (r:1 w:1)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Balances Locks (r:1 w:1)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
fn remove_voter() -> Weight {
// Minimum execution time: 48_359 nanoseconds.
Weight::from_ref_time(48_767_000 as u64)
.saturating_add(RocksDbWeight::get().reads(2 as u64))
.saturating_add(RocksDbWeight::get().writes(2 as u64))
// Proof Size summary in bytes:
// Measured: `989`
// Estimated: `7238`
// Minimum execution time: 31_469 nanoseconds.
Weight::from_parts(31_877_000, 7238)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
// Storage: Elections Candidates (r:1 w:1)
// Storage: Elections Members (r:1 w:0)
// Storage: Elections RunnersUp (r:1 w:0)
/// Storage: Elections Candidates (r:1 w:1)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Members (r:1 w:0)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:0)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// The range of component `c` is `[1, 1000]`.
fn submit_candidacy(c: u32, ) -> Weight {
// Minimum execution time: 43_369 nanoseconds.
Weight::from_ref_time(49_587_113 as u64)
// Standard Error: 1_008
.saturating_add(Weight::from_ref_time(77_752 as u64).saturating_mul(c as u64))
.saturating_add(RocksDbWeight::get().reads(3 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
// Proof Size summary in bytes:
// Measured: `1687 + c * (48 ±0)`
// Estimated: `6540 + c * (144 ±0)`
// Minimum execution time: 26_969 nanoseconds.
Weight::from_parts(28_584_266, 6540)
// Standard Error: 93
.saturating_add(Weight::from_ref_time(52_393).saturating_mul(c.into()))
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(144).saturating_mul(c.into()))
}
// Storage: Elections Candidates (r:1 w:1)
/// Storage: Elections Candidates (r:1 w:1)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// The range of component `c` is `[1, 1000]`.
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
// Minimum execution time: 41_321 nanoseconds.
Weight::from_ref_time(50_803_289 as u64)
// Standard Error: 1_159
.saturating_add(Weight::from_ref_time(57_239 as u64).saturating_mul(c as u64))
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
// Proof Size summary in bytes:
// Measured: `348 + c * (48 ±0)`
// Estimated: `830 + c * (48 ±0)`
// Minimum execution time: 23_635 nanoseconds.
Weight::from_parts(23_482_193, 830)
// Standard Error: 103
.saturating_add(Weight::from_ref_time(33_759).saturating_mul(c.into()))
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
.saturating_add(Weight::from_proof_size(48).saturating_mul(c.into()))
}
// Storage: Elections Members (r:1 w:1)
// Storage: Elections RunnersUp (r:1 w:1)
// Storage: Council Prime (r:1 w:1)
// Storage: Council Proposals (r:1 w:0)
// Storage: Council Members (r:0 w:1)
/// Storage: Elections Members (r:1 w:1)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:1)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Prime (r:1 w:1)
/// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Proposals (r:1 w:0)
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Members (r:0 w:1)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
fn renounce_candidacy_members() -> Weight {
// Minimum execution time: 53_542 nanoseconds.
Weight::from_ref_time(54_481_000 as u64)
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().writes(4 as u64))
// Proof Size summary in bytes:
// Measured: `2027`
// Estimated: `12115`
// Minimum execution time: 39_124 nanoseconds.
Weight::from_parts(39_575_000, 12115)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
// Storage: Elections RunnersUp (r:1 w:1)
/// Storage: Elections RunnersUp (r:1 w:1)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
fn renounce_candidacy_runners_up() -> Weight {
// Minimum execution time: 41_825 nanoseconds.
Weight::from_ref_time(42_248_000 as u64)
.saturating_add(RocksDbWeight::get().reads(1 as u64))
.saturating_add(RocksDbWeight::get().writes(1 as u64))
// Proof Size summary in bytes:
// Measured: `975`
// Estimated: `1470`
// Minimum execution time: 25_377 nanoseconds.
Weight::from_parts(25_696_000, 1470)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
// Storage: Benchmark Override (r:0 w:0)
/// Storage: Benchmark Override (r:0 w:0)
/// Proof Skipped: Benchmark Override (max_values: None, max_size: None, mode: Measured)
fn remove_member_without_replacement() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 2_000_000_000 nanoseconds.
Weight::from_ref_time(2_000_000_000_000 as u64)
Weight::from_ref_time(2_000_000_000_000)
}
// Storage: Elections Members (r:1 w:1)
// Storage: System Account (r:1 w:1)
// Storage: Elections RunnersUp (r:1 w:1)
// Storage: Council Prime (r:1 w:1)
// Storage: Council Proposals (r:1 w:0)
// Storage: Council Members (r:0 w:1)
/// Storage: Elections Members (r:1 w:1)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: Elections RunnersUp (r:1 w:1)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Prime (r:1 w:1)
/// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Proposals (r:1 w:0)
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Members (r:0 w:1)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
fn remove_member_with_replacement() -> Weight {
// Minimum execution time: 62_600 nanoseconds.
Weight::from_ref_time(63_152_000 as u64)
.saturating_add(RocksDbWeight::get().reads(5 as u64))
.saturating_add(RocksDbWeight::get().writes(5 as u64))
// Proof Size summary in bytes:
// Measured: `2027`
// Estimated: `14718`
// Minimum execution time: 44_919 nanoseconds.
Weight::from_parts(45_548_000, 14718)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
// Storage: Elections Voting (r:5001 w:5000)
// Storage: Elections Members (r:1 w:0)
// Storage: Elections RunnersUp (r:1 w:0)
// Storage: Elections Candidates (r:1 w:0)
// Storage: Balances Locks (r:5000 w:5000)
// Storage: System Account (r:5000 w:5000)
/// Storage: Elections Voting (r:10001 w:10000)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Elections Members (r:1 w:0)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:0)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Candidates (r:1 w:0)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Balances Locks (r:10000 w:10000)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// Storage: System Account (r:10000 w:10000)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// The range of component `v` is `[5000, 10000]`.
/// The range of component `d` is `[0, 5000]`.
fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight {
// Minimum execution time: 297_149_264 nanoseconds.
Weight::from_ref_time(297_898_499_000 as u64)
// Standard Error: 263_819
.saturating_add(Weight::from_ref_time(37_914_985 as u64).saturating_mul(v as u64))
.saturating_add(RocksDbWeight::get().reads(4 as u64))
.saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(v as u64)))
.saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(v as u64)))
// Proof Size summary in bytes:
// Measured: `36028 + v * (872 ±0)`
// Estimated: `149172 + v * (12340 ±0)`
// Minimum execution time: 297_544_939 nanoseconds.
Weight::from_parts(298_088_024_000, 149172)
// Standard Error: 264_599
.saturating_add(Weight::from_ref_time(38_142_857).saturating_mul(v.into()))
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().reads((3_u64).saturating_mul(v.into())))
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(v.into())))
.saturating_add(Weight::from_proof_size(12340).saturating_mul(v.into()))
}
// Storage: Elections Candidates (r:1 w:1)
// Storage: Elections Members (r:1 w:1)
// Storage: Elections RunnersUp (r:1 w:1)
// Storage: Elections Voting (r:10001 w:0)
// Storage: Council Proposals (r:1 w:0)
// Storage: Elections ElectionRounds (r:1 w:1)
// Storage: Council Members (r:0 w:1)
// Storage: Council Prime (r:0 w:1)
// Storage: System Account (r:1 w:1)
/// Storage: Elections Candidates (r:1 w:1)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Members (r:1 w:1)
/// Proof Skipped: Elections Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections RunnersUp (r:1 w:1)
/// Proof Skipped: Elections RunnersUp (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Elections Voting (r:10001 w:0)
/// Proof Skipped: Elections Voting (max_values: None, max_size: None, mode: Measured)
/// Storage: Council Proposals (r:1 w:0)
/// Proof Skipped: Council Proposals (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: System Account (r:980 w:980)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: Elections ElectionRounds (r:1 w:1)
/// Proof Skipped: Elections ElectionRounds (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Members (r:0 w:1)
/// Proof Skipped: Council Members (max_values: Some(1), max_size: None, mode: Measured)
/// Storage: Council Prime (r:0 w:1)
/// Proof Skipped: Council Prime (max_values: Some(1), max_size: None, mode: Measured)
/// The range of component `c` is `[1, 1000]`.
/// The range of component `v` is `[1, 10000]`.
/// The range of component `e` is `[10000, 160000]`.
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
// Minimum execution time: 22_034_317 nanoseconds.
Weight::from_ref_time(22_110_020_000 as u64)
// Standard Error: 235_528
.saturating_add(Weight::from_ref_time(25_553_585 as u64).saturating_mul(v as u64))
// Standard Error: 15_114
.saturating_add(Weight::from_ref_time(1_032_330 as u64).saturating_mul(e as u64))
.saturating_add(RocksDbWeight::get().reads(280 as u64))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(c as u64)))
.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(v as u64)))
.saturating_add(RocksDbWeight::get().writes(6 as u64))
.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(c as u64)))
// Proof Size summary in bytes:
// Measured: `0 + v * (639 ±0) + e * (28 ±0)`
// Estimated: `5350105 + c * (2582 ±0) + v * (5721 ±6) + e * (123 ±0)`
// Minimum execution time: 21_844_965 nanoseconds.
Weight::from_parts(21_979_826_000, 5350105)
// Standard Error: 229_799
.saturating_add(Weight::from_ref_time(24_976_612).saturating_mul(v.into()))
// Standard Error: 14_747
.saturating_add(Weight::from_ref_time(1_025_848).saturating_mul(e.into()))
.saturating_add(RocksDbWeight::get().reads(280_u64))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(c.into())))
.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(v.into())))
.saturating_add(RocksDbWeight::get().writes(6_u64))
.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(c.into())))
.saturating_add(Weight::from_proof_size(2582).saturating_mul(c.into()))
.saturating_add(Weight::from_proof_size(5721).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(123).saturating_mul(e.into()))
}
}