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

difftreelog

source

pallets/nonfungible/src/weights.rs7.1 KiBsourcehistory
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_nonfungible4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2021-10-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 12889// Executed Command:10// target/release/unique-collator11// benchmark12// --pallet13// pallet-nonfungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=2022// --output=./pallets/nonfungible/src/weights.rs232425#![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_nonfungible.34pub trait WeightInfo {35	fn create_item() -> Weight;36	fn create_multiple_items(b: u32, ) -> Weight;37	fn burn_item() -> Weight;38	fn transfer() -> Weight;39	fn approve() -> Weight;40	fn transfer_from() -> Weight;41	fn burn_from() -> Weight;42	fn set_variable_metadata(b: u32, ) -> Weight;43}4445/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.46pub struct SubstrateWeight<T>(PhantomData<T>);47impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {48	// Storage: Nonfungible TokensMinted (r:1 w:1)49	// Storage: Nonfungible AccountBalance (r:1 w:1)50	// Storage: Nonfungible TokenData (r:0 w:1)51	// Storage: Nonfungible Owned (r:0 w:1)52	fn create_item() -> Weight {53		(16_902_000 as Weight)54			.saturating_add(T::DbWeight::get().reads(2 as Weight))55			.saturating_add(T::DbWeight::get().writes(4 as Weight))56	}57	// Storage: Nonfungible TokensMinted (r:1 w:1)58	// Storage: Nonfungible AccountBalance (r:1 w:1)59	// Storage: Nonfungible TokenData (r:0 w:4)60	// Storage: Nonfungible Owned (r:0 w:4)61	fn create_multiple_items(b: u32, ) -> Weight {62		(15_860_000 as Weight)63			// Standard Error: 5_00064			.saturating_add((3_916_000 as Weight).saturating_mul(b as Weight))65			.saturating_add(T::DbWeight::get().reads(2 as Weight))66			.saturating_add(T::DbWeight::get().writes(2 as Weight))67			.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))68	}69	// Storage: Nonfungible TokenData (r:1 w:1)70	// Storage: Nonfungible TokensBurnt (r:1 w:1)71	// Storage: Nonfungible Allowance (r:1 w:0)72	// Storage: Nonfungible Owned (r:0 w:1)73	fn burn_item() -> Weight {74		(17_966_000 as Weight)75			.saturating_add(T::DbWeight::get().reads(3 as Weight))76			.saturating_add(T::DbWeight::get().writes(3 as Weight))77	}78	// Storage: Nonfungible TokenData (r:1 w:1)79	// Storage: Nonfungible AccountBalance (r:2 w:2)80	// Storage: Nonfungible Allowance (r:1 w:0)81	// Storage: Nonfungible Owned (r:0 w:2)82	fn transfer() -> Weight {83		(23_886_000 as Weight)84			.saturating_add(T::DbWeight::get().reads(4 as Weight))85			.saturating_add(T::DbWeight::get().writes(5 as Weight))86	}87	// Storage: Nonfungible TokenData (r:1 w:0)88	// Storage: Nonfungible Allowance (r:1 w:1)89	fn approve() -> Weight {90		(14_697_000 as Weight)91			.saturating_add(T::DbWeight::get().reads(2 as Weight))92			.saturating_add(T::DbWeight::get().writes(1 as Weight))93	}94	// Storage: Nonfungible Allowance (r:1 w:1)95	// Storage: Nonfungible TokenData (r:1 w:1)96	// Storage: Nonfungible AccountBalance (r:2 w:2)97	// Storage: Nonfungible Owned (r:0 w:2)98	fn transfer_from() -> Weight {99		(28_001_000 as Weight)100			.saturating_add(T::DbWeight::get().reads(4 as Weight))101			.saturating_add(T::DbWeight::get().writes(6 as Weight))102	}103	// Storage: Nonfungible Allowance (r:1 w:1)104	// Storage: Nonfungible TokenData (r:1 w:1)105	// Storage: Nonfungible TokensBurnt (r:1 w:1)106	// Storage: Nonfungible Owned (r:0 w:1)107	fn burn_from() -> Weight {108		(53_429_000 as Weight)109			.saturating_add(T::DbWeight::get().reads(3 as Weight))110			.saturating_add(T::DbWeight::get().writes(4 as Weight))111	}112	// Storage: Nonfungible TokenData (r:1 w:1)113	fn set_variable_metadata(_b: u32, ) -> Weight {114		(6_380_000 as Weight)115			.saturating_add(T::DbWeight::get().reads(1 as Weight))116			.saturating_add(T::DbWeight::get().writes(1 as Weight))117	}118}119120// For backwards compatibility and tests121impl WeightInfo for () {122	// Storage: Nonfungible TokensMinted (r:1 w:1)123	// Storage: Nonfungible AccountBalance (r:1 w:1)124	// Storage: Nonfungible TokenData (r:0 w:1)125	// Storage: Nonfungible Owned (r:0 w:1)126	fn create_item() -> Weight {127		(16_902_000 as Weight)128			.saturating_add(RocksDbWeight::get().reads(2 as Weight))129			.saturating_add(RocksDbWeight::get().writes(4 as Weight))130	}131	// Storage: Nonfungible TokensMinted (r:1 w:1)132	// Storage: Nonfungible AccountBalance (r:1 w:1)133	// Storage: Nonfungible TokenData (r:0 w:4)134	// Storage: Nonfungible Owned (r:0 w:4)135	fn create_multiple_items(b: u32, ) -> Weight {136		(15_860_000 as Weight)137			// Standard Error: 5_000138			.saturating_add((3_916_000 as Weight).saturating_mul(b as Weight))139			.saturating_add(RocksDbWeight::get().reads(2 as Weight))140			.saturating_add(RocksDbWeight::get().writes(2 as Weight))141			.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))142	}143	// Storage: Nonfungible TokenData (r:1 w:1)144	// Storage: Nonfungible TokensBurnt (r:1 w:1)145	// Storage: Nonfungible Allowance (r:1 w:0)146	// Storage: Nonfungible Owned (r:0 w:1)147	fn burn_item() -> Weight {148		(17_966_000 as Weight)149			.saturating_add(RocksDbWeight::get().reads(3 as Weight))150			.saturating_add(RocksDbWeight::get().writes(3 as Weight))151	}152	// Storage: Nonfungible TokenData (r:1 w:1)153	// Storage: Nonfungible AccountBalance (r:2 w:2)154	// Storage: Nonfungible Allowance (r:1 w:0)155	// Storage: Nonfungible Owned (r:0 w:2)156	fn transfer() -> Weight {157		(23_886_000 as Weight)158			.saturating_add(RocksDbWeight::get().reads(4 as Weight))159			.saturating_add(RocksDbWeight::get().writes(5 as Weight))160	}161	// Storage: Nonfungible TokenData (r:1 w:0)162	// Storage: Nonfungible Allowance (r:1 w:1)163	fn approve() -> Weight {164		(14_697_000 as Weight)165			.saturating_add(RocksDbWeight::get().reads(2 as Weight))166			.saturating_add(RocksDbWeight::get().writes(1 as Weight))167	}168	// Storage: Nonfungible Allowance (r:1 w:1)169	// Storage: Nonfungible TokenData (r:1 w:1)170	// Storage: Nonfungible AccountBalance (r:2 w:2)171	// Storage: Nonfungible Owned (r:0 w:2)172	fn transfer_from() -> Weight {173		(28_001_000 as Weight)174			.saturating_add(RocksDbWeight::get().reads(4 as Weight))175			.saturating_add(RocksDbWeight::get().writes(6 as Weight))176	}177	// Storage: Nonfungible Allowance (r:1 w:1)178	// Storage: Nonfungible TokenData (r:1 w:1)179	// Storage: Nonfungible TokensBurnt (r:1 w:1)180	// Storage: Nonfungible Owned (r:0 w:1)181	fn burn_from() -> Weight {182		(53_429_000 as Weight)183			.saturating_add(RocksDbWeight::get().reads(3 as Weight))184			.saturating_add(RocksDbWeight::get().writes(4 as Weight))185	}186	// Storage: Nonfungible TokenData (r:1 w:1)187	fn set_variable_metadata(_b: u32, ) -> Weight {188		(6_380_000 as Weight)189			.saturating_add(RocksDbWeight::get().reads(1 as Weight))190			.saturating_add(RocksDbWeight::get().writes(1 as Weight))191	}192}