609 lines
32 KiB
Rust
609 lines
32 KiB
Rust
// This file is part of Bizinikiwi.
|
|
|
|
// Copyright (C) Parity Technologies (UK) Ltd.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
// This file is part of Bizinikiwi.
|
|
|
|
// Copyright (C) Parity Technologies (UK) Ltd.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
//! Autogenerated weights for `pezpallet_elections_phragmen`
|
|
//!
|
|
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 32.0.0
|
|
//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
|
//! WORST CASE MAP SIZE: `1000000`
|
|
//! HOSTNAME: `4563561839a5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
|
|
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
|
|
|
|
// Executed Command:
|
|
// frame-omni-bencher
|
|
// v1
|
|
// benchmark
|
|
// pallet
|
|
// --extrinsic=*
|
|
// --runtime=target/production/wbuild/pez-kitchensink-runtime/pez_kitchensink_runtime.wasm
|
|
// --pallet=pezpallet_elections_phragmen
|
|
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/bizinikiwi/HEADER-APACHE2
|
|
// --output=/__w/pezkuwi-sdk/pezkuwi-sdk/bizinikiwi/pezframe/elections-phragmen/src/weights.rs
|
|
// --wasm-execution=compiled
|
|
// --steps=50
|
|
// --repeat=20
|
|
// --heap-pages=4096
|
|
// --template=bizinikiwi/.maintain/frame-weight-template.hbs
|
|
// --no-storage-info
|
|
// --no-min-squares
|
|
// --no-median-slopes
|
|
// --genesis-builder-policy=none
|
|
// --exclude-pallets=pezpallet_xcm,pezpallet_xcm_benchmarks::fungible,pezpallet_xcm_benchmarks::generic,pezpallet_nomination_pools,pezpallet_remark,pezpallet_transaction_storage,pezpallet_election_provider_multi_block,pezpallet_election_provider_multi_block::signed,pezpallet_election_provider_multi_block::unsigned,pezpallet_election_provider_multi_block::verifier
|
|
|
|
#![cfg_attr(rustfmt, rustfmt_skip)]
|
|
#![allow(unused_parens)]
|
|
#![allow(unused_imports)]
|
|
#![allow(missing_docs)]
|
|
#![allow(dead_code)]
|
|
|
|
use pezframe_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
|
|
use core::marker::PhantomData;
|
|
|
|
/// Weight functions needed for `pezpallet_elections_phragmen`.
|
|
pub trait WeightInfo {
|
|
fn vote_equal(v: u32, ) -> Weight;
|
|
fn vote_more(v: u32, ) -> Weight;
|
|
fn vote_less(v: u32, ) -> Weight;
|
|
fn remove_voter() -> Weight;
|
|
fn submit_candidacy(c: u32, ) -> Weight;
|
|
fn renounce_candidacy_candidate(c: u32, ) -> Weight;
|
|
fn renounce_candidacy_members() -> Weight;
|
|
fn renounce_candidacy_runners_up() -> Weight;
|
|
fn remove_member_without_replacement() -> Weight;
|
|
fn remove_member_with_replacement() -> Weight;
|
|
fn clean_defunct_voters(v: u32, d: u32, ) -> Weight;
|
|
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight;
|
|
}
|
|
|
|
/// Weights for `pezpallet_elections_phragmen` using the Bizinikiwi node and recommended hardware.
|
|
pub struct BizinikiwiWeight<T>(PhantomData<T>);
|
|
impl<T: pezframe_system::Config> WeightInfo for BizinikiwiWeight<T> {
|
|
/// Storage: `Elections::Candidates` (r:1 w:0)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Members` (r:1 w:0)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:0)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Voting` (r:1 w:1)
|
|
/// Proof: `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`)
|
|
/// Storage: `Balances::Freezes` (r:1 w:0)
|
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
|
|
/// The range of component `v` is `[1, 16]`.
|
|
fn vote_equal(v: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `273 + v * (80 ±0)`
|
|
// Estimated: `4764 + v * (83 ±0)`
|
|
// Minimum execution time: 30_859_000 picoseconds.
|
|
Weight::from_parts(31_688_053, 4764)
|
|
// Standard Error: 4_354
|
|
.saturating_add(Weight::from_parts(239_976, 0).saturating_mul(v.into()))
|
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
|
.saturating_add(T::DbWeight::get().writes(2_u64))
|
|
.saturating_add(Weight::from_parts(0, 83).saturating_mul(v.into()))
|
|
}
|
|
/// Storage: `Elections::Candidates` (r:1 w:0)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Members` (r:1 w:0)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:0)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Voting` (r:1 w:1)
|
|
/// Proof: `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`)
|
|
/// Storage: `Balances::Freezes` (r:1 w:0)
|
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
|
|
/// The range of component `v` is `[2, 16]`.
|
|
fn vote_more(v: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `241 + v * (80 ±0)`
|
|
// Estimated: `4764 + v * (83 ±0)`
|
|
// Minimum execution time: 42_425_000 picoseconds.
|
|
Weight::from_parts(43_125_592, 4764)
|
|
// Standard Error: 4_549
|
|
.saturating_add(Weight::from_parts(244_542, 0).saturating_mul(v.into()))
|
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
|
.saturating_add(T::DbWeight::get().writes(2_u64))
|
|
.saturating_add(Weight::from_parts(0, 83).saturating_mul(v.into()))
|
|
}
|
|
/// Storage: `Elections::Candidates` (r:1 w:0)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Members` (r:1 w:0)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:0)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Voting` (r:1 w:1)
|
|
/// Proof: `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`)
|
|
/// Storage: `Balances::Freezes` (r:1 w:0)
|
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
|
|
/// The range of component `v` is `[2, 16]`.
|
|
fn vote_less(v: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `273 + v * (80 ±0)`
|
|
// Estimated: `4764 + v * (83 ±0)`
|
|
// Minimum execution time: 42_205_000 picoseconds.
|
|
Weight::from_parts(43_351_255, 4764)
|
|
// Standard Error: 4_319
|
|
.saturating_add(Weight::from_parts(242_837, 0).saturating_mul(v.into()))
|
|
.saturating_add(T::DbWeight::get().reads(6_u64))
|
|
.saturating_add(T::DbWeight::get().writes(2_u64))
|
|
.saturating_add(Weight::from_parts(0, 83).saturating_mul(v.into()))
|
|
}
|
|
/// Storage: `Elections::Voting` (r:1 w:1)
|
|
/// Proof: `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`)
|
|
/// Storage: `Balances::Freezes` (r:1 w:0)
|
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
|
|
fn remove_voter() -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `794`
|
|
// Estimated: `4764`
|
|
// Minimum execution time: 42_574_000 picoseconds.
|
|
Weight::from_parts(43_828_000, 4764)
|
|
.saturating_add(T::DbWeight::get().reads(3_u64))
|
|
.saturating_add(T::DbWeight::get().writes(2_u64))
|
|
}
|
|
/// Storage: `Elections::Candidates` (r:1 w:1)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Members` (r:1 w:0)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:0)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// The range of component `c` is `[1, 128]`.
|
|
fn submit_candidacy(c: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `1473 + c * (48 ±0)`
|
|
// Estimated: `2959 + c * (48 ±0)`
|
|
// Minimum execution time: 35_171_000 picoseconds.
|
|
Weight::from_parts(36_158_550, 2959)
|
|
// Standard Error: 1_017
|
|
.saturating_add(Weight::from_parts(80_161, 0).saturating_mul(c.into()))
|
|
.saturating_add(T::DbWeight::get().reads(3_u64))
|
|
.saturating_add(T::DbWeight::get().writes(1_u64))
|
|
.saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into()))
|
|
}
|
|
/// Storage: `Elections::Candidates` (r:1 w:1)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// The range of component `c` is `[1, 128]`.
|
|
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `214 + c * (48 ±0)`
|
|
// Estimated: `1750 + c * (48 ±0)`
|
|
// Minimum execution time: 27_427_000 picoseconds.
|
|
Weight::from_parts(28_254_151, 1750)
|
|
// Standard Error: 658
|
|
.saturating_add(Weight::from_parts(68_988, 0).saturating_mul(c.into()))
|
|
.saturating_add(T::DbWeight::get().reads(1_u64))
|
|
.saturating_add(T::DbWeight::get().writes(1_u64))
|
|
.saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into()))
|
|
}
|
|
/// Storage: `Elections::Members` (r:1 w:1)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:1)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Prime` (r:1 w:1)
|
|
/// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Proposals` (r:1 w:0)
|
|
/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Members` (r:0 w:1)
|
|
/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
fn renounce_candidacy_members() -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `1575`
|
|
// Estimated: `3060`
|
|
// Minimum execution time: 40_828_000 picoseconds.
|
|
Weight::from_parts(42_179_000, 3060)
|
|
.saturating_add(T::DbWeight::get().reads(4_u64))
|
|
.saturating_add(T::DbWeight::get().writes(4_u64))
|
|
}
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:1)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
fn renounce_candidacy_runners_up() -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `751`
|
|
// Estimated: `2236`
|
|
// Minimum execution time: 29_536_000 picoseconds.
|
|
Weight::from_parts(30_472_000, 2236)
|
|
.saturating_add(T::DbWeight::get().reads(1_u64))
|
|
.saturating_add(T::DbWeight::get().writes(1_u64))
|
|
}
|
|
/// Storage: `Benchmark::Override` (r:0 w:0)
|
|
/// Proof: `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_000 picoseconds.
|
|
Weight::from_parts(2_000_000_000_000, 0)
|
|
}
|
|
/// Storage: `Elections::Members` (r:1 w:1)
|
|
/// Proof: `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: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Prime` (r:1 w:1)
|
|
/// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Proposals` (r:1 w:0)
|
|
/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Members` (r:0 w:1)
|
|
/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
fn remove_member_with_replacement() -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `1575`
|
|
// Estimated: `3593`
|
|
// Minimum execution time: 45_629_000 picoseconds.
|
|
Weight::from_parts(47_206_000, 3593)
|
|
.saturating_add(T::DbWeight::get().reads(5_u64))
|
|
.saturating_add(T::DbWeight::get().writes(5_u64))
|
|
}
|
|
/// Storage: `Elections::Voting` (r:129 w:128)
|
|
/// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Members` (r:1 w:0)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:0)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Candidates` (r:1 w:0)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Balances::Locks` (r:128 w:128)
|
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
|
/// Storage: `Balances::Freezes` (r:128 w:0)
|
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
|
|
/// Storage: `System::Account` (r:128 w:128)
|
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
|
/// The range of component `v` is `[128, 256]`.
|
|
/// The range of component `d` is `[0, 128]`.
|
|
fn clean_defunct_voters(v: u32, d: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `0 + d * (810 ±0) + v * (56 ±0)`
|
|
// Estimated: `12490 + d * (3774 ±0) + v * (28 ±0)`
|
|
// Minimum execution time: 5_075_000 picoseconds.
|
|
Weight::from_parts(5_442_000, 12490)
|
|
// Standard Error: 10_524
|
|
.saturating_add(Weight::from_parts(356_284, 0).saturating_mul(v.into()))
|
|
// Standard Error: 22_925
|
|
.saturating_add(Weight::from_parts(59_936_319, 0).saturating_mul(d.into()))
|
|
.saturating_add(T::DbWeight::get().reads(4_u64))
|
|
.saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(d.into())))
|
|
.saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(d.into())))
|
|
.saturating_add(Weight::from_parts(0, 3774).saturating_mul(d.into()))
|
|
.saturating_add(Weight::from_parts(0, 28).saturating_mul(v.into()))
|
|
}
|
|
/// Storage: `Elections::Candidates` (r:1 w:1)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Members` (r:1 w:1)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:1)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Voting` (r:257 w:0)
|
|
/// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Proposals` (r:1 w:0)
|
|
/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `System::Account` (r:108 w:108)
|
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
|
/// Storage: `Elections::ElectionRounds` (r:1 w:1)
|
|
/// Proof: `Elections::ElectionRounds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Members` (r:0 w:1)
|
|
/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Prime` (r:0 w:1)
|
|
/// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// The range of component `c` is `[1, 128]`.
|
|
/// The range of component `v` is `[1, 256]`.
|
|
/// The range of component `e` is `[256, 4096]`.
|
|
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `0 + e * (16 ±0) + v * (331 ±0)`
|
|
// Estimated: `253201 + c * (2409 ±3) + e * (9 ±0) + v * (1952 ±4)`
|
|
// Minimum execution time: 1_442_707_000 picoseconds.
|
|
Weight::from_parts(1_453_511_000, 253201)
|
|
// Standard Error: 339_169
|
|
.saturating_add(Weight::from_parts(17_830_182, 0).saturating_mul(v.into()))
|
|
// Standard Error: 21_751
|
|
.saturating_add(Weight::from_parts(521_821, 0).saturating_mul(e.into()))
|
|
.saturating_add(T::DbWeight::get().reads(112_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_parts(0, 2409).saturating_mul(c.into()))
|
|
.saturating_add(Weight::from_parts(0, 9).saturating_mul(e.into()))
|
|
.saturating_add(Weight::from_parts(0, 1952).saturating_mul(v.into()))
|
|
}
|
|
}
|
|
|
|
// For backwards compatibility and tests.
|
|
impl WeightInfo for () {
|
|
/// Storage: `Elections::Candidates` (r:1 w:0)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Members` (r:1 w:0)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:0)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Voting` (r:1 w:1)
|
|
/// Proof: `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`)
|
|
/// Storage: `Balances::Freezes` (r:1 w:0)
|
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
|
|
/// The range of component `v` is `[1, 16]`.
|
|
fn vote_equal(v: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `273 + v * (80 ±0)`
|
|
// Estimated: `4764 + v * (83 ±0)`
|
|
// Minimum execution time: 30_859_000 picoseconds.
|
|
Weight::from_parts(31_688_053, 4764)
|
|
// Standard Error: 4_354
|
|
.saturating_add(Weight::from_parts(239_976, 0).saturating_mul(v.into()))
|
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
|
.saturating_add(RocksDbWeight::get().writes(2_u64))
|
|
.saturating_add(Weight::from_parts(0, 83).saturating_mul(v.into()))
|
|
}
|
|
/// Storage: `Elections::Candidates` (r:1 w:0)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Members` (r:1 w:0)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:0)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Voting` (r:1 w:1)
|
|
/// Proof: `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`)
|
|
/// Storage: `Balances::Freezes` (r:1 w:0)
|
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
|
|
/// The range of component `v` is `[2, 16]`.
|
|
fn vote_more(v: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `241 + v * (80 ±0)`
|
|
// Estimated: `4764 + v * (83 ±0)`
|
|
// Minimum execution time: 42_425_000 picoseconds.
|
|
Weight::from_parts(43_125_592, 4764)
|
|
// Standard Error: 4_549
|
|
.saturating_add(Weight::from_parts(244_542, 0).saturating_mul(v.into()))
|
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
|
.saturating_add(RocksDbWeight::get().writes(2_u64))
|
|
.saturating_add(Weight::from_parts(0, 83).saturating_mul(v.into()))
|
|
}
|
|
/// Storage: `Elections::Candidates` (r:1 w:0)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Members` (r:1 w:0)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:0)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Voting` (r:1 w:1)
|
|
/// Proof: `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`)
|
|
/// Storage: `Balances::Freezes` (r:1 w:0)
|
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
|
|
/// The range of component `v` is `[2, 16]`.
|
|
fn vote_less(v: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `273 + v * (80 ±0)`
|
|
// Estimated: `4764 + v * (83 ±0)`
|
|
// Minimum execution time: 42_205_000 picoseconds.
|
|
Weight::from_parts(43_351_255, 4764)
|
|
// Standard Error: 4_319
|
|
.saturating_add(Weight::from_parts(242_837, 0).saturating_mul(v.into()))
|
|
.saturating_add(RocksDbWeight::get().reads(6_u64))
|
|
.saturating_add(RocksDbWeight::get().writes(2_u64))
|
|
.saturating_add(Weight::from_parts(0, 83).saturating_mul(v.into()))
|
|
}
|
|
/// Storage: `Elections::Voting` (r:1 w:1)
|
|
/// Proof: `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`)
|
|
/// Storage: `Balances::Freezes` (r:1 w:0)
|
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
|
|
fn remove_voter() -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `794`
|
|
// Estimated: `4764`
|
|
// Minimum execution time: 42_574_000 picoseconds.
|
|
Weight::from_parts(43_828_000, 4764)
|
|
.saturating_add(RocksDbWeight::get().reads(3_u64))
|
|
.saturating_add(RocksDbWeight::get().writes(2_u64))
|
|
}
|
|
/// Storage: `Elections::Candidates` (r:1 w:1)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Members` (r:1 w:0)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:0)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// The range of component `c` is `[1, 128]`.
|
|
fn submit_candidacy(c: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `1473 + c * (48 ±0)`
|
|
// Estimated: `2959 + c * (48 ±0)`
|
|
// Minimum execution time: 35_171_000 picoseconds.
|
|
Weight::from_parts(36_158_550, 2959)
|
|
// Standard Error: 1_017
|
|
.saturating_add(Weight::from_parts(80_161, 0).saturating_mul(c.into()))
|
|
.saturating_add(RocksDbWeight::get().reads(3_u64))
|
|
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
|
.saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into()))
|
|
}
|
|
/// Storage: `Elections::Candidates` (r:1 w:1)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// The range of component `c` is `[1, 128]`.
|
|
fn renounce_candidacy_candidate(c: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `214 + c * (48 ±0)`
|
|
// Estimated: `1750 + c * (48 ±0)`
|
|
// Minimum execution time: 27_427_000 picoseconds.
|
|
Weight::from_parts(28_254_151, 1750)
|
|
// Standard Error: 658
|
|
.saturating_add(Weight::from_parts(68_988, 0).saturating_mul(c.into()))
|
|
.saturating_add(RocksDbWeight::get().reads(1_u64))
|
|
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
|
.saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into()))
|
|
}
|
|
/// Storage: `Elections::Members` (r:1 w:1)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:1)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Prime` (r:1 w:1)
|
|
/// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Proposals` (r:1 w:0)
|
|
/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Members` (r:0 w:1)
|
|
/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
fn renounce_candidacy_members() -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `1575`
|
|
// Estimated: `3060`
|
|
// Minimum execution time: 40_828_000 picoseconds.
|
|
Weight::from_parts(42_179_000, 3060)
|
|
.saturating_add(RocksDbWeight::get().reads(4_u64))
|
|
.saturating_add(RocksDbWeight::get().writes(4_u64))
|
|
}
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:1)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
fn renounce_candidacy_runners_up() -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `751`
|
|
// Estimated: `2236`
|
|
// Minimum execution time: 29_536_000 picoseconds.
|
|
Weight::from_parts(30_472_000, 2236)
|
|
.saturating_add(RocksDbWeight::get().reads(1_u64))
|
|
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
|
}
|
|
/// Storage: `Benchmark::Override` (r:0 w:0)
|
|
/// Proof: `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_000 picoseconds.
|
|
Weight::from_parts(2_000_000_000_000, 0)
|
|
}
|
|
/// Storage: `Elections::Members` (r:1 w:1)
|
|
/// Proof: `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: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Prime` (r:1 w:1)
|
|
/// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Proposals` (r:1 w:0)
|
|
/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Members` (r:0 w:1)
|
|
/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
fn remove_member_with_replacement() -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `1575`
|
|
// Estimated: `3593`
|
|
// Minimum execution time: 45_629_000 picoseconds.
|
|
Weight::from_parts(47_206_000, 3593)
|
|
.saturating_add(RocksDbWeight::get().reads(5_u64))
|
|
.saturating_add(RocksDbWeight::get().writes(5_u64))
|
|
}
|
|
/// Storage: `Elections::Voting` (r:129 w:128)
|
|
/// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Members` (r:1 w:0)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:0)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Candidates` (r:1 w:0)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Balances::Locks` (r:128 w:128)
|
|
/// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`)
|
|
/// Storage: `Balances::Freezes` (r:128 w:0)
|
|
/// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `MaxEncodedLen`)
|
|
/// Storage: `System::Account` (r:128 w:128)
|
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
|
/// The range of component `v` is `[128, 256]`.
|
|
/// The range of component `d` is `[0, 128]`.
|
|
fn clean_defunct_voters(v: u32, d: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `0 + d * (810 ±0) + v * (56 ±0)`
|
|
// Estimated: `12490 + d * (3774 ±0) + v * (28 ±0)`
|
|
// Minimum execution time: 5_075_000 picoseconds.
|
|
Weight::from_parts(5_442_000, 12490)
|
|
// Standard Error: 10_524
|
|
.saturating_add(Weight::from_parts(356_284, 0).saturating_mul(v.into()))
|
|
// Standard Error: 22_925
|
|
.saturating_add(Weight::from_parts(59_936_319, 0).saturating_mul(d.into()))
|
|
.saturating_add(RocksDbWeight::get().reads(4_u64))
|
|
.saturating_add(RocksDbWeight::get().reads((4_u64).saturating_mul(d.into())))
|
|
.saturating_add(RocksDbWeight::get().writes((3_u64).saturating_mul(d.into())))
|
|
.saturating_add(Weight::from_parts(0, 3774).saturating_mul(d.into()))
|
|
.saturating_add(Weight::from_parts(0, 28).saturating_mul(v.into()))
|
|
}
|
|
/// Storage: `Elections::Candidates` (r:1 w:1)
|
|
/// Proof: `Elections::Candidates` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Members` (r:1 w:1)
|
|
/// Proof: `Elections::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::RunnersUp` (r:1 w:1)
|
|
/// Proof: `Elections::RunnersUp` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Elections::Voting` (r:257 w:0)
|
|
/// Proof: `Elections::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Proposals` (r:1 w:0)
|
|
/// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `System::Account` (r:108 w:108)
|
|
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
|
/// Storage: `Elections::ElectionRounds` (r:1 w:1)
|
|
/// Proof: `Elections::ElectionRounds` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Members` (r:0 w:1)
|
|
/// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// Storage: `Council::Prime` (r:0 w:1)
|
|
/// Proof: `Council::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
|
/// The range of component `c` is `[1, 128]`.
|
|
/// The range of component `v` is `[1, 256]`.
|
|
/// The range of component `e` is `[256, 4096]`.
|
|
fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `0 + e * (16 ±0) + v * (331 ±0)`
|
|
// Estimated: `253201 + c * (2409 ±3) + e * (9 ±0) + v * (1952 ±4)`
|
|
// Minimum execution time: 1_442_707_000 picoseconds.
|
|
Weight::from_parts(1_453_511_000, 253201)
|
|
// Standard Error: 339_169
|
|
.saturating_add(Weight::from_parts(17_830_182, 0).saturating_mul(v.into()))
|
|
// Standard Error: 21_751
|
|
.saturating_add(Weight::from_parts(521_821, 0).saturating_mul(e.into()))
|
|
.saturating_add(RocksDbWeight::get().reads(112_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_parts(0, 2409).saturating_mul(c.into()))
|
|
.saturating_add(Weight::from_parts(0, 9).saturating_mul(e.into()))
|
|
.saturating_add(Weight::from_parts(0, 1952).saturating_mul(v.into()))
|
|
}
|
|
}
|