git.delta.rocks / unique-network / refs/commits / 8138c78fd9cb

difftreelog

source

pallets/app-promotion/src/weights.rs6.9 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-09-06, 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 set_admin_address() -> Weight;38	fn payout_stakers(b: u32, ) -> Weight;39	fn stake() -> Weight;40	fn unstake() -> Weight;41	fn sponsor_collection() -> Weight;42	fn stop_sponsoring_collection() -> Weight;43	fn sponsor_contract() -> Weight;44	fn stop_sponsoring_contract() -> Weight;45}4647/// Weights for pallet_app_promotion using the Substrate node and recommended hardware.48pub struct SubstrateWeight<T>(PhantomData<T>);49impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {50	// Storage: AppPromotion Admin (r:0 w:1)51	fn set_admin_address() -> Weight {52		(5_297_000 as Weight)53			.saturating_add(T::DbWeight::get().writes(1 as Weight))54	}55	// Storage: AppPromotion Admin (r:1 w:0)56	// Storage: ParachainSystem ValidationData (r:1 w:0)57	// Storage: AppPromotion NextCalculatedRecord (r:1 w:1)58	// Storage: AppPromotion Staked (r:2 w:0)59	fn payout_stakers(b: u32, ) -> Weight {60		(8_045_000 as Weight)61			// Standard Error: 19_00062			.saturating_add((4_778_000 as Weight).saturating_mul(b as Weight))63			.saturating_add(T::DbWeight::get().reads(4 as Weight))64			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))65			.saturating_add(T::DbWeight::get().writes(1 as Weight))66	}67	// Storage: System Account (r:1 w:1)68	// Storage: AppPromotion StakesPerAccount (r:1 w:1)69	// Storage: Balances Locks (r:1 w:1)70	// Storage: ParachainSystem ValidationData (r:1 w:0)71	// Storage: AppPromotion Staked (r:1 w:1)72	// Storage: AppPromotion TotalStaked (r:1 w:1)73	fn stake() -> Weight {74		(17_623_000 as Weight)75			.saturating_add(T::DbWeight::get().reads(6 as Weight))76			.saturating_add(T::DbWeight::get().writes(5 as Weight))77	}78	// Storage: AppPromotion PendingUnstake (r:1 w:1)79	// Storage: AppPromotion Staked (r:2 w:1)80	// Storage: Balances Locks (r:1 w:1)81	// Storage: System Account (r:1 w:1)82	// Storage: AppPromotion TotalStaked (r:1 w:1)83	// Storage: AppPromotion StakesPerAccount (r:0 w:1)84	fn unstake() -> Weight {85		(27_190_000 as Weight)86			.saturating_add(T::DbWeight::get().reads(6 as Weight))87			.saturating_add(T::DbWeight::get().writes(6 as Weight))88	}89	// Storage: AppPromotion Admin (r:1 w:0)90	// Storage: Common CollectionById (r:1 w:1)91	fn sponsor_collection() -> Weight {92		(11_351_000 as Weight)93			.saturating_add(T::DbWeight::get().reads(2 as Weight))94			.saturating_add(T::DbWeight::get().writes(1 as Weight))95	}96	// Storage: AppPromotion Admin (r:1 w:0)97	// Storage: Common CollectionById (r:1 w:1)98	fn stop_sponsoring_collection() -> Weight {99		(10_687_000 as Weight)100			.saturating_add(T::DbWeight::get().reads(2 as Weight))101			.saturating_add(T::DbWeight::get().writes(1 as Weight))102	}103	// Storage: AppPromotion Admin (r:1 w:0)104	// Storage: EvmContractHelpers Sponsoring (r:0 w:1)105	fn sponsor_contract() -> Weight {106		(2_332_000 as Weight)107			.saturating_add(T::DbWeight::get().reads(1 as Weight))108			.saturating_add(T::DbWeight::get().writes(1 as Weight))109	}110	// Storage: AppPromotion Admin (r:1 w:0)111	// Storage: EvmContractHelpers Sponsoring (r:1 w:1)112	fn stop_sponsoring_contract() -> Weight {113		(3_712_000 as Weight)114			.saturating_add(T::DbWeight::get().reads(2 as Weight))115			.saturating_add(T::DbWeight::get().writes(1 as Weight))116	}117}118119// For backwards compatibility and tests120impl WeightInfo for () {121	// Storage: AppPromotion Admin (r:0 w:1)122	fn set_admin_address() -> Weight {123		(5_297_000 as Weight)124			.saturating_add(RocksDbWeight::get().writes(1 as Weight))125	}126	// Storage: AppPromotion Admin (r:1 w:0)127	// Storage: ParachainSystem ValidationData (r:1 w:0)128	// Storage: AppPromotion NextCalculatedRecord (r:1 w:1)129	// Storage: AppPromotion Staked (r:2 w:0)130	fn payout_stakers(b: u32, ) -> Weight {131		(8_045_000 as Weight)132			// Standard Error: 19_000133			.saturating_add((4_778_000 as Weight).saturating_mul(b as Weight))134			.saturating_add(RocksDbWeight::get().reads(4 as Weight))135			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))136			.saturating_add(RocksDbWeight::get().writes(1 as Weight))137	}138	// Storage: System Account (r:1 w:1)139	// Storage: AppPromotion StakesPerAccount (r:1 w:1)140	// Storage: Balances Locks (r:1 w:1)141	// Storage: ParachainSystem ValidationData (r:1 w:0)142	// Storage: AppPromotion Staked (r:1 w:1)143	// Storage: AppPromotion TotalStaked (r:1 w:1)144	fn stake() -> Weight {145		(17_623_000 as Weight)146			.saturating_add(RocksDbWeight::get().reads(6 as Weight))147			.saturating_add(RocksDbWeight::get().writes(5 as Weight))148	}149	// Storage: AppPromotion PendingUnstake (r:1 w:1)150	// Storage: AppPromotion Staked (r:2 w:1)151	// Storage: Balances Locks (r:1 w:1)152	// Storage: System Account (r:1 w:1)153	// Storage: AppPromotion TotalStaked (r:1 w:1)154	// Storage: AppPromotion StakesPerAccount (r:0 w:1)155	fn unstake() -> Weight {156		(27_190_000 as Weight)157			.saturating_add(RocksDbWeight::get().reads(6 as Weight))158			.saturating_add(RocksDbWeight::get().writes(6 as Weight))159	}160	// Storage: AppPromotion Admin (r:1 w:0)161	// Storage: Common CollectionById (r:1 w:1)162	fn sponsor_collection() -> Weight {163		(11_351_000 as Weight)164			.saturating_add(RocksDbWeight::get().reads(2 as Weight))165			.saturating_add(RocksDbWeight::get().writes(1 as Weight))166	}167	// Storage: AppPromotion Admin (r:1 w:0)168	// Storage: Common CollectionById (r:1 w:1)169	fn stop_sponsoring_collection() -> Weight {170		(10_687_000 as Weight)171			.saturating_add(RocksDbWeight::get().reads(2 as Weight))172			.saturating_add(RocksDbWeight::get().writes(1 as Weight))173	}174	// Storage: AppPromotion Admin (r:1 w:0)175	// Storage: EvmContractHelpers Sponsoring (r:0 w:1)176	fn sponsor_contract() -> Weight {177		(2_332_000 as Weight)178			.saturating_add(RocksDbWeight::get().reads(1 as Weight))179			.saturating_add(RocksDbWeight::get().writes(1 as Weight))180	}181	// Storage: AppPromotion Admin (r:1 w:0)182	// Storage: EvmContractHelpers Sponsoring (r:1 w:1)183	fn stop_sponsoring_contract() -> Weight {184		(3_712_000 as Weight)185			.saturating_add(RocksDbWeight::get().reads(2 as Weight))186			.saturating_add(RocksDbWeight::get().writes(1 as Weight))187	}188}