git.delta.rocks / unique-network / refs/commits / 081dbb6ae4fb

difftreelog

source

pallets/app-promotion/src/weights.rs7.5 KiBsourcehistory
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_app_promotion4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2022-08-31, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// pallet13// --pallet14// pallet-app-promotion15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=8023// --heap-pages=409624// --output=./pallets/app-promotion/src/weights.rs2526#![cfg_attr(rustfmt, rustfmt_skip)]27#![allow(unused_parens)]28#![allow(unused_imports)]29#![allow(missing_docs)]30#![allow(clippy::unnecessary_cast)]3132use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};33use sp_std::marker::PhantomData;3435/// Weight functions needed for pallet_app_promotion.36pub trait WeightInfo {37	fn start_app_promotion() -> Weight;38	fn stop_app_promotion() -> Weight;39	fn set_admin_address() -> Weight;40	fn payout_stakers() -> Weight;41	fn stake() -> Weight;42	fn unstake() -> Weight;43	fn sponsor_collection() -> Weight;44	fn stop_sponsoring_collection() -> Weight;45	fn sponsor_contract() -> Weight;46	fn stop_sponsoring_contract() -> Weight;47}4849/// Weights for pallet_app_promotion using the Substrate node and recommended hardware.50pub struct SubstrateWeight<T>(PhantomData<T>);51impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {52	// Storage: Promotion StartBlock (r:1 w:1)53	// Storage: ParachainSystem ValidationData (r:1 w:0)54	// Storage: Promotion NextInterestBlock (r:0 w:1)55	fn start_app_promotion() -> Weight {56		(3_995_000 as Weight)57			.saturating_add(T::DbWeight::get().reads(2 as Weight))58			.saturating_add(T::DbWeight::get().writes(2 as Weight))59	}60	// Storage: Promotion StartBlock (r:1 w:1)61	// Storage: Promotion NextInterestBlock (r:0 w:1)62	fn stop_app_promotion() -> Weight {63		(3_623_000 as Weight)64			.saturating_add(T::DbWeight::get().reads(1 as Weight))65			.saturating_add(T::DbWeight::get().writes(2 as Weight))66	}67	// Storage: Promotion Admin (r:0 w:1)68	fn set_admin_address() -> Weight {69		(1_203_000 as Weight)70			.saturating_add(T::DbWeight::get().writes(1 as Weight))71	}72	// Storage: Promotion Admin (r:1 w:0)73	// Storage: ParachainSystem ValidationData (r:1 w:0)74	// Storage: Promotion NextCalculatedRecord (r:1 w:1)75	// Storage: Promotion Staked (r:2 w:0)76	fn payout_stakers() -> Weight {77		(10_859_000 as Weight)78			.saturating_add(T::DbWeight::get().reads(5 as Weight))79			.saturating_add(T::DbWeight::get().writes(1 as Weight))80	}81	// Storage: System Account (r:1 w:1)82	// Storage: Balances Locks (r:1 w:1)83	// Storage: ParachainSystem ValidationData (r:1 w:0)84	// Storage: Promotion Staked (r:1 w:1)85	// Storage: Promotion TotalStaked (r:1 w:1)86	fn stake() -> Weight {87		(14_789_000 as Weight)88			.saturating_add(T::DbWeight::get().reads(5 as Weight))89			.saturating_add(T::DbWeight::get().writes(4 as Weight))90	}91	// Storage: Promotion Staked (r:2 w:1)92	// Storage: ParachainSystem ValidationData (r:1 w:0)93	// Storage: Promotion PendingUnstake (r:1 w:1)94	// Storage: Promotion TotalStaked (r:1 w:1)95	fn unstake() -> Weight {96		(16_889_000 as Weight)97			.saturating_add(T::DbWeight::get().reads(5 as Weight))98			.saturating_add(T::DbWeight::get().writes(3 as Weight))99	}100	// Storage: Promotion Admin (r:1 w:0)101	// Storage: Common CollectionById (r:1 w:1)102	fn sponsor_collection() -> Weight {103		(18_377_000 as Weight)104			.saturating_add(T::DbWeight::get().reads(2 as Weight))105			.saturating_add(T::DbWeight::get().writes(1 as Weight))106	}107	// Storage: Promotion Admin (r:1 w:0)108	// Storage: Common CollectionById (r:1 w:1)109	fn stop_sponsoring_collection() -> Weight {110		(13_989_000 as Weight)111			.saturating_add(T::DbWeight::get().reads(2 as Weight))112			.saturating_add(T::DbWeight::get().writes(1 as Weight))113	}114	// Storage: Promotion Admin (r:1 w:0)115	// Storage: EvmContractHelpers Sponsoring (r:0 w:1)116	fn sponsor_contract() -> Weight {117		(4_162_000 as Weight)118			.saturating_add(T::DbWeight::get().reads(1 as Weight))119			.saturating_add(T::DbWeight::get().writes(1 as Weight))120	}121	// Storage: Promotion Admin (r:1 w:0)122	// Storage: EvmContractHelpers Sponsoring (r:1 w:1)123	fn stop_sponsoring_contract() -> Weight {124		(5_457_000 as Weight)125			.saturating_add(T::DbWeight::get().reads(2 as Weight))126			.saturating_add(T::DbWeight::get().writes(1 as Weight))127	}128}129130// For backwards compatibility and tests131impl WeightInfo for () {132	// Storage: Promotion StartBlock (r:1 w:1)133	// Storage: ParachainSystem ValidationData (r:1 w:0)134	// Storage: Promotion NextInterestBlock (r:0 w:1)135	fn start_app_promotion() -> Weight {136		(3_995_000 as Weight)137			.saturating_add(RocksDbWeight::get().reads(2 as Weight))138			.saturating_add(RocksDbWeight::get().writes(2 as Weight))139	}140	// Storage: Promotion StartBlock (r:1 w:1)141	// Storage: Promotion NextInterestBlock (r:0 w:1)142	fn stop_app_promotion() -> Weight {143		(3_623_000 as Weight)144			.saturating_add(RocksDbWeight::get().reads(1 as Weight))145			.saturating_add(RocksDbWeight::get().writes(2 as Weight))146	}147	// Storage: Promotion Admin (r:0 w:1)148	fn set_admin_address() -> Weight {149		(1_203_000 as Weight)150			.saturating_add(RocksDbWeight::get().writes(1 as Weight))151	}152	// Storage: Promotion Admin (r:1 w:0)153	// Storage: ParachainSystem ValidationData (r:1 w:0)154	// Storage: Promotion NextCalculatedRecord (r:1 w:1)155	// Storage: Promotion Staked (r:2 w:0)156	fn payout_stakers() -> Weight {157		(10_859_000 as Weight)158			.saturating_add(RocksDbWeight::get().reads(5 as Weight))159			.saturating_add(RocksDbWeight::get().writes(1 as Weight))160	}161	// Storage: System Account (r:1 w:1)162	// Storage: Balances Locks (r:1 w:1)163	// Storage: ParachainSystem ValidationData (r:1 w:0)164	// Storage: Promotion Staked (r:1 w:1)165	// Storage: Promotion TotalStaked (r:1 w:1)166	fn stake() -> Weight {167		(14_789_000 as Weight)168			.saturating_add(RocksDbWeight::get().reads(5 as Weight))169			.saturating_add(RocksDbWeight::get().writes(4 as Weight))170	}171	// Storage: Promotion Staked (r:2 w:1)172	// Storage: ParachainSystem ValidationData (r:1 w:0)173	// Storage: Promotion PendingUnstake (r:1 w:1)174	// Storage: Promotion TotalStaked (r:1 w:1)175	fn unstake() -> Weight {176		(16_889_000 as Weight)177			.saturating_add(RocksDbWeight::get().reads(5 as Weight))178			.saturating_add(RocksDbWeight::get().writes(3 as Weight))179	}180	// Storage: Promotion Admin (r:1 w:0)181	// Storage: Common CollectionById (r:1 w:1)182	fn sponsor_collection() -> Weight {183		(18_377_000 as Weight)184			.saturating_add(RocksDbWeight::get().reads(2 as Weight))185			.saturating_add(RocksDbWeight::get().writes(1 as Weight))186	}187	// Storage: Promotion Admin (r:1 w:0)188	// Storage: Common CollectionById (r:1 w:1)189	fn stop_sponsoring_collection() -> Weight {190		(13_989_000 as Weight)191			.saturating_add(RocksDbWeight::get().reads(2 as Weight))192			.saturating_add(RocksDbWeight::get().writes(1 as Weight))193	}194	// Storage: Promotion Admin (r:1 w:0)195	// Storage: EvmContractHelpers Sponsoring (r:0 w:1)196	fn sponsor_contract() -> Weight {197		(4_162_000 as Weight)198			.saturating_add(RocksDbWeight::get().reads(1 as Weight))199			.saturating_add(RocksDbWeight::get().writes(1 as Weight))200	}201	// Storage: Promotion Admin (r:1 w:0)202	// Storage: EvmContractHelpers Sponsoring (r:1 w:1)203	fn stop_sponsoring_contract() -> Weight {204		(5_457_000 as Weight)205			.saturating_add(RocksDbWeight::get().reads(2 as Weight))206			.saturating_add(RocksDbWeight::get().writes(1 as Weight))207	}208}