Collectives: alliance and collective pallets weights (#1813)

* Collectives: alliance and collective pallets weights

* ".git/.scripts/bench-bot.sh" pallet collectives-polkadot collectives pallet_collective

* ".git/.scripts/bench-bot.sh" pallet collectives-polkadot collectives pallet_alliance

Co-authored-by: command-bot <>
This commit is contained in:
Muharem Ismailov
2022-11-08 16:05:03 +01:00
committed by GitHub
parent 8ff6689b59
commit 6b0466cdf6
4 changed files with 363 additions and 97 deletions
@@ -0,0 +1,209 @@
// Copyright 2021 Parity Technologies (UK) Ltd.
// This file is part of Cumulus.
// Cumulus 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.
// Cumulus 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 Cumulus. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for `pallet_collective`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-11-05, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("collectives-polkadot-dev"), DB CACHE: 1024
// Executed Command:
// /home/benchbot/cargo_target_dir/production/polkadot-parachain
// benchmark
// pallet
// --steps=50
// --repeat=20
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json
// --pallet=pallet_collective
// --chain=collectives-polkadot-dev
// --header=./file_header.txt
// --output=./parachains/runtimes/collectives/collectives-polkadot/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_collective`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> {
// Storage: AllianceMotion Members (r:1 w:1)
// Storage: AllianceMotion Proposals (r:1 w:0)
// Storage: AllianceMotion Prime (r:0 w:1)
// Storage: AllianceMotion Voting (r:100 w:100)
/// The range of component `m` is `[0, 100]`.
/// The range of component `n` is `[0, 100]`.
/// The range of component `p` is `[0, 100]`.
fn set_members(m: u32, _n: u32, p: u32, ) -> Weight {
// Minimum execution time: 17_673 nanoseconds.
Weight::from_ref_time(17_891_000 as u64)
// Standard Error: 61_591
.saturating_add(Weight::from_ref_time(4_893_341 as u64).saturating_mul(m as u64))
// Standard Error: 61_591
.saturating_add(Weight::from_ref_time(7_372_897 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(p as u64)))
.saturating_add(T::DbWeight::get().writes(2 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64)))
}
// Storage: AllianceMotion Members (r:1 w:0)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `m` is `[1, 100]`.
fn execute(b: u32, m: u32, ) -> Weight {
// Minimum execution time: 22_238 nanoseconds.
Weight::from_ref_time(21_508_595 as u64)
// Standard Error: 34
.saturating_add(Weight::from_ref_time(1_793 as u64).saturating_mul(b as u64))
// Standard Error: 360
.saturating_add(Weight::from_ref_time(17_737 as u64).saturating_mul(m as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
}
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:0)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `m` is `[1, 100]`.
fn propose_execute(b: u32, m: u32, ) -> Weight {
// Minimum execution time: 24_826 nanoseconds.
Weight::from_ref_time(23_742_099 as u64)
// Standard Error: 34
.saturating_add(Weight::from_ref_time(1_922 as u64).saturating_mul(b as u64))
// Standard Error: 355
.saturating_add(Weight::from_ref_time(30_647 as u64).saturating_mul(m as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
}
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion ProposalCount (r:1 w:1)
// Storage: AllianceMotion Voting (r:0 w:1)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `m` is `[2, 100]`.
/// The range of component `p` is `[1, 100]`.
fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight {
// Minimum execution time: 31_785 nanoseconds.
Weight::from_ref_time(30_339_101 as u64)
// Standard Error: 143
.saturating_add(Weight::from_ref_time(4_127 as u64).saturating_mul(b as u64))
// Standard Error: 1_497
.saturating_add(Weight::from_ref_time(26_901 as u64).saturating_mul(m as u64))
// Standard Error: 1_478
.saturating_add(Weight::from_ref_time(179_739 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(4 as u64))
}
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion Voting (r:1 w:1)
/// The range of component `m` is `[5, 100]`.
fn vote(m: u32, ) -> Weight {
// Minimum execution time: 33_393 nanoseconds.
Weight::from_ref_time(36_717_049 as u64)
// Standard Error: 2_427
.saturating_add(Weight::from_ref_time(52_572 as u64).saturating_mul(m as u64))
.saturating_add(T::DbWeight::get().reads(2 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion ProposalOf (r:0 w:1)
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_disapproved(m: u32, p: u32, ) -> Weight {
// Minimum execution time: 33_378 nanoseconds.
Weight::from_ref_time(34_734_755 as u64)
// Standard Error: 1_644
.saturating_add(Weight::from_ref_time(28_090 as u64).saturating_mul(m as u64))
// Standard Error: 1_603
.saturating_add(Weight::from_ref_time(163_809 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(3 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Proposals (r:1 w:1)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight {
// Minimum execution time: 45_128 nanoseconds.
Weight::from_ref_time(42_122_418 as u64)
// Standard Error: 142
.saturating_add(Weight::from_ref_time(3_356 as u64).saturating_mul(b as u64))
// Standard Error: 1_510
.saturating_add(Weight::from_ref_time(42_981 as u64).saturating_mul(m as u64))
// Standard Error: 1_472
.saturating_add(Weight::from_ref_time(179_794 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion Prime (r:1 w:0)
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion ProposalOf (r:0 w:1)
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_disapproved(m: u32, p: u32, ) -> Weight {
// Minimum execution time: 35_611 nanoseconds.
Weight::from_ref_time(36_011_285 as u64)
// Standard Error: 1_739
.saturating_add(Weight::from_ref_time(37_018 as u64).saturating_mul(m as u64))
// Standard Error: 1_696
.saturating_add(Weight::from_ref_time(165_311 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: AllianceMotion Voting (r:1 w:1)
// Storage: AllianceMotion Members (r:1 w:0)
// Storage: AllianceMotion Prime (r:1 w:0)
// Storage: AllianceMotion ProposalOf (r:1 w:1)
// Storage: AllianceMotion Proposals (r:1 w:1)
/// The range of component `b` is `[1, 1024]`.
/// The range of component `m` is `[4, 100]`.
/// The range of component `p` is `[1, 100]`.
fn close_approved(b: u32, m: u32, p: u32, ) -> Weight {
// Minimum execution time: 48_279 nanoseconds.
Weight::from_ref_time(45_846_962 as u64)
// Standard Error: 148
.saturating_add(Weight::from_ref_time(1_953 as u64).saturating_mul(b as u64))
// Standard Error: 1_569
.saturating_add(Weight::from_ref_time(45_331 as u64).saturating_mul(m as u64))
// Standard Error: 1_530
.saturating_add(Weight::from_ref_time(181_458 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(5 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
// Storage: AllianceMotion Proposals (r:1 w:1)
// Storage: AllianceMotion Voting (r:0 w:1)
// Storage: AllianceMotion ProposalOf (r:0 w:1)
/// The range of component `p` is `[1, 100]`.
fn disapprove_proposal(p: u32, ) -> Weight {
// Minimum execution time: 20_838 nanoseconds.
Weight::from_ref_time(24_287_938 as u64)
// Standard Error: 1_411
.saturating_add(Weight::from_ref_time(172_000 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(3 as u64))
}
}