// Copyright 2017-2022 Parity Technologies (UK) Ltd. // This file is part of Polkadot. // Polkadot is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // Polkadot is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . //! Autogenerated weights for `pallet_elections_phragmen` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2023-02-27, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `bm5`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 // Executed Command: // ./target/production/polkadot // benchmark // pallet // --chain=kusama-dev // --steps=50 // --repeat=20 // --pallet=pallet_elections_phragmen // --extrinsic=* // --execution=wasm // --wasm-execution=compiled // --header=./file_header.txt // --output=./runtime/kusama/src/weights/ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] use frame_support::{traits::Get, weights::Weight}; use sp_std::marker::PhantomData; /// Weight functions for `pallet_elections_phragmen`. pub struct WeightInfo(PhantomData); impl pallet_elections_phragmen::WeightInfo for WeightInfo { /// Storage: PhragmenElection Candidates (r:1 w:0) /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection Members (r:1 w:0) /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection RunnersUp (r:1 w:0) /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection Voting (r:1 w:1) /// Proof Skipped: PhragmenElection 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 { // Proof Size summary in bytes: // Measured: `499 + v * (80 ±0)` // Estimated: `9726 + v * (320 ±0)` // Minimum execution time: 26_970 nanoseconds. Weight::from_parts(27_998_740, 0) .saturating_add(Weight::from_parts(0, 9726)) // Standard Error: 5_062 .saturating_add(Weight::from_parts(138_034, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into())) } /// Storage: PhragmenElection Candidates (r:1 w:0) /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection Members (r:1 w:0) /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection RunnersUp (r:1 w:0) /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection Voting (r:1 w:1) /// Proof Skipped: PhragmenElection 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 { // Proof Size summary in bytes: // Measured: `467 + v * (80 ±0)` // Estimated: `9598 + v * (320 ±0)` // Minimum execution time: 37_220 nanoseconds. Weight::from_parts(37_898_566, 0) .saturating_add(Weight::from_parts(0, 9598)) // Standard Error: 6_174 .saturating_add(Weight::from_parts(130_031, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into())) } /// Storage: PhragmenElection Candidates (r:1 w:0) /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection Members (r:1 w:0) /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection RunnersUp (r:1 w:0) /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection Voting (r:1 w:1) /// Proof Skipped: PhragmenElection 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 { // Proof Size summary in bytes: // Measured: `499 + v * (80 ±0)` // Estimated: `9726 + v * (320 ±0)` // Minimum execution time: 36_984 nanoseconds. Weight::from_parts(37_727_688, 0) .saturating_add(Weight::from_parts(0, 9726)) // Standard Error: 5_281 .saturating_add(Weight::from_parts(155_470, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 320).saturating_mul(v.into())) } /// Storage: PhragmenElection Voting (r:1 w:1) /// Proof Skipped: PhragmenElection 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 { // Proof Size summary in bytes: // Measured: `989` // Estimated: `7238` // Minimum execution time: 33_417 nanoseconds. Weight::from_parts(33_890_000, 0) .saturating_add(Weight::from_parts(0, 7238)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: PhragmenElection Candidates (r:1 w:1) /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection Members (r:1 w:0) /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection RunnersUp (r:1 w:0) /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `c` is `[1, 1000]`. fn submit_candidacy(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `2839 + c * (48 ±0)` // Estimated: `9996 + c * (144 ±0)` // Minimum execution time: 31_809 nanoseconds. Weight::from_parts(24_804_007, 0) .saturating_add(Weight::from_parts(0, 9996)) // Standard Error: 896 .saturating_add(Weight::from_parts(80_259, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 144).saturating_mul(c.into())) } /// Storage: PhragmenElection Candidates (r:1 w:1) /// Proof Skipped: PhragmenElection 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 { // Proof Size summary in bytes: // Measured: `348 + c * (48 ±0)` // Estimated: `830 + c * (48 ±0)` // Minimum execution time: 24_845 nanoseconds. Weight::from_parts(17_884_636, 0) .saturating_add(Weight::from_parts(0, 830)) // Standard Error: 887 .saturating_add(Weight::from_parts(58_586, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) } /// Storage: PhragmenElection Members (r:1 w:1) /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection RunnersUp (r:1 w:1) /// Proof Skipped: PhragmenElection 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 { // Proof Size summary in bytes: // Measured: `3113` // Estimated: `17545` // Minimum execution time: 43_134 nanoseconds. Weight::from_parts(44_525_000, 0) .saturating_add(Weight::from_parts(0, 17545)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: PhragmenElection RunnersUp (r:1 w:1) /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) fn renounce_candidacy_runners_up() -> Weight { // Proof Size summary in bytes: // Measured: `1776` // Estimated: `2271` // Minimum execution time: 27_323 nanoseconds. Weight::from_parts(27_861_000, 0) .saturating_add(Weight::from_parts(0, 2271)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// 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_parts(2_000_000_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: PhragmenElection Members (r:1 w:1) /// Proof Skipped: PhragmenElection 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: PhragmenElection RunnersUp (r:1 w:1) /// Proof Skipped: PhragmenElection 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 { // Proof Size summary in bytes: // Measured: `3113` // Estimated: `20148` // Minimum execution time: 58_918 nanoseconds. Weight::from_parts(59_322_000, 0) .saturating_add(Weight::from_parts(0, 20148)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: PhragmenElection Voting (r:10001 w:10000) /// Proof Skipped: PhragmenElection Voting (max_values: None, max_size: None, mode: Measured) /// Storage: PhragmenElection Members (r:1 w:0) /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection RunnersUp (r:1 w:0) /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection Candidates (r:1 w:0) /// Proof Skipped: PhragmenElection 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 { // Proof Size summary in bytes: // Measured: `35989 + v * (872 ±0)` // Estimated: `149016 + v * (12340 ±0)` // Minimum execution time: 338_562_744 nanoseconds. Weight::from_parts(339_541_438_000, 0) .saturating_add(Weight::from_parts(0, 149016)) // Standard Error: 289_739 .saturating_add(Weight::from_parts(41_932_708, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(4)) .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_parts(0, 12340).saturating_mul(v.into())) } /// Storage: PhragmenElection Candidates (r:1 w:1) /// Proof Skipped: PhragmenElection Candidates (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection Members (r:1 w:1) /// Proof Skipped: PhragmenElection Members (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection RunnersUp (r:1 w:1) /// Proof Skipped: PhragmenElection RunnersUp (max_values: Some(1), max_size: None, mode: Measured) /// Storage: PhragmenElection Voting (r:10001 w:0) /// Proof Skipped: PhragmenElection 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:962 w:962) /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// Storage: PhragmenElection ElectionRounds (r:1 w:1) /// Proof Skipped: PhragmenElection 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 { // Proof Size summary in bytes: // Measured: `0 + v * (639 ±0) + e * (28 ±0)` // Estimated: `5334911 + v * (5714 ±4) + e * (123 ±0) + c * (2560 ±0)` // Minimum execution time: 34_066_705 nanoseconds. Weight::from_parts(34_200_781_000, 0) .saturating_add(Weight::from_parts(0, 5334911)) // Standard Error: 509_361 .saturating_add(Weight::from_parts(43_123_929, 0).saturating_mul(v.into())) // Standard Error: 32_687 .saturating_add(Weight::from_parts(2_179_162, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(265)) .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)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) .saturating_add(Weight::from_parts(0, 5714).saturating_mul(v.into())) .saturating_add(Weight::from_parts(0, 123).saturating_mul(e.into())) .saturating_add(Weight::from_parts(0, 2560).saturating_mul(c.into())) } }