git.delta.rocks / unique-network / refs/commits / 8ee40ce88da2

difftreelog

source

pallets/fungible/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_fungible4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2023-01-29, 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-fungible15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=8023// --heap-pages=409624// --output=./pallets/fungible/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_fungible.36pub trait WeightInfo {37	fn create_item() -> Weight;38	fn create_multiple_items_ex(b: u32, ) -> Weight;39	fn burn_item() -> Weight;40	fn transfer() -> Weight;41	fn approve() -> Weight;42	fn approve_from() -> Weight;43	fn transfer_from() -> Weight;44	fn burn_from() -> Weight;45}4647/// Weights for pallet_fungible using the Substrate node and recommended hardware.48pub struct SubstrateWeight<T>(PhantomData<T>);49impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {50	// Storage: Fungible TotalSupply (r:1 w:1)51	// Storage: Fungible Balance (r:1 w:1)52	fn create_item() -> Weight {53		Weight::from_ref_time(20_606_000 as u64)54			.saturating_add(T::DbWeight::get().reads(2 as u64))55			.saturating_add(T::DbWeight::get().writes(2 as u64))56	}57	// Storage: Fungible TotalSupply (r:1 w:1)58	// Storage: Fungible Balance (r:4 w:4)59	fn create_multiple_items_ex(b: u32, ) -> Weight {60		Weight::from_ref_time(21_771_237 as u64)61			// Standard Error: 10_20762			.saturating_add(Weight::from_ref_time(3_627_533 as u64).saturating_mul(b as u64))63			.saturating_add(T::DbWeight::get().reads(1 as u64))64			.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))65			.saturating_add(T::DbWeight::get().writes(1 as u64))66			.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64)))67	}68	// Storage: Fungible TotalSupply (r:1 w:1)69	// Storage: Fungible Balance (r:1 w:1)70	fn burn_item() -> Weight {71		Weight::from_ref_time(22_468_000 as u64)72			.saturating_add(T::DbWeight::get().reads(2 as u64))73			.saturating_add(T::DbWeight::get().writes(2 as u64))74	}75	// Storage: Fungible Balance (r:2 w:2)76	fn transfer() -> Weight {77		Weight::from_ref_time(23_377_000 as u64)78			.saturating_add(T::DbWeight::get().reads(2 as u64))79			.saturating_add(T::DbWeight::get().writes(2 as u64))80	}81	// Storage: Fungible Balance (r:1 w:0)82	// Storage: Fungible Allowance (r:0 w:1)83	fn approve() -> Weight {84		Weight::from_ref_time(22_704_000 as u64)85			.saturating_add(T::DbWeight::get().reads(1 as u64))86			.saturating_add(T::DbWeight::get().writes(1 as u64))87	}88	// Storage: Fungible Balance (r:1 w:0)89	// Storage: Fungible Allowance (r:0 w:1)90	fn approve_from() -> Weight {91		Weight::from_ref_time(22_777_000 as u64)92			.saturating_add(T::DbWeight::get().reads(1 as u64))93			.saturating_add(T::DbWeight::get().writes(1 as u64))94	}95	// Storage: Fungible Allowance (r:1 w:1)96	// Storage: Fungible Balance (r:2 w:2)97	fn transfer_from() -> Weight {98		Weight::from_ref_time(32_568_000 as u64)99			.saturating_add(T::DbWeight::get().reads(3 as u64))100			.saturating_add(T::DbWeight::get().writes(3 as u64))101	}102	// Storage: Fungible Allowance (r:1 w:1)103	// Storage: Fungible TotalSupply (r:1 w:1)104	// Storage: Fungible Balance (r:1 w:1)105	fn burn_from() -> Weight {106		Weight::from_ref_time(32_838_000 as u64)107			.saturating_add(T::DbWeight::get().reads(3 as u64))108			.saturating_add(T::DbWeight::get().writes(3 as u64))109	}110}111112// For backwards compatibility and tests113impl WeightInfo for () {114	// Storage: Fungible TotalSupply (r:1 w:1)115	// Storage: Fungible Balance (r:1 w:1)116	fn create_item() -> Weight {117		Weight::from_ref_time(20_606_000 as u64)118			.saturating_add(RocksDbWeight::get().reads(2 as u64))119			.saturating_add(RocksDbWeight::get().writes(2 as u64))120	}121	// Storage: Fungible TotalSupply (r:1 w:1)122	// Storage: Fungible Balance (r:4 w:4)123	fn create_multiple_items_ex(b: u32, ) -> Weight {124		Weight::from_ref_time(21_771_237 as u64)125			// Standard Error: 10_207126			.saturating_add(Weight::from_ref_time(3_627_533 as u64).saturating_mul(b as u64))127			.saturating_add(RocksDbWeight::get().reads(1 as u64))128			.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))129			.saturating_add(RocksDbWeight::get().writes(1 as u64))130			.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(b as u64)))131	}132	// Storage: Fungible TotalSupply (r:1 w:1)133	// Storage: Fungible Balance (r:1 w:1)134	fn burn_item() -> Weight {135		Weight::from_ref_time(22_468_000 as u64)136			.saturating_add(RocksDbWeight::get().reads(2 as u64))137			.saturating_add(RocksDbWeight::get().writes(2 as u64))138	}139	// Storage: Fungible Balance (r:2 w:2)140	fn transfer() -> Weight {141		Weight::from_ref_time(23_377_000 as u64)142			.saturating_add(RocksDbWeight::get().reads(2 as u64))143			.saturating_add(RocksDbWeight::get().writes(2 as u64))144	}145	// Storage: Fungible Balance (r:1 w:0)146	// Storage: Fungible Allowance (r:0 w:1)147	fn approve() -> Weight {148		Weight::from_ref_time(22_704_000 as u64)149			.saturating_add(RocksDbWeight::get().reads(1 as u64))150			.saturating_add(RocksDbWeight::get().writes(1 as u64))151	}152	// Storage: Fungible Balance (r:1 w:0)153	// Storage: Fungible Allowance (r:0 w:1)154	fn approve_from() -> Weight {155		Weight::from_ref_time(22_777_000 as u64)156			.saturating_add(RocksDbWeight::get().reads(1 as u64))157			.saturating_add(RocksDbWeight::get().writes(1 as u64))158	}159	// Storage: Fungible Allowance (r:1 w:1)160	// Storage: Fungible Balance (r:2 w:2)161	fn transfer_from() -> Weight {162		Weight::from_ref_time(32_568_000 as u64)163			.saturating_add(RocksDbWeight::get().reads(3 as u64))164			.saturating_add(RocksDbWeight::get().writes(3 as u64))165	}166	// Storage: Fungible Allowance (r:1 w:1)167	// Storage: Fungible TotalSupply (r:1 w:1)168	// Storage: Fungible Balance (r:1 w:1)169	fn burn_from() -> Weight {170		Weight::from_ref_time(32_838_000 as u64)171			.saturating_add(RocksDbWeight::get().reads(3 as u64))172			.saturating_add(RocksDbWeight::get().writes(3 as u64))173	}174}