git.delta.rocks / unique-network / refs/commits / fb3fa28b0be8

difftreelog

source

pallets/app-promotion/src/weights.rs7.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-07, 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 on_initialize(b: u32, ) -> Weight;38	fn set_admin_address() -> Weight;39	fn payout_stakers(b: u32, ) -> Weight;40	fn stake() -> Weight;41	fn unstake() -> Weight;42	fn sponsor_collection() -> Weight;43	fn stop_sponsoring_collection() -> Weight;44	fn sponsor_contract() -> Weight;45	fn stop_sponsoring_contract() -> Weight;46}4748/// Weights for pallet_app_promotion using the Substrate node and recommended hardware.49pub struct SubstrateWeight<T>(PhantomData<T>);50impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {51	// Storage: AppPromotion PendingUnstake (r:1 w:0)52	// Storage: System Account (r:1 w:1)53	fn on_initialize(b: u32, ) -> Weight {54		(2_651_000 as Weight)55			// Standard Error: 103_00056			.saturating_add((6_024_000 as Weight).saturating_mul(b as Weight))57			.saturating_add(T::DbWeight::get().reads(1 as Weight))58			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))59			.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))60	}61	// Storage: AppPromotion Admin (r:0 w:1)62	fn set_admin_address() -> Weight {63		(7_117_000 as Weight)64			.saturating_add(T::DbWeight::get().writes(1 as Weight))65	}66	// Storage: AppPromotion Admin (r:1 w:0)67	// Storage: ParachainSystem ValidationData (r:1 w:0)68	// Storage: AppPromotion NextCalculatedRecord (r:1 w:1)69	// Storage: AppPromotion Staked (r:2 w:0)70	fn payout_stakers(b: u32, ) -> Weight {71		(9_958_000 as Weight)72			// Standard Error: 8_00073			.saturating_add((4_406_000 as Weight).saturating_mul(b as Weight))74			.saturating_add(T::DbWeight::get().reads(4 as Weight))75			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))76			.saturating_add(T::DbWeight::get().writes(1 as Weight))77	}78	// Storage: AppPromotion StakesPerAccount (r:1 w:1)79	// Storage: System Account (r:1 w:1)80	// Storage: Balances Locks (r:1 w:1)81	// Storage: ParachainSystem ValidationData (r:1 w:0)82	// Storage: AppPromotion Staked (r:1 w:1)83	// Storage: AppPromotion TotalStaked (r:1 w:1)84	fn stake() -> Weight {85		(20_574_000 as Weight)86			.saturating_add(T::DbWeight::get().reads(6 as Weight))87			.saturating_add(T::DbWeight::get().writes(5 as Weight))88	}89	// Storage: AppPromotion PendingUnstake (r:1 w:1)90	// Storage: AppPromotion Staked (r:2 w:1)91	// Storage: Balances Locks (r:1 w:1)92	// Storage: System Account (r:1 w:1)93	// Storage: AppPromotion TotalStaked (r:1 w:1)94	// Storage: AppPromotion StakesPerAccount (r:0 w:1)95	fn unstake() -> Weight {96		(31_703_000 as Weight)97			.saturating_add(T::DbWeight::get().reads(6 as Weight))98			.saturating_add(T::DbWeight::get().writes(6 as Weight))99	}100	// Storage: AppPromotion Admin (r:1 w:0)101	// Storage: Common CollectionById (r:1 w:1)102	fn sponsor_collection() -> Weight {103		(12_932_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: AppPromotion Admin (r:1 w:0)108	// Storage: Common CollectionById (r:1 w:1)109	fn stop_sponsoring_collection() -> Weight {110		(12_453_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: AppPromotion Admin (r:1 w:0)115	// Storage: EvmContractHelpers Sponsoring (r:0 w:1)116	fn sponsor_contract() -> Weight {117		(11_952_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: AppPromotion Admin (r:1 w:0)122	// Storage: EvmContractHelpers Sponsoring (r:1 w:1)123	fn stop_sponsoring_contract() -> Weight {124		(12_538_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: AppPromotion PendingUnstake (r:1 w:0)133	// Storage: System Account (r:1 w:1)134	fn on_initialize(b: u32, ) -> Weight {135		(2_651_000 as Weight)136			// Standard Error: 103_000137			.saturating_add((6_024_000 as Weight).saturating_mul(b as Weight))138			.saturating_add(RocksDbWeight::get().reads(1 as Weight))139			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))140			.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))141	}142	// Storage: AppPromotion Admin (r:0 w:1)143	fn set_admin_address() -> Weight {144		(7_117_000 as Weight)145			.saturating_add(RocksDbWeight::get().writes(1 as Weight))146	}147	// Storage: AppPromotion Admin (r:1 w:0)148	// Storage: ParachainSystem ValidationData (r:1 w:0)149	// Storage: AppPromotion NextCalculatedRecord (r:1 w:1)150	// Storage: AppPromotion Staked (r:2 w:0)151	fn payout_stakers(b: u32, ) -> Weight {152		(9_958_000 as Weight)153			// Standard Error: 8_000154			.saturating_add((4_406_000 as Weight).saturating_mul(b as Weight))155			.saturating_add(RocksDbWeight::get().reads(4 as Weight))156			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))157			.saturating_add(RocksDbWeight::get().writes(1 as Weight))158	}159	// Storage: AppPromotion StakesPerAccount (r:1 w:1)160	// Storage: System Account (r:1 w:1)161	// Storage: Balances Locks (r:1 w:1)162	// Storage: ParachainSystem ValidationData (r:1 w:0)163	// Storage: AppPromotion Staked (r:1 w:1)164	// Storage: AppPromotion TotalStaked (r:1 w:1)165	fn stake() -> Weight {166		(20_574_000 as Weight)167			.saturating_add(RocksDbWeight::get().reads(6 as Weight))168			.saturating_add(RocksDbWeight::get().writes(5 as Weight))169	}170	// Storage: AppPromotion PendingUnstake (r:1 w:1)171	// Storage: AppPromotion Staked (r:2 w:1)172	// Storage: Balances Locks (r:1 w:1)173	// Storage: System Account (r:1 w:1)174	// Storage: AppPromotion TotalStaked (r:1 w:1)175	// Storage: AppPromotion StakesPerAccount (r:0 w:1)176	fn unstake() -> Weight {177		(31_703_000 as Weight)178			.saturating_add(RocksDbWeight::get().reads(6 as Weight))179			.saturating_add(RocksDbWeight::get().writes(6 as Weight))180	}181	// Storage: AppPromotion Admin (r:1 w:0)182	// Storage: Common CollectionById (r:1 w:1)183	fn sponsor_collection() -> Weight {184		(12_932_000 as Weight)185			.saturating_add(RocksDbWeight::get().reads(2 as Weight))186			.saturating_add(RocksDbWeight::get().writes(1 as Weight))187	}188	// Storage: AppPromotion Admin (r:1 w:0)189	// Storage: Common CollectionById (r:1 w:1)190	fn stop_sponsoring_collection() -> Weight {191		(12_453_000 as Weight)192			.saturating_add(RocksDbWeight::get().reads(2 as Weight))193			.saturating_add(RocksDbWeight::get().writes(1 as Weight))194	}195	// Storage: AppPromotion Admin (r:1 w:0)196	// Storage: EvmContractHelpers Sponsoring (r:0 w:1)197	fn sponsor_contract() -> Weight {198		(11_952_000 as Weight)199			.saturating_add(RocksDbWeight::get().reads(1 as Weight))200			.saturating_add(RocksDbWeight::get().writes(1 as Weight))201	}202	// Storage: AppPromotion Admin (r:1 w:0)203	// Storage: EvmContractHelpers Sponsoring (r:1 w:1)204	fn stop_sponsoring_contract() -> Weight {205		(12_538_000 as Weight)206			.saturating_add(RocksDbWeight::get().reads(2 as Weight))207			.saturating_add(RocksDbWeight::get().writes(1 as Weight))208	}209}