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

difftreelog

source

pallets/nonfungible/src/weights.rs8.4 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 create_multiple_items_ex(b: u32, ) -> Weight;38	fn burn_item() -> Weight;39	fn transfer() -> Weight;40	fn approve() -> Weight;41	fn transfer_from() -> Weight;42	fn burn_from() -> Weight;43	fn set_variable_metadata(b: u32, ) -> Weight;44}4546/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.47pub struct SubstrateWeight<T>(PhantomData<T>);48impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {49	// Storage: Nonfungible TokensMinted (r:1 w:1)50	// Storage: Nonfungible AccountBalance (r:1 w:1)51	// Storage: Nonfungible TokenData (r:0 w:1)52	// Storage: Nonfungible Owned (r:0 w:1)53	fn create_item() -> Weight {54		(16_902_000 as Weight)55			.saturating_add(T::DbWeight::get().reads(2 as Weight))56			.saturating_add(T::DbWeight::get().writes(4 as Weight))57	}58	// Storage: Nonfungible TokensMinted (r:1 w:1)59	// Storage: Nonfungible AccountBalance (r:1 w:1)60	// Storage: Nonfungible TokenData (r:0 w:4)61	// Storage: Nonfungible Owned (r:0 w:4)62	fn create_multiple_items(b: u32, ) -> Weight {63		(15_860_000 as Weight)64			// Standard Error: 5_00065			.saturating_add((3_916_000 as Weight).saturating_mul(b as Weight))66			.saturating_add(T::DbWeight::get().reads(2 as Weight))67			.saturating_add(T::DbWeight::get().writes(2 as Weight))68			.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))69	}70	// Storage: Nonfungible TokensMinted (r:1 w:1)71	// Storage: Nonfungible AccountBalance (r:4 w:4)72	// Storage: Nonfungible TokenData (r:0 w:4)73	// Storage: Nonfungible Owned (r:0 w:4)74	fn create_multiple_items_ex(b: u32, ) -> Weight {75		(2_090_000 as Weight)76			// Standard Error: 10_00077			.saturating_add((9_230_000 as Weight).saturating_mul(b as Weight))78			.saturating_add(T::DbWeight::get().reads(1 as Weight))79			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))80			.saturating_add(T::DbWeight::get().writes(1 as Weight))81			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))82	}83	// Storage: Nonfungible TokenData (r:1 w:1)84	// Storage: Nonfungible TokensBurnt (r:1 w:1)85	// Storage: Nonfungible Allowance (r:1 w:0)86	// Storage: Nonfungible Owned (r:0 w:1)87	fn burn_item() -> Weight {88		(17_966_000 as Weight)89			.saturating_add(T::DbWeight::get().reads(3 as Weight))90			.saturating_add(T::DbWeight::get().writes(3 as Weight))91	}92	// Storage: Nonfungible TokenData (r:1 w:1)93	// Storage: Nonfungible AccountBalance (r:2 w:2)94	// Storage: Nonfungible Allowance (r:1 w:0)95	// Storage: Nonfungible Owned (r:0 w:2)96	fn transfer() -> Weight {97		(23_886_000 as Weight)98			.saturating_add(T::DbWeight::get().reads(4 as Weight))99			.saturating_add(T::DbWeight::get().writes(5 as Weight))100	}101	// Storage: Nonfungible TokenData (r:1 w:0)102	// Storage: Nonfungible Allowance (r:1 w:1)103	fn approve() -> Weight {104		(14_697_000 as Weight)105			.saturating_add(T::DbWeight::get().reads(2 as Weight))106			.saturating_add(T::DbWeight::get().writes(1 as Weight))107	}108	// Storage: Nonfungible Allowance (r:1 w:1)109	// Storage: Nonfungible TokenData (r:1 w:1)110	// Storage: Nonfungible AccountBalance (r:2 w:2)111	// Storage: Nonfungible Owned (r:0 w:2)112	fn transfer_from() -> Weight {113		(28_001_000 as Weight)114			.saturating_add(T::DbWeight::get().reads(4 as Weight))115			.saturating_add(T::DbWeight::get().writes(6 as Weight))116	}117	// Storage: Nonfungible Allowance (r:1 w:1)118	// Storage: Nonfungible TokenData (r:1 w:1)119	// Storage: Nonfungible TokensBurnt (r:1 w:1)120	// Storage: Nonfungible Owned (r:0 w:1)121	fn burn_from() -> Weight {122		(53_429_000 as Weight)123			.saturating_add(T::DbWeight::get().reads(3 as Weight))124			.saturating_add(T::DbWeight::get().writes(4 as Weight))125	}126	// Storage: Nonfungible TokenData (r:1 w:1)127	fn set_variable_metadata(_b: u32, ) -> Weight {128		(6_380_000 as Weight)129			.saturating_add(T::DbWeight::get().reads(1 as Weight))130			.saturating_add(T::DbWeight::get().writes(1 as Weight))131	}132}133134// For backwards compatibility and tests135impl WeightInfo for () {136	// Storage: Nonfungible TokensMinted (r:1 w:1)137	// Storage: Nonfungible AccountBalance (r:1 w:1)138	// Storage: Nonfungible TokenData (r:0 w:1)139	// Storage: Nonfungible Owned (r:0 w:1)140	fn create_item() -> Weight {141		(16_902_000 as Weight)142			.saturating_add(RocksDbWeight::get().reads(2 as Weight))143			.saturating_add(RocksDbWeight::get().writes(4 as Weight))144	}145	// Storage: Nonfungible TokensMinted (r:1 w:1)146	// Storage: Nonfungible AccountBalance (r:1 w:1)147	// Storage: Nonfungible TokenData (r:0 w:4)148	// Storage: Nonfungible Owned (r:0 w:4)149	fn create_multiple_items(b: u32, ) -> Weight {150		(15_860_000 as Weight)151			// Standard Error: 5_000152			.saturating_add((3_916_000 as Weight).saturating_mul(b as Weight))153			.saturating_add(RocksDbWeight::get().reads(2 as Weight))154			.saturating_add(RocksDbWeight::get().writes(2 as Weight))155			.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))156	}157	// Storage: Nonfungible TokensMinted (r:1 w:1)158	// Storage: Nonfungible AccountBalance (r:4 w:4)159	// Storage: Nonfungible TokenData (r:0 w:4)160	// Storage: Nonfungible Owned (r:0 w:4)161	fn create_multiple_items_ex(b: u32, ) -> Weight {162		(2_090_000 as Weight)163			// Standard Error: 10_000164			.saturating_add((9_230_000 as Weight).saturating_mul(b as Weight))165			.saturating_add(RocksDbWeight::get().reads(1 as Weight))166			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))167			.saturating_add(RocksDbWeight::get().writes(1 as Weight))168			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))169	}170	// Storage: Nonfungible TokenData (r:1 w:1)171	// Storage: Nonfungible TokensBurnt (r:1 w:1)172	// Storage: Nonfungible Allowance (r:1 w:0)173	// Storage: Nonfungible Owned (r:0 w:1)174	fn burn_item() -> Weight {175		(17_966_000 as Weight)176			.saturating_add(RocksDbWeight::get().reads(3 as Weight))177			.saturating_add(RocksDbWeight::get().writes(3 as Weight))178	}179	// Storage: Nonfungible TokenData (r:1 w:1)180	// Storage: Nonfungible AccountBalance (r:2 w:2)181	// Storage: Nonfungible Allowance (r:1 w:0)182	// Storage: Nonfungible Owned (r:0 w:2)183	fn transfer() -> Weight {184		(23_886_000 as Weight)185			.saturating_add(RocksDbWeight::get().reads(4 as Weight))186			.saturating_add(RocksDbWeight::get().writes(5 as Weight))187	}188	// Storage: Nonfungible TokenData (r:1 w:0)189	// Storage: Nonfungible Allowance (r:1 w:1)190	fn approve() -> Weight {191		(14_697_000 as Weight)192			.saturating_add(RocksDbWeight::get().reads(2 as Weight))193			.saturating_add(RocksDbWeight::get().writes(1 as Weight))194	}195	// Storage: Nonfungible Allowance (r:1 w:1)196	// Storage: Nonfungible TokenData (r:1 w:1)197	// Storage: Nonfungible AccountBalance (r:2 w:2)198	// Storage: Nonfungible Owned (r:0 w:2)199	fn transfer_from() -> Weight {200		(28_001_000 as Weight)201			.saturating_add(RocksDbWeight::get().reads(4 as Weight))202			.saturating_add(RocksDbWeight::get().writes(6 as Weight))203	}204	// Storage: Nonfungible Allowance (r:1 w:1)205	// Storage: Nonfungible TokenData (r:1 w:1)206	// Storage: Nonfungible TokensBurnt (r:1 w:1)207	// Storage: Nonfungible Owned (r:0 w:1)208	fn burn_from() -> Weight {209		(53_429_000 as Weight)210			.saturating_add(RocksDbWeight::get().reads(3 as Weight))211			.saturating_add(RocksDbWeight::get().writes(4 as Weight))212	}213	// Storage: Nonfungible TokenData (r:1 w:1)214	fn set_variable_metadata(_b: u32, ) -> Weight {215		(6_380_000 as Weight)216			.saturating_add(RocksDbWeight::get().reads(1 as Weight))217			.saturating_add(RocksDbWeight::get().writes(1 as Weight))218	}219}