diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs index ffde06ea2e9fb48828c26e71a9d66eec9e71ed8c..048b1af472a4eba3bee679606e35e722eae59538 100644 --- a/runtime/common/src/pallets_config.rs +++ b/runtime/common/src/pallets_config.rs @@ -206,6 +206,7 @@ macro_rules! pallets_config { type MaxOfflineSessions = frame_support::pallet_prelude::ConstU32<2_400>; type RemoveMemberOrigin = EnsureRoot<Self::AccountId>; type RuntimeEvent = RuntimeEvent; + type WeightInfo = common_runtime::weights::pallet_authority_members::WeightInfo<Runtime>; } impl pallet_authorship::Config for Runtime { type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Babe>; diff --git a/runtime/common/src/weights.rs b/runtime/common/src/weights.rs index c595875addcc6407cac9e2bebaafff634c838c9f..ae297fe44d04d82f81136a38c06df053b74e70a6 100644 --- a/runtime/common/src/weights.rs +++ b/runtime/common/src/weights.rs @@ -38,4 +38,5 @@ pub mod pallet_certification_cert; pub mod pallet_certification_smith_cert; pub mod pallet_membership_membership; pub mod pallet_membership_smith_membership; +pub mod pallet_authority_members; pub mod paritydb_weights; diff --git a/runtime/common/src/weights/pallet_authority_members.rs b/runtime/common/src/weights/pallet_authority_members.rs new file mode 100644 index 0000000000000000000000000000000000000000..209beba9570e647fdcea84724e5fcf3754c65f2a --- /dev/null +++ b/runtime/common/src/weights/pallet_authority_members.rs @@ -0,0 +1,106 @@ +// Copyright 2021-2022 Axiom-Team +// +// This file is part of Duniter-v2S. +// +// Duniter-v2S is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Duniter-v2S 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. + +//! Autogenerated weights for `pallet_authority_members` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-04-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `benjamin-xps139380`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/duniter +// benchmark +// pallet +// --chain=dev +// --steps=50 +// --repeat=20 +// --pallet=pallet_authority_members +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --header=./file_header.txt +// --output=./runtime/common/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_authority_members`. +pub struct WeightInfo<T>(PhantomData<T>); +impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInfo<T> { + // Storage: Identity IdentityIndexOf (r:1 w:0) + // Storage: SmithsMembership Membership (r:1 w:0) + // Storage: AuthorityMembers Members (r:1 w:0) + // Storage: AuthorityMembers OutgoingAuthorities (r:1 w:1) + // Storage: AuthorityMembers IncomingAuthorities (r:1 w:0) + // Storage: AuthorityMembers OnlineAuthorities (r:1 w:0) + // Storage: AuthorityMembers AuthoritiesCounter (r:1 w:1) + fn go_offline() -> Weight { + // Minimum execution time: 116_372 nanoseconds. + Weight::from_ref_time(120_732_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + // Storage: Identity IdentityIndexOf (r:1 w:0) + // Storage: SmithsMembership Membership (r:1 w:0) + // Storage: AuthorityMembers Members (r:1 w:0) + // Storage: Session NextKeys (r:1 w:0) + // Storage: AuthorityMembers IncomingAuthorities (r:1 w:1) + // Storage: AuthorityMembers OutgoingAuthorities (r:1 w:0) + // Storage: AuthorityMembers OnlineAuthorities (r:1 w:0) + // Storage: AuthorityMembers AuthoritiesCounter (r:1 w:1) + fn go_online() -> Weight { + // Minimum execution time: 144_006 nanoseconds. + Weight::from_ref_time(157_859_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + } + // Storage: Identity IdentityIndexOf (r:1 w:0) + // Storage: SmithsMembership Membership (r:1 w:0) + // Storage: System Account (r:1 w:0) + // Storage: Session NextKeys (r:1 w:1) + // Storage: Session KeyOwner (r:4 w:0) + // Storage: Session CurrentIndex (r:1 w:0) + // Storage: AuthorityMembers Members (r:1 w:1) + // Storage: AuthorityMembers MustRotateKeysBefore (r:1 w:1) + fn set_session_keys() -> Weight { + // Minimum execution time: 175_589 nanoseconds. + Weight::from_ref_time(178_397_000 as u64) + .saturating_add(T::DbWeight::get().reads(11 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) + } + // Storage: AuthorityMembers Members (r:1 w:1) + // Storage: AuthorityMembers OnlineAuthorities (r:1 w:1) + // Storage: AuthorityMembers OutgoingAuthorities (r:1 w:1) + // Storage: AuthorityMembers AuthoritiesCounter (r:1 w:1) + // Storage: AuthorityMembers IncomingAuthorities (r:1 w:1) + // Storage: Session NextKeys (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: SmithsMembership Membership (r:1 w:1) + // Storage: SmithsMembership CounterForMembership (r:1 w:1) + // Storage: Session KeyOwner (r:0 w:4) + fn remove_member() -> Weight { + // Minimum execution time: 242_728 nanoseconds. + Weight::from_ref_time(296_778_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(13 as u64)) + } +}