Configurable voting-degree in council elections pallet (#13305)

* configurable council elections pallet

* configurable council elections pallet

* add warning

* reduce sizes

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

* fix stuff

* make assert

* fix docs

* fix docs again

* fix docs again

* Update frame/elections-phragmen/src/lib.rs

Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* Update frame/elections-phragmen/src/lib.rs

Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* Update frame/elections-phragmen/src/lib.rs

Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>

* fix docs

---------

Co-authored-by: command-bot <>
Co-authored-by: Gonçalo Pestana <g6pestana@gmail.com>
This commit is contained in:
Kian Paimani
2023-02-08 11:37:36 -03:00
committed by GitHub
parent 2f3f7d6b07
commit 928a12405b
5 changed files with 216 additions and 240 deletions
+133 -132
View File
@@ -18,25 +18,26 @@
//! Autogenerated weights for pallet_elections_phragmen
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-01-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-02-03, 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`
//! HOSTNAME: `runner-b3zmxxc-project-145-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// ./target/production/substrate
// target/production/substrate
// benchmark
// pallet
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_elections_phragmen
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --output=./frame/elections-phragmen/src/weights.rs
// --json-file=/builds/parity/mirrors/substrate/.git/.artifacts/bench.json
// --pallet=pallet_elections_phragmen
// --chain=dev
// --header=./HEADER-APACHE2
// --output=./frame/elections-phragmen/src/weights.rs
// --template=./.maintain/frame-weight-template.hbs
#![cfg_attr(rustfmt, rustfmt_skip)]
@@ -80,10 +81,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// 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()))
// Minimum execution time: 27_362 nanoseconds.
Weight::from_parts(28_497_963, 9726)
// Standard Error: 3_968
.saturating_add(Weight::from_ref_time(176_840).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()))
@@ -103,10 +104,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// 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()))
// Minimum execution time: 37_120 nanoseconds.
Weight::from_parts(38_455_302, 9598)
// Standard Error: 5_478
.saturating_add(Weight::from_ref_time(219_678).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()))
@@ -126,10 +127,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// 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()))
// Minimum execution time: 36_928 nanoseconds.
Weight::from_parts(38_334_669, 9726)
// Standard Error: 5_271
.saturating_add(Weight::from_ref_time(232_355).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()))
@@ -142,8 +143,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `989`
// Estimated: `7238`
// Minimum execution time: 31_469 nanoseconds.
Weight::from_parts(31_877_000, 7238)
// Minimum execution time: 34_338 nanoseconds.
Weight::from_parts(35_672_000, 7238)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
@@ -153,30 +154,30 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// 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]`.
/// The range of component `c` is `[1, 64]`.
fn submit_candidacy(c: u32, ) -> Weight {
// 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()))
// Measured: `1697 + c * (48 ±0)`
// Estimated: `6576 + c * (144 ±0)`
// Minimum execution time: 31_864 nanoseconds.
Weight::from_parts(33_490_161, 6576)
// Standard Error: 2_643
.saturating_add(Weight::from_ref_time(158_386).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)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// The range of component `c` is `[1, 1000]`.
/// The range of component `c` is `[1, 64]`.
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
// 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()))
// Measured: `349 + c * (48 ±0)`
// Estimated: `844 + c * (48 ±0)`
// Minimum execution time: 27_292 nanoseconds.
Weight::from_parts(28_364_955, 844)
// Standard Error: 1_335
.saturating_add(Weight::from_ref_time(78_086).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()))
@@ -195,8 +196,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `2027`
// Estimated: `12115`
// Minimum execution time: 39_124 nanoseconds.
Weight::from_parts(39_575_000, 12115)
// Minimum execution time: 45_975 nanoseconds.
Weight::from_parts(47_103_000, 12115)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
@@ -206,8 +207,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `975`
// Estimated: `1470`
// Minimum execution time: 25_377 nanoseconds.
Weight::from_parts(25_696_000, 1470)
// Minimum execution time: 29_243 nanoseconds.
Weight::from_parts(30_582_000, 1470)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
@@ -236,12 +237,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `2027`
// Estimated: `14718`
// Minimum execution time: 44_919 nanoseconds.
Weight::from_parts(45_548_000, 14718)
// Minimum execution time: 52_527 nanoseconds.
Weight::from_parts(53_538_000, 14718)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
/// Storage: Elections Voting (r:10001 w:10000)
/// Storage: Elections Voting (r:513 w:512)
/// 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)
@@ -249,24 +250,24 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// 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)
/// Storage: Balances Locks (r:512 w:512)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// Storage: System Account (r:10000 w:10000)
/// Storage: System Account (r:512 w:512)
/// 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]`.
/// The range of component `v` is `[256, 512]`.
/// The range of component `d` is `[0, 256]`.
fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight {
// 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()))
// Measured: `1115 + v * (875 ±0)`
// Estimated: `8448 + v * (12352 ±0)`
// Minimum execution time: 14_934_185 nanoseconds.
Weight::from_parts(15_014_057_000, 8448)
// Standard Error: 245_588
.saturating_add(Weight::from_ref_time(35_586_946).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()))
.saturating_add(Weight::from_proof_size(12352).saturating_mul(v.into()))
}
/// Storage: Elections Candidates (r:1 w:1)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
@@ -274,11 +275,11 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// 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)
/// Storage: Elections Voting (r:513 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)
/// Storage: System Account (r:44 w:44)
/// 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)
@@ -286,27 +287,27 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// 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]`.
/// The range of component `c` is `[1, 64]`.
/// The range of component `v` is `[1, 512]`.
/// The range of component `e` is `[512, 8192]`.
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
// 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))
// Measured: `0 + v * (638 ±0) + e * (28 ±0)`
// Estimated: `330033 + v * (5229 ±6) + e * (89 ±0) + c * (2135 ±7)`
// Minimum execution time: 1_273_671 nanoseconds.
Weight::from_parts(1_279_716_000, 330033)
// Standard Error: 543_277
.saturating_add(Weight::from_ref_time(20_613_753).saturating_mul(v.into()))
// Standard Error: 34_857
.saturating_add(Weight::from_ref_time(688_354).saturating_mul(e.into()))
.saturating_add(T::DbWeight::get().reads(21_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()))
.saturating_add(Weight::from_proof_size(5229).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(89).saturating_mul(e.into()))
.saturating_add(Weight::from_proof_size(2135).saturating_mul(c.into()))
}
}
@@ -327,10 +328,10 @@ impl WeightInfo for () {
// 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()))
// Minimum execution time: 27_362 nanoseconds.
Weight::from_parts(28_497_963, 9726)
// Standard Error: 3_968
.saturating_add(Weight::from_ref_time(176_840).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()))
@@ -350,10 +351,10 @@ impl WeightInfo for () {
// 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()))
// Minimum execution time: 37_120 nanoseconds.
Weight::from_parts(38_455_302, 9598)
// Standard Error: 5_478
.saturating_add(Weight::from_ref_time(219_678).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()))
@@ -373,10 +374,10 @@ impl WeightInfo for () {
// 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()))
// Minimum execution time: 36_928 nanoseconds.
Weight::from_parts(38_334_669, 9726)
// Standard Error: 5_271
.saturating_add(Weight::from_ref_time(232_355).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()))
@@ -389,8 +390,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `989`
// Estimated: `7238`
// Minimum execution time: 31_469 nanoseconds.
Weight::from_parts(31_877_000, 7238)
// Minimum execution time: 34_338 nanoseconds.
Weight::from_parts(35_672_000, 7238)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
@@ -400,30 +401,30 @@ impl WeightInfo for () {
/// 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]`.
/// The range of component `c` is `[1, 64]`.
fn submit_candidacy(c: u32, ) -> Weight {
// 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()))
// Measured: `1697 + c * (48 ±0)`
// Estimated: `6576 + c * (144 ±0)`
// Minimum execution time: 31_864 nanoseconds.
Weight::from_parts(33_490_161, 6576)
// Standard Error: 2_643
.saturating_add(Weight::from_ref_time(158_386).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)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
/// The range of component `c` is `[1, 1000]`.
/// The range of component `c` is `[1, 64]`.
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
// 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()))
// Measured: `349 + c * (48 ±0)`
// Estimated: `844 + c * (48 ±0)`
// Minimum execution time: 27_292 nanoseconds.
Weight::from_parts(28_364_955, 844)
// Standard Error: 1_335
.saturating_add(Weight::from_ref_time(78_086).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()))
@@ -442,8 +443,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `2027`
// Estimated: `12115`
// Minimum execution time: 39_124 nanoseconds.
Weight::from_parts(39_575_000, 12115)
// Minimum execution time: 45_975 nanoseconds.
Weight::from_parts(47_103_000, 12115)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
@@ -453,8 +454,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `975`
// Estimated: `1470`
// Minimum execution time: 25_377 nanoseconds.
Weight::from_parts(25_696_000, 1470)
// Minimum execution time: 29_243 nanoseconds.
Weight::from_parts(30_582_000, 1470)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
@@ -483,12 +484,12 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `2027`
// Estimated: `14718`
// Minimum execution time: 44_919 nanoseconds.
Weight::from_parts(45_548_000, 14718)
// Minimum execution time: 52_527 nanoseconds.
Weight::from_parts(53_538_000, 14718)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
/// Storage: Elections Voting (r:10001 w:10000)
/// Storage: Elections Voting (r:513 w:512)
/// 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)
@@ -496,24 +497,24 @@ impl WeightInfo for () {
/// 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)
/// Storage: Balances Locks (r:512 w:512)
/// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen)
/// Storage: System Account (r:10000 w:10000)
/// Storage: System Account (r:512 w:512)
/// 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]`.
/// The range of component `v` is `[256, 512]`.
/// The range of component `d` is `[0, 256]`.
fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight {
// 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()))
// Measured: `1115 + v * (875 ±0)`
// Estimated: `8448 + v * (12352 ±0)`
// Minimum execution time: 14_934_185 nanoseconds.
Weight::from_parts(15_014_057_000, 8448)
// Standard Error: 245_588
.saturating_add(Weight::from_ref_time(35_586_946).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()))
.saturating_add(Weight::from_proof_size(12352).saturating_mul(v.into()))
}
/// Storage: Elections Candidates (r:1 w:1)
/// Proof Skipped: Elections Candidates (max_values: Some(1), max_size: None, mode: Measured)
@@ -521,11 +522,11 @@ impl WeightInfo for () {
/// 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)
/// Storage: Elections Voting (r:513 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)
/// Storage: System Account (r:44 w:44)
/// 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)
@@ -533,26 +534,26 @@ impl WeightInfo for () {
/// 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]`.
/// The range of component `c` is `[1, 64]`.
/// The range of component `v` is `[1, 512]`.
/// The range of component `e` is `[512, 8192]`.
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
// 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))
// Measured: `0 + v * (638 ±0) + e * (28 ±0)`
// Estimated: `330033 + v * (5229 ±6) + e * (89 ±0) + c * (2135 ±7)`
// Minimum execution time: 1_273_671 nanoseconds.
Weight::from_parts(1_279_716_000, 330033)
// Standard Error: 543_277
.saturating_add(Weight::from_ref_time(20_613_753).saturating_mul(v.into()))
// Standard Error: 34_857
.saturating_add(Weight::from_ref_time(688_354).saturating_mul(e.into()))
.saturating_add(RocksDbWeight::get().reads(21_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()))
.saturating_add(Weight::from_proof_size(5229).saturating_mul(v.into()))
.saturating_add(Weight::from_proof_size(89).saturating_mul(e.into()))
.saturating_add(Weight::from_proof_size(2135).saturating_mul(c.into()))
}
}