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

difftreelog

source

pallets/nonfungible/src/weights.rs8.8 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: 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-nonfungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=20022// --heap-pages=409623// --output=./pallets/nonfungible/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_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 set_property() -> Weight;40	fn transfer() -> Weight;41	fn approve() -> Weight;42	fn transfer_from() -> Weight;43	fn burn_from() -> Weight;44	fn set_variable_metadata(b: u32, ) -> Weight;45}4647/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.48pub struct SubstrateWeight<T>(PhantomData<T>);49impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {50	// Storage: Nonfungible TokensMinted (r:1 w:1)51	// Storage: Nonfungible AccountBalance (r:1 w:1)52	// Storage: Nonfungible TokenData (r:0 w:1)53	// Storage: Nonfungible Owned (r:0 w:1)54	fn create_item() -> Weight {55		(18_450_000 as Weight)56			.saturating_add(T::DbWeight::get().reads(2 as Weight))57			.saturating_add(T::DbWeight::get().writes(4 as Weight))58	}59	// Storage: Nonfungible TokensMinted (r:1 w:1)60	// Storage: Nonfungible AccountBalance (r:1 w:1)61	// Storage: Nonfungible TokenData (r:0 w:4)62	// Storage: Nonfungible Owned (r:0 w:4)63	fn create_multiple_items(b: u32, ) -> Weight {64		(10_228_000 as Weight)65			// Standard Error: 1_00066			.saturating_add((4_392_000 as Weight).saturating_mul(b as Weight))67			.saturating_add(T::DbWeight::get().reads(2 as Weight))68			.saturating_add(T::DbWeight::get().writes(2 as Weight))69			.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))70	}71	// Storage: Nonfungible TokensMinted (r:1 w:1)72	// Storage: Nonfungible AccountBalance (r:4 w:4)73	// Storage: Nonfungible TokenData (r:0 w:4)74	// Storage: Nonfungible Owned (r:0 w:4)75	fn create_multiple_items_ex(b: u32, ) -> Weight {76		(6_543_000 as Weight)77			// Standard Error: 2_00078			.saturating_add((7_175_000 as Weight).saturating_mul(b as Weight))79			.saturating_add(T::DbWeight::get().reads(1 as Weight))80			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))81			.saturating_add(T::DbWeight::get().writes(1 as Weight))82			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))83	}84	// Storage: Nonfungible TokenData (r:1 w:1)85	// Storage: Nonfungible TokensBurnt (r:1 w:1)86	// Storage: Nonfungible AccountBalance (r:1 w:1)87	// Storage: Nonfungible Allowance (r:1 w:0)88	// Storage: Nonfungible Owned (r:0 w:1)89	fn burn_item() -> Weight {90		(24_554_000 as Weight)91			.saturating_add(T::DbWeight::get().reads(4 as Weight))92			.saturating_add(T::DbWeight::get().writes(4 as Weight))93	}9495	fn set_property() -> Weight {96		// TODO calculate appropriate weight97		50_000_000 as Weight98	}99100	// Storage: Nonfungible TokenData (r:1 w:1)101	// Storage: Nonfungible AccountBalance (r:2 w:2)102	// Storage: Nonfungible Allowance (r:1 w:0)103	// Storage: Nonfungible Owned (r:0 w:2)104	fn transfer() -> Weight {105		(28_339_000 as Weight)106			.saturating_add(T::DbWeight::get().reads(4 as Weight))107			.saturating_add(T::DbWeight::get().writes(5 as Weight))108	}109	// Storage: Nonfungible TokenData (r:1 w:0)110	// Storage: Nonfungible Allowance (r:1 w:1)111	fn approve() -> Weight {112		(17_616_000 as Weight)113			.saturating_add(T::DbWeight::get().reads(2 as Weight))114			.saturating_add(T::DbWeight::get().writes(1 as Weight))115	}116	// Storage: Nonfungible Allowance (r:1 w:1)117	// Storage: Nonfungible TokenData (r:1 w:1)118	// Storage: Nonfungible AccountBalance (r:2 w:2)119	// Storage: Nonfungible Owned (r:0 w:2)120	fn transfer_from() -> Weight {121		(32_196_000 as Weight)122			.saturating_add(T::DbWeight::get().reads(4 as Weight))123			.saturating_add(T::DbWeight::get().writes(6 as Weight))124	}125	// Storage: Nonfungible Allowance (r:1 w:1)126	// Storage: Nonfungible TokenData (r:1 w:1)127	// Storage: Nonfungible TokensBurnt (r:1 w:1)128	// Storage: Nonfungible AccountBalance (r:1 w:1)129	// Storage: Nonfungible Owned (r:0 w:1)130	fn burn_from() -> Weight {131		(27_580_000 as Weight)132			.saturating_add(T::DbWeight::get().reads(4 as Weight))133			.saturating_add(T::DbWeight::get().writes(5 as Weight))134	}135	// Storage: Nonfungible TokenData (r:1 w:1)136	fn set_variable_metadata(_b: u32, ) -> Weight {137		(7_700_000 as Weight)138			.saturating_add(T::DbWeight::get().reads(1 as Weight))139			.saturating_add(T::DbWeight::get().writes(1 as Weight))140	}141}142143// For backwards compatibility and tests144impl WeightInfo for () {145	// Storage: Nonfungible TokensMinted (r:1 w:1)146	// Storage: Nonfungible AccountBalance (r:1 w:1)147	// Storage: Nonfungible TokenData (r:0 w:1)148	// Storage: Nonfungible Owned (r:0 w:1)149	fn create_item() -> Weight {150		(18_450_000 as Weight)151			.saturating_add(RocksDbWeight::get().reads(2 as Weight))152			.saturating_add(RocksDbWeight::get().writes(4 as Weight))153	}154	// Storage: Nonfungible TokensMinted (r:1 w:1)155	// Storage: Nonfungible AccountBalance (r:1 w:1)156	// Storage: Nonfungible TokenData (r:0 w:4)157	// Storage: Nonfungible Owned (r:0 w:4)158	fn create_multiple_items(b: u32, ) -> Weight {159		(10_228_000 as Weight)160			// Standard Error: 1_000161			.saturating_add((4_392_000 as Weight).saturating_mul(b as Weight))162			.saturating_add(RocksDbWeight::get().reads(2 as Weight))163			.saturating_add(RocksDbWeight::get().writes(2 as Weight))164			.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))165	}166	// Storage: Nonfungible TokensMinted (r:1 w:1)167	// Storage: Nonfungible AccountBalance (r:4 w:4)168	// Storage: Nonfungible TokenData (r:0 w:4)169	// Storage: Nonfungible Owned (r:0 w:4)170	fn create_multiple_items_ex(b: u32, ) -> Weight {171		(6_543_000 as Weight)172			// Standard Error: 2_000173			.saturating_add((7_175_000 as Weight).saturating_mul(b as Weight))174			.saturating_add(RocksDbWeight::get().reads(1 as Weight))175			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))176			.saturating_add(RocksDbWeight::get().writes(1 as Weight))177			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))178	}179	// Storage: Nonfungible TokenData (r:1 w:1)180	// Storage: Nonfungible TokensBurnt (r:1 w:1)181	// Storage: Nonfungible AccountBalance (r:1 w:1)182	// Storage: Nonfungible Allowance (r:1 w:0)183	// Storage: Nonfungible Owned (r:0 w:1)184	fn burn_item() -> Weight {185		(24_554_000 as Weight)186			.saturating_add(RocksDbWeight::get().reads(4 as Weight))187			.saturating_add(RocksDbWeight::get().writes(4 as Weight))188	}189190	fn set_property() -> Weight {191		// TODO calculate appropriate weight192		50_000_000 as Weight193	}194195	// Storage: Nonfungible TokenData (r:1 w:1)196	// Storage: Nonfungible AccountBalance (r:2 w:2)197	// Storage: Nonfungible Allowance (r:1 w:0)198	// Storage: Nonfungible Owned (r:0 w:2)199	fn transfer() -> Weight {200		(28_339_000 as Weight)201			.saturating_add(RocksDbWeight::get().reads(4 as Weight))202			.saturating_add(RocksDbWeight::get().writes(5 as Weight))203	}204	// Storage: Nonfungible TokenData (r:1 w:0)205	// Storage: Nonfungible Allowance (r:1 w:1)206	fn approve() -> Weight {207		(17_616_000 as Weight)208			.saturating_add(RocksDbWeight::get().reads(2 as Weight))209			.saturating_add(RocksDbWeight::get().writes(1 as Weight))210	}211	// Storage: Nonfungible Allowance (r:1 w:1)212	// Storage: Nonfungible TokenData (r:1 w:1)213	// Storage: Nonfungible AccountBalance (r:2 w:2)214	// Storage: Nonfungible Owned (r:0 w:2)215	fn transfer_from() -> Weight {216		(32_196_000 as Weight)217			.saturating_add(RocksDbWeight::get().reads(4 as Weight))218			.saturating_add(RocksDbWeight::get().writes(6 as Weight))219	}220	// Storage: Nonfungible Allowance (r:1 w:1)221	// Storage: Nonfungible TokenData (r:1 w:1)222	// Storage: Nonfungible TokensBurnt (r:1 w:1)223	// Storage: Nonfungible AccountBalance (r:1 w:1)224	// Storage: Nonfungible Owned (r:0 w:1)225	fn burn_from() -> Weight {226		(27_580_000 as Weight)227			.saturating_add(RocksDbWeight::get().reads(4 as Weight))228			.saturating_add(RocksDbWeight::get().writes(5 as Weight))229	}230	// Storage: Nonfungible TokenData (r:1 w:1)231	fn set_variable_metadata(_b: u32, ) -> Weight {232		(7_700_000 as Weight)233			.saturating_add(RocksDbWeight::get().reads(1 as Weight))234			.saturating_add(RocksDbWeight::get().writes(1 as Weight))235	}236}