git.delta.rocks / unique-network / refs/commits / 6ac8e66dbab7

difftreelog

source

pallets/fungible/src/weights.rs6.6 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 set_collection_properties(amount: u32) -> Weight;39	fn delete_collection_properties(amount: u32) -> Weight;40	fn set_token_properties(amount: u32) -> Weight;41	fn delete_token_properties(amount: u32) -> Weight;42	fn set_property_permissions(amount: u32) -> Weight;43	fn transfer() -> Weight;44	fn approve() -> Weight;45	fn transfer_from() -> Weight;46	fn burn_from() -> Weight;47}4849/// Weights for pallet_fungible using the Substrate node and recommended hardware.50pub struct SubstrateWeight<T>(PhantomData<T>);51impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {52	// Storage: Fungible TotalSupply (r:1 w:1)53	// Storage: Fungible Balance (r:1 w:1)54	fn create_item() -> Weight {55		(14_407_000 as Weight)56			.saturating_add(T::DbWeight::get().reads(2 as Weight))57			.saturating_add(T::DbWeight::get().writes(2 as Weight))58	}59	// Storage: Fungible TotalSupply (r:1 w:1)60	// Storage: Fungible Balance (r:4 w:4)61	fn create_multiple_items_ex(b: u32, ) -> Weight {62		(13_030_000 as Weight)63			// Standard Error: 1_00064			.saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))65			.saturating_add(T::DbWeight::get().reads(1 as Weight))66			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))67			.saturating_add(T::DbWeight::get().writes(1 as Weight))68			.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))69	}70	// Storage: Fungible TotalSupply (r:1 w:1)71	// Storage: Fungible Balance (r:1 w:1)72	fn burn_item() -> Weight {73		(15_565_000 as Weight)74			.saturating_add(T::DbWeight::get().reads(2 as Weight))75			.saturating_add(T::DbWeight::get().writes(2 as Weight))76	}7778	fn set_collection_properties(_amount: u32) -> Weight {79		// Error80		081	}8283	fn delete_collection_properties(_amount: u32) -> Weight {84		// Error85		086	}8788	fn set_token_properties(_amount: u32) -> Weight {89		// Error90		091	}9293	fn delete_token_properties(_amount: u32) -> Weight {94		// Error95		096	}9798	fn set_property_permissions(_amount: u32) -> Weight {99		// Error100		0101	}102103	// Storage: Fungible Balance (r:2 w:2)104	fn transfer() -> Weight {105		(17_713_000 as Weight)106			.saturating_add(T::DbWeight::get().reads(2 as Weight))107			.saturating_add(T::DbWeight::get().writes(2 as Weight))108	}109	// Storage: Fungible Balance (r:1 w:0)110	// Storage: Fungible Allowance (r:0 w:1)111	fn approve() -> Weight {112		(14_834_000 as Weight)113			.saturating_add(T::DbWeight::get().reads(1 as Weight))114			.saturating_add(T::DbWeight::get().writes(1 as Weight))115	}116	// Storage: Fungible Allowance (r:1 w:1)117	// Storage: Fungible Balance (r:2 w:2)118	fn transfer_from() -> Weight {119		(25_189_000 as Weight)120			.saturating_add(T::DbWeight::get().reads(3 as Weight))121			.saturating_add(T::DbWeight::get().writes(3 as Weight))122	}123	// Storage: Fungible Allowance (r:1 w:1)124	// Storage: Fungible TotalSupply (r:1 w:1)125	// Storage: Fungible Balance (r:1 w:1)126	fn burn_from() -> Weight {127		(24_065_000 as Weight)128			.saturating_add(T::DbWeight::get().reads(3 as Weight))129			.saturating_add(T::DbWeight::get().writes(3 as Weight))130	}131}132133// For backwards compatibility and tests134impl WeightInfo for () {135	// Storage: Fungible TotalSupply (r:1 w:1)136	// Storage: Fungible Balance (r:1 w:1)137	fn create_item() -> Weight {138		(14_407_000 as Weight)139			.saturating_add(RocksDbWeight::get().reads(2 as Weight))140			.saturating_add(RocksDbWeight::get().writes(2 as Weight))141	}142	// Storage: Fungible TotalSupply (r:1 w:1)143	// Storage: Fungible Balance (r:4 w:4)144	fn create_multiple_items_ex(b: u32, ) -> Weight {145		(13_030_000 as Weight)146			// Standard Error: 1_000147			.saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))148			.saturating_add(RocksDbWeight::get().reads(1 as Weight))149			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))150			.saturating_add(RocksDbWeight::get().writes(1 as Weight))151			.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))152	}153	// Storage: Fungible TotalSupply (r:1 w:1)154	// Storage: Fungible Balance (r:1 w:1)155	fn burn_item() -> Weight {156		(15_565_000 as Weight)157			.saturating_add(RocksDbWeight::get().reads(2 as Weight))158			.saturating_add(RocksDbWeight::get().writes(2 as Weight))159	}160161	fn set_collection_properties(_amount: u32) -> Weight {162		// Error163		0164	}165166	fn delete_collection_properties(_amount: u32) -> Weight {167		// Error168		0169	}170171	fn set_token_properties(_amount: u32) -> Weight {172		// Error173		0174	}175176	fn delete_token_properties(_amount: u32) -> Weight {177		// Error178		0179	}180181	fn set_property_permissions(_amount: u32) -> Weight {182		// Error183		0184	}185186	// Storage: Fungible Balance (r:2 w:2)187	fn transfer() -> Weight {188		(17_713_000 as Weight)189			.saturating_add(RocksDbWeight::get().reads(2 as Weight))190			.saturating_add(RocksDbWeight::get().writes(2 as Weight))191	}192	// Storage: Fungible Balance (r:1 w:0)193	// Storage: Fungible Allowance (r:0 w:1)194	fn approve() -> Weight {195		(14_834_000 as Weight)196			.saturating_add(RocksDbWeight::get().reads(1 as Weight))197			.saturating_add(RocksDbWeight::get().writes(1 as Weight))198	}199	// Storage: Fungible Allowance (r:1 w:1)200	// Storage: Fungible Balance (r:2 w:2)201	fn transfer_from() -> Weight {202		(25_189_000 as Weight)203			.saturating_add(RocksDbWeight::get().reads(3 as Weight))204			.saturating_add(RocksDbWeight::get().writes(3 as Weight))205	}206	// Storage: Fungible Allowance (r:1 w:1)207	// Storage: Fungible TotalSupply (r:1 w:1)208	// Storage: Fungible Balance (r:1 w:1)209	fn burn_from() -> Weight {210		(24_065_000 as Weight)211			.saturating_add(RocksDbWeight::get().reads(3 as Weight))212			.saturating_add(RocksDbWeight::get().writes(3 as Weight))213	}214}