forked from ghostchain/ghost-node
199 lines
10 KiB
Rust
199 lines
10 KiB
Rust
// This file is part of Ghost Network.
|
|
|
|
// Ghost Network 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.
|
|
|
|
// Ghost Network 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 Ghost Network. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
//! Autogenerated weights for `pallet_ranked_collective`
|
|
//!
|
|
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
|
|
//! DATE: 2024-08-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
|
|
//! WORST CASE MAP SIZE: `1000000`
|
|
//! HOSTNAME: `ghostown`, CPU: `Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz`
|
|
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("casper-dev")`, DB CACHE: 1024
|
|
|
|
// Executed Command:
|
|
// ./target/release/ghost
|
|
// benchmark
|
|
// pallet
|
|
// --chain=casper-dev
|
|
// --steps=50
|
|
// --repeat=20
|
|
// --pallet=pallet_ranked_collective
|
|
// --extrinsic=*
|
|
// --wasm-execution=compiled
|
|
// --heap-pages=4096
|
|
// --header=./file_header.txt
|
|
// --output=./runtime/casper/src/weights/pallet_ranked_collective.rs
|
|
|
|
#![cfg_attr(rustfmt, rustfmt_skip)]
|
|
#![allow(unused_parens)]
|
|
#![allow(unused_imports)]
|
|
#![allow(missing_docs)]
|
|
|
|
use frame_support::{traits::Get, weights::Weight};
|
|
use core::marker::PhantomData;
|
|
|
|
/// Weight functions for `pallet_ranked_collective`.
|
|
pub struct WeightInfo<T>(PhantomData<T>);
|
|
impl<T: frame_system::Config> pallet_ranked_collective::WeightInfo for WeightInfo<T> {
|
|
/// Storage: `CultCollective::Members` (r:1 w:1)
|
|
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::MemberCount` (r:1 w:1)
|
|
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::IndexToId` (r:0 w:1)
|
|
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::IdToIndex` (r:0 w:1)
|
|
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
|
fn add_member() -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `142`
|
|
// Estimated: `3507`
|
|
// Minimum execution time: 63_706_000 picoseconds.
|
|
Weight::from_parts(64_882_000, 0)
|
|
.saturating_add(Weight::from_parts(0, 3507))
|
|
.saturating_add(T::DbWeight::get().reads(2))
|
|
.saturating_add(T::DbWeight::get().writes(4))
|
|
}
|
|
/// Storage: `CultCollective::Members` (r:1 w:1)
|
|
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::MemberCount` (r:11 w:11)
|
|
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::IdToIndex` (r:11 w:22)
|
|
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::IndexToId` (r:11 w:22)
|
|
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
|
/// The range of component `r` is `[0, 10]`.
|
|
fn remove_member(r: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `617 + r * (281 ±0)`
|
|
// Estimated: `3519 + r * (2529 ±0)`
|
|
// Minimum execution time: 113_000_000 picoseconds.
|
|
Weight::from_parts(118_820_574, 0)
|
|
.saturating_add(Weight::from_parts(0, 3519))
|
|
// Standard Error: 67_446
|
|
.saturating_add(Weight::from_parts(57_292_374, 0).saturating_mul(r.into()))
|
|
.saturating_add(T::DbWeight::get().reads(4))
|
|
.saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into())))
|
|
.saturating_add(T::DbWeight::get().writes(6))
|
|
.saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(r.into())))
|
|
.saturating_add(Weight::from_parts(0, 2529).saturating_mul(r.into()))
|
|
}
|
|
/// Storage: `CultCollective::Members` (r:1 w:1)
|
|
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::MemberCount` (r:1 w:1)
|
|
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::IndexToId` (r:0 w:1)
|
|
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::IdToIndex` (r:0 w:1)
|
|
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
|
/// The range of component `r` is `[0, 10]`.
|
|
fn promote_member(r: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `314 + r * (17 ±0)`
|
|
// Estimated: `3507`
|
|
// Minimum execution time: 73_427_000 picoseconds.
|
|
Weight::from_parts(75_571_865, 0)
|
|
.saturating_add(Weight::from_parts(0, 3507))
|
|
// Standard Error: 10_496
|
|
.saturating_add(Weight::from_parts(748_369, 0).saturating_mul(r.into()))
|
|
.saturating_add(T::DbWeight::get().reads(2))
|
|
.saturating_add(T::DbWeight::get().writes(4))
|
|
}
|
|
/// Storage: `CultCollective::Members` (r:1 w:1)
|
|
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::MemberCount` (r:1 w:1)
|
|
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::IdToIndex` (r:1 w:2)
|
|
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::IndexToId` (r:1 w:2)
|
|
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
|
/// The range of component `r` is `[0, 10]`.
|
|
fn demote_member(r: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `632 + r * (72 ±0)`
|
|
// Estimated: `3519`
|
|
// Minimum execution time: 113_585_000 picoseconds.
|
|
Weight::from_parts(119_684_908, 0)
|
|
.saturating_add(Weight::from_parts(0, 3519))
|
|
// Standard Error: 46_656
|
|
.saturating_add(Weight::from_parts(1_495_515, 0).saturating_mul(r.into()))
|
|
.saturating_add(T::DbWeight::get().reads(4))
|
|
.saturating_add(T::DbWeight::get().writes(6))
|
|
}
|
|
/// Storage: `CultCollective::Members` (r:1 w:0)
|
|
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:1)
|
|
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::Voting` (r:1 w:1)
|
|
/// Proof: `CultCollective::Voting` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`)
|
|
/// Storage: `Scheduler::Agenda` (r:2 w:2)
|
|
/// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`)
|
|
/// Storage: `Scheduler::Retries` (r:0 w:1)
|
|
/// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
|
|
fn vote() -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `699`
|
|
// Estimated: `26866`
|
|
// Minimum execution time: 165_614_000 picoseconds.
|
|
Weight::from_parts(167_712_000, 0)
|
|
.saturating_add(Weight::from_parts(0, 26866))
|
|
.saturating_add(T::DbWeight::get().reads(5))
|
|
.saturating_add(T::DbWeight::get().writes(5))
|
|
}
|
|
/// Storage: `CultReferenda::ReferendumInfoFor` (r:1 w:0)
|
|
/// Proof: `CultReferenda::ReferendumInfoFor` (`max_values`: None, `max_size`: Some(330), added: 2805, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::VotingCleanup` (r:1 w:0)
|
|
/// Proof: `CultCollective::VotingCleanup` (`max_values`: None, `max_size`: Some(114), added: 2589, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::Voting` (r:100 w:100)
|
|
/// Proof: `CultCollective::Voting` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`)
|
|
/// The range of component `n` is `[0, 100]`.
|
|
fn cleanup_poll(n: u32, ) -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `534 + n * (50 ±0)`
|
|
// Estimated: `3795 + n * (2540 ±0)`
|
|
// Minimum execution time: 61_194_000 picoseconds.
|
|
Weight::from_parts(69_801_249, 0)
|
|
.saturating_add(Weight::from_parts(0, 3795))
|
|
// Standard Error: 5_737
|
|
.saturating_add(Weight::from_parts(3_189_746, 0).saturating_mul(n.into()))
|
|
.saturating_add(T::DbWeight::get().reads(2))
|
|
.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
|
|
.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
|
|
.saturating_add(Weight::from_parts(0, 2540).saturating_mul(n.into()))
|
|
}
|
|
/// Storage: `CultCollective::Members` (r:2 w:2)
|
|
/// Proof: `CultCollective::Members` (`max_values`: None, `max_size`: Some(42), added: 2517, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::MemberCount` (r:2 w:2)
|
|
/// Proof: `CultCollective::MemberCount` (`max_values`: None, `max_size`: Some(14), added: 2489, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::IdToIndex` (r:2 w:4)
|
|
/// Proof: `CultCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCore::Member` (r:2 w:2)
|
|
/// Proof: `CultCore::Member` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCore::MemberEvidence` (r:1 w:0)
|
|
/// Proof: `CultCore::MemberEvidence` (`max_values`: None, `max_size`: Some(65581), added: 68056, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultSalary::Claimant` (r:2 w:2)
|
|
/// Proof: `CultSalary::Claimant` (`max_values`: None, `max_size`: Some(78), added: 2553, mode: `MaxEncodedLen`)
|
|
/// Storage: `CultCollective::IndexToId` (r:0 w:2)
|
|
/// Proof: `CultCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`)
|
|
fn exchange_member() -> Weight {
|
|
// Proof Size summary in bytes:
|
|
// Measured: `698`
|
|
// Estimated: `69046`
|
|
// Minimum execution time: 271_034_000 picoseconds.
|
|
Weight::from_parts(273_243_000, 0)
|
|
.saturating_add(Weight::from_parts(0, 69046))
|
|
.saturating_add(T::DbWeight::get().reads(11))
|
|
.saturating_add(T::DbWeight::get().writes(14))
|
|
}
|
|
}
|