git.delta.rocks / unique-network / refs/commits / 9322aa344eaa

difftreelog

source

pallets/fungible/src/weights.rs6.0 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: 2022-03-01, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// --pallet13// pallet-fungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=20022// --heap-pages=409623// --output=./pallets/fungible/src/weights.rs2425#![cfg_attr(rustfmt, rustfmt_skip)]26#![allow(unused_parens)]27#![allow(unused_imports)]28#![allow(clippy::unnecessary_cast)]2930use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};31use sp_std::marker::PhantomData;3233/// Weight functions needed for pallet_fungible.34pub trait WeightInfo {35	fn create_item() -> Weight;36	fn create_multiple_items_ex(b: u32, ) -> Weight;37	fn burn_item() -> Weight;38	fn change_collection_properties(amount: u32) -> Weight;39	fn change_token_properties(amount: u32) -> Weight;40	fn transfer() -> Weight;41	fn approve() -> Weight;42	fn transfer_from() -> Weight;43	fn burn_from() -> Weight;44}4546/// Weights for pallet_fungible using the Substrate node and recommended hardware.47pub struct SubstrateWeight<T>(PhantomData<T>);48impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {49	// Storage: Fungible TotalSupply (r:1 w:1)50	// Storage: Fungible Balance (r:1 w:1)51	fn create_item() -> Weight {52		(14_407_000 as Weight)53			.saturating_add(T::DbWeight::get().reads(2 as Weight))54			.saturating_add(T::DbWeight::get().writes(2 as Weight))55	}56	// Storage: Fungible TotalSupply (r:1 w:1)57	// Storage: Fungible Balance (r:4 w:4)58	fn create_multiple_items_ex(b: u32, ) -> Weight {59		(13_030_000 as Weight)60			// Standard Error: 1_00061			.saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))62			.saturating_add(T::DbWeight::get().reads(1 as Weight))63			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))64			.saturating_add(T::DbWeight::get().writes(1 as Weight))65			.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))66	}67	// Storage: Fungible TotalSupply (r:1 w:1)68	// Storage: Fungible Balance (r:1 w:1)69	fn burn_item() -> Weight {70		(15_565_000 as Weight)71			.saturating_add(T::DbWeight::get().reads(2 as Weight))72			.saturating_add(T::DbWeight::get().writes(2 as Weight))73	}7475	fn change_collection_properties(amount: u32) -> Weight {76		// Error77		078	}7980	fn change_token_properties(amount: u32) -> Weight {81		// Error82		083	}8485	// Storage: Fungible Balance (r:2 w:2)86	fn transfer() -> Weight {87		(17_713_000 as Weight)88			.saturating_add(T::DbWeight::get().reads(2 as Weight))89			.saturating_add(T::DbWeight::get().writes(2 as Weight))90	}91	// Storage: Fungible Balance (r:1 w:0)92	// Storage: Fungible Allowance (r:0 w:1)93	fn approve() -> Weight {94		(14_834_000 as Weight)95			.saturating_add(T::DbWeight::get().reads(1 as Weight))96			.saturating_add(T::DbWeight::get().writes(1 as Weight))97	}98	// Storage: Fungible Allowance (r:1 w:1)99	// Storage: Fungible Balance (r:2 w:2)100	fn transfer_from() -> Weight {101		(25_189_000 as Weight)102			.saturating_add(T::DbWeight::get().reads(3 as Weight))103			.saturating_add(T::DbWeight::get().writes(3 as Weight))104	}105	// Storage: Fungible Allowance (r:1 w:1)106	// Storage: Fungible TotalSupply (r:1 w:1)107	// Storage: Fungible Balance (r:1 w:1)108	fn burn_from() -> Weight {109		(24_065_000 as Weight)110			.saturating_add(T::DbWeight::get().reads(3 as Weight))111			.saturating_add(T::DbWeight::get().writes(3 as Weight))112	}113}114115// For backwards compatibility and tests116impl WeightInfo for () {117	// Storage: Fungible TotalSupply (r:1 w:1)118	// Storage: Fungible Balance (r:1 w:1)119	fn create_item() -> Weight {120		(14_407_000 as Weight)121			.saturating_add(RocksDbWeight::get().reads(2 as Weight))122			.saturating_add(RocksDbWeight::get().writes(2 as Weight))123	}124	// Storage: Fungible TotalSupply (r:1 w:1)125	// Storage: Fungible Balance (r:4 w:4)126	fn create_multiple_items_ex(b: u32, ) -> Weight {127		(13_030_000 as Weight)128			// Standard Error: 1_000129			.saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))130			.saturating_add(RocksDbWeight::get().reads(1 as Weight))131			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))132			.saturating_add(RocksDbWeight::get().writes(1 as Weight))133			.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))134	}135	// Storage: Fungible TotalSupply (r:1 w:1)136	// Storage: Fungible Balance (r:1 w:1)137	fn burn_item() -> Weight {138		(15_565_000 as Weight)139			.saturating_add(RocksDbWeight::get().reads(2 as Weight))140			.saturating_add(RocksDbWeight::get().writes(2 as Weight))141	}142143	fn change_collection_properties(amount: u32) -> Weight {144		// Error145		0146	}147148	fn change_token_properties(amount: u32) -> Weight {149		// Error150		0151	}152153	// Storage: Fungible Balance (r:2 w:2)154	fn transfer() -> Weight {155		(17_713_000 as Weight)156			.saturating_add(RocksDbWeight::get().reads(2 as Weight))157			.saturating_add(RocksDbWeight::get().writes(2 as Weight))158	}159	// Storage: Fungible Balance (r:1 w:0)160	// Storage: Fungible Allowance (r:0 w:1)161	fn approve() -> Weight {162		(14_834_000 as Weight)163			.saturating_add(RocksDbWeight::get().reads(1 as Weight))164			.saturating_add(RocksDbWeight::get().writes(1 as Weight))165	}166	// Storage: Fungible Allowance (r:1 w:1)167	// Storage: Fungible Balance (r:2 w:2)168	fn transfer_from() -> Weight {169		(25_189_000 as Weight)170			.saturating_add(RocksDbWeight::get().reads(3 as Weight))171			.saturating_add(RocksDbWeight::get().writes(3 as Weight))172	}173	// Storage: Fungible Allowance (r:1 w:1)174	// Storage: Fungible TotalSupply (r:1 w:1)175	// Storage: Fungible Balance (r:1 w:1)176	fn burn_from() -> Weight {177		(24_065_000 as Weight)178			.saturating_add(RocksDbWeight::get().reads(3 as Weight))179			.saturating_add(RocksDbWeight::get().writes(3 as Weight))180	}181}