git.delta.rocks / unique-network / refs/commits / 123bef5c2f2c

difftreelog

source

pallets/app-promotion/src/weights.rs6.4 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-01, 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() -> 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: Promotion Admin (r:0 w:1)51	fn set_admin_address() -> Weight {52		(515_000 as Weight)53			.saturating_add(T::DbWeight::get().writes(1 as Weight))54	}55	// Storage: Promotion Admin (r:1 w:0)56	// Storage: ParachainSystem ValidationData (r:1 w:0)57	// Storage: Promotion NextCalculatedRecord (r:1 w:1)58	// Storage: Promotion Staked (r:2 w:0)59	fn payout_stakers() -> Weight {60		(8_475_000 as Weight)61			.saturating_add(T::DbWeight::get().reads(5 as Weight))62			.saturating_add(T::DbWeight::get().writes(1 as Weight))63	}64	// Storage: System Account (r:1 w:1)65	// Storage: Promotion StakesPerAccount (r:1 w:1)66	// Storage: Balances Locks (r:1 w:1)67	// Storage: ParachainSystem ValidationData (r:1 w:0)68	// Storage: Promotion Staked (r:1 w:1)69	// Storage: Promotion TotalStaked (r:1 w:1)70	fn stake() -> Weight {71		(12_266_000 as Weight)72			.saturating_add(T::DbWeight::get().reads(6 as Weight))73			.saturating_add(T::DbWeight::get().writes(5 as Weight))74	}75	// Storage: Promotion Staked (r:2 w:1)76	// Storage: ParachainSystem ValidationData (r:1 w:0)77	// Storage: Promotion PendingUnstake (r:1 w:1)78	// Storage: Promotion TotalStaked (r:1 w:1)79	// Storage: Promotion StakesPerAccount (r:0 w:1)80	fn unstake() -> Weight {81		(10_663_000 as Weight)82			.saturating_add(T::DbWeight::get().reads(5 as Weight))83			.saturating_add(T::DbWeight::get().writes(4 as Weight))84	}85	// Storage: Promotion Admin (r:1 w:0)86	// Storage: Common CollectionById (r:1 w:1)87	fn sponsor_collection() -> Weight {88		(10_879_000 as Weight)89			.saturating_add(T::DbWeight::get().reads(2 as Weight))90			.saturating_add(T::DbWeight::get().writes(1 as Weight))91	}92	// Storage: Promotion Admin (r:1 w:0)93	// Storage: Common CollectionById (r:1 w:1)94	fn stop_sponsoring_collection() -> Weight {95		(10_548_000 as Weight)96			.saturating_add(T::DbWeight::get().reads(2 as Weight))97			.saturating_add(T::DbWeight::get().writes(1 as Weight))98	}99	// Storage: Promotion Admin (r:1 w:0)100	// Storage: EvmContractHelpers Sponsoring (r:0 w:1)101	fn sponsor_contract() -> Weight {102		(2_130_000 as Weight)103			.saturating_add(T::DbWeight::get().reads(1 as Weight))104			.saturating_add(T::DbWeight::get().writes(1 as Weight))105	}106	// Storage: Promotion Admin (r:1 w:0)107	// Storage: EvmContractHelpers Sponsoring (r:1 w:1)108	fn stop_sponsoring_contract() -> Weight {109		(3_509_000 as Weight)110			.saturating_add(T::DbWeight::get().reads(2 as Weight))111			.saturating_add(T::DbWeight::get().writes(1 as Weight))112	}113}114115// For backwards compatibility and tests116impl WeightInfo for () {117	// Storage: Promotion Admin (r:0 w:1)118	fn set_admin_address() -> Weight {119		(515_000 as Weight)120			.saturating_add(RocksDbWeight::get().writes(1 as Weight))121	}122	// Storage: Promotion Admin (r:1 w:0)123	// Storage: ParachainSystem ValidationData (r:1 w:0)124	// Storage: Promotion NextCalculatedRecord (r:1 w:1)125	// Storage: Promotion Staked (r:2 w:0)126	fn payout_stakers() -> Weight {127		(8_475_000 as Weight)128			.saturating_add(RocksDbWeight::get().reads(5 as Weight))129			.saturating_add(RocksDbWeight::get().writes(1 as Weight))130	}131	// Storage: System Account (r:1 w:1)132	// Storage: Promotion StakesPerAccount (r:1 w:1)133	// Storage: Balances Locks (r:1 w:1)134	// Storage: ParachainSystem ValidationData (r:1 w:0)135	// Storage: Promotion Staked (r:1 w:1)136	// Storage: Promotion TotalStaked (r:1 w:1)137	fn stake() -> Weight {138		(12_266_000 as Weight)139			.saturating_add(RocksDbWeight::get().reads(6 as Weight))140			.saturating_add(RocksDbWeight::get().writes(5 as Weight))141	}142	// Storage: Promotion Staked (r:2 w:1)143	// Storage: ParachainSystem ValidationData (r:1 w:0)144	// Storage: Promotion PendingUnstake (r:1 w:1)145	// Storage: Promotion TotalStaked (r:1 w:1)146	// Storage: Promotion StakesPerAccount (r:0 w:1)147	fn unstake() -> Weight {148		(10_663_000 as Weight)149			.saturating_add(RocksDbWeight::get().reads(5 as Weight))150			.saturating_add(RocksDbWeight::get().writes(4 as Weight))151	}152	// Storage: Promotion Admin (r:1 w:0)153	// Storage: Common CollectionById (r:1 w:1)154	fn sponsor_collection() -> Weight {155		(10_879_000 as Weight)156			.saturating_add(RocksDbWeight::get().reads(2 as Weight))157			.saturating_add(RocksDbWeight::get().writes(1 as Weight))158	}159	// Storage: Promotion Admin (r:1 w:0)160	// Storage: Common CollectionById (r:1 w:1)161	fn stop_sponsoring_collection() -> Weight {162		(10_548_000 as Weight)163			.saturating_add(RocksDbWeight::get().reads(2 as Weight))164			.saturating_add(RocksDbWeight::get().writes(1 as Weight))165	}166	// Storage: Promotion Admin (r:1 w:0)167	// Storage: EvmContractHelpers Sponsoring (r:0 w:1)168	fn sponsor_contract() -> Weight {169		(2_130_000 as Weight)170			.saturating_add(RocksDbWeight::get().reads(1 as Weight))171			.saturating_add(RocksDbWeight::get().writes(1 as Weight))172	}173	// Storage: Promotion Admin (r:1 w:0)174	// Storage: EvmContractHelpers Sponsoring (r:1 w:1)175	fn stop_sponsoring_contract() -> Weight {176		(3_509_000 as Weight)177			.saturating_add(RocksDbWeight::get().reads(2 as Weight))178			.saturating_add(RocksDbWeight::get().writes(1 as Weight))179	}180}