git.delta.rocks / unique-network / refs/commits / 1d4e56c36dc5

difftreelog

source

pallets/nonfungible/src/weights.rs14.3 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-08-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// pallet13// --pallet14// pallet-nonfungible15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=8023// --heap-pages=409624// --output=./pallets/nonfungible/src/weights.rs2526#![cfg_attr(rustfmt, rustfmt_skip)]27#![allow(unused_parens)]28#![allow(unused_imports)]29#![allow(clippy::unnecessary_cast)]3031use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};32use sp_std::marker::PhantomData;3334/// Weight functions needed for pallet_nonfungible.35pub trait WeightInfo {36	fn create_item() -> Weight;37	fn create_multiple_items(b: u32, ) -> Weight;38	fn create_multiple_items_ex(b: u32, ) -> Weight;39	fn burn_item() -> Weight;40	fn burn_recursively_self_raw() -> Weight;41	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight;42	fn transfer() -> Weight;43	fn approve() -> Weight;44	fn transfer_from() -> Weight;45	fn burn_from() -> Weight;46	fn set_token_property_permissions(b: u32, ) -> Weight;47	fn set_token_properties(b: u32, ) -> Weight;48	fn delete_token_properties(b: u32, ) -> Weight;49	fn token_owner() -> Weight;50}5152/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.53pub struct SubstrateWeight<T>(PhantomData<T>);54impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {55	// Storage: Nonfungible TokensMinted (r:1 w:1)56	// Storage: Nonfungible AccountBalance (r:1 w:1)57	// Storage: Nonfungible TokenData (r:0 w:1)58	// Storage: Nonfungible Owned (r:0 w:1)59	fn create_item() -> Weight {60		Weight::from_ref_time(25_905_000)61			.saturating_add(T::DbWeight::get().reads(2 as u64))62			.saturating_add(T::DbWeight::get().writes(4 as u64))63	}64	// Storage: Nonfungible TokensMinted (r:1 w:1)65	// Storage: Nonfungible AccountBalance (r:1 w:1)66	// Storage: Nonfungible TokenData (r:0 w:4)67	// Storage: Nonfungible Owned (r:0 w:4)68	fn create_multiple_items(b: u32, ) -> Weight {69		Weight::from_ref_time(24_955_000)70			// Standard Error: 3_00071			.saturating_add(Weight::from_ref_time(5_340_000).saturating_mul(b as u64))72			.saturating_add(T::DbWeight::get().reads(2 as u64))73			.saturating_add(T::DbWeight::get().writes(2 as u64))74			.saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(b as u64)))75	}76	// Storage: Nonfungible TokensMinted (r:1 w:1)77	// Storage: Nonfungible AccountBalance (r:4 w:4)78	// Storage: Nonfungible TokenData (r:0 w:4)79	// Storage: Nonfungible Owned (r:0 w:4)80	fn create_multiple_items_ex(b: u32, ) -> Weight {81		Weight::from_ref_time(13_666_000)82			// Standard Error: 5_00083			.saturating_add(Weight::from_ref_time(8_299_000).saturating_mul(b as u64))84			.saturating_add(T::DbWeight::get().reads(1 as u64))85			.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))86			.saturating_add(T::DbWeight::get().writes(1 as u64))87			.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(b as u64)))88	}89	// Storage: Nonfungible TokenData (r:1 w:1)90	// Storage: Nonfungible TokenChildren (r:1 w:0)91	// Storage: Nonfungible TokensBurnt (r:1 w:1)92	// Storage: Nonfungible AccountBalance (r:1 w:1)93	// Storage: Nonfungible Allowance (r:1 w:0)94	// Storage: Nonfungible Owned (r:0 w:1)95	// Storage: Nonfungible TokenProperties (r:0 w:1)96	fn burn_item() -> Weight {97		Weight::from_ref_time(36_205_000)98			.saturating_add(T::DbWeight::get().reads(5 as u64))99			.saturating_add(T::DbWeight::get().writes(5 as u64))100	}101	// Storage: Nonfungible TokenChildren (r:1 w:0)102	// Storage: Nonfungible TokenData (r:1 w:1)103	// Storage: Nonfungible TokensBurnt (r:1 w:1)104	// Storage: Nonfungible AccountBalance (r:1 w:1)105	// Storage: Nonfungible Allowance (r:1 w:0)106	// Storage: Nonfungible Owned (r:0 w:1)107	// Storage: Nonfungible TokenProperties (r:0 w:1)108	fn burn_recursively_self_raw() -> Weight {109		Weight::from_ref_time(44_550_000)110			.saturating_add(T::DbWeight::get().reads(5 as u64))111			.saturating_add(T::DbWeight::get().writes(5 as u64))112	}113	// Storage: Nonfungible TokenChildren (r:1 w:0)114	// Storage: Nonfungible TokenData (r:1 w:1)115	// Storage: Nonfungible TokensBurnt (r:1 w:1)116	// Storage: Nonfungible AccountBalance (r:1 w:1)117	// Storage: Nonfungible Allowance (r:1 w:0)118	// Storage: Nonfungible Owned (r:0 w:1)119	// Storage: Nonfungible TokenProperties (r:0 w:1)120	// Storage: Common CollectionById (r:1 w:0)121	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {122		(Weight::from_ref_time(0))123			// Standard Error: 1_536_000124			.saturating_add(Weight::from_ref_time(312_125_000).saturating_mul(b as u64))125			.saturating_add(T::DbWeight::get().reads(7 as u64))126			.saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(b as u64)))127			.saturating_add(T::DbWeight::get().writes(6 as u64))128			.saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(b as u64)))129	}130	// Storage: Nonfungible TokenData (r:1 w:1)131	// Storage: Nonfungible AccountBalance (r:2 w:2)132	// Storage: Nonfungible Allowance (r:1 w:0)133	// Storage: Nonfungible Owned (r:0 w:2)134	fn transfer() -> Weight {135		Weight::from_ref_time(31_116_000)136			.saturating_add(T::DbWeight::get().reads(4 as u64))137			.saturating_add(T::DbWeight::get().writes(5 as u64))138	}139	// Storage: Nonfungible TokenData (r:1 w:0)140	// Storage: Nonfungible Allowance (r:1 w:1)141	fn approve() -> Weight {142		Weight::from_ref_time(20_802_000)143			.saturating_add(T::DbWeight::get().reads(2 as u64))144			.saturating_add(T::DbWeight::get().writes(1 as u64))145	}146	// Storage: Nonfungible Allowance (r:1 w:1)147	// Storage: Nonfungible TokenData (r:1 w:1)148	// Storage: Nonfungible AccountBalance (r:2 w:2)149	// Storage: Nonfungible Owned (r:0 w:2)150	fn transfer_from() -> Weight {151		Weight::from_ref_time(36_083_000)152			.saturating_add(T::DbWeight::get().reads(4 as u64))153			.saturating_add(T::DbWeight::get().writes(6 as u64))154	}155	// Storage: Nonfungible Allowance (r:1 w:1)156	// Storage: Nonfungible TokenData (r:1 w:1)157	// Storage: Nonfungible TokenChildren (r:1 w:0)158	// Storage: Nonfungible TokensBurnt (r:1 w:1)159	// Storage: Nonfungible AccountBalance (r:1 w:1)160	// Storage: Nonfungible Owned (r:0 w:1)161	// Storage: Nonfungible TokenProperties (r:0 w:1)162	fn burn_from() -> Weight {163		Weight::from_ref_time(41_781_000)164			.saturating_add(T::DbWeight::get().reads(5 as u64))165			.saturating_add(T::DbWeight::get().writes(6 as u64))166	}167	// Storage: Common CollectionPropertyPermissions (r:1 w:1)168	fn set_token_property_permissions(b: u32, ) -> Weight {169		(Weight::from_ref_time(0))170			// Standard Error: 58_000171			.saturating_add(Weight::from_ref_time(15_705_000).saturating_mul(b as u64))172			.saturating_add(T::DbWeight::get().reads(1 as u64))173			.saturating_add(T::DbWeight::get().writes(1 as u64))174	}175	// Storage: Common CollectionPropertyPermissions (r:1 w:0)176	// Storage: Nonfungible TokenProperties (r:1 w:1)177	fn set_token_properties(b: u32, ) -> Weight {178		(Weight::from_ref_time(0))179			// Standard Error: 3_595_000180			.saturating_add(Weight::from_ref_time(590_344_000).saturating_mul(b as u64))181			.saturating_add(T::DbWeight::get().reads(2 as u64))182			.saturating_add(T::DbWeight::get().writes(1 as u64))183	}184	// Storage: Common CollectionPropertyPermissions (r:1 w:0)185	// Storage: Nonfungible TokenProperties (r:1 w:1)186	fn delete_token_properties(b: u32, ) -> Weight {187		(Weight::from_ref_time(0))188			// Standard Error: 3_664_000189			.saturating_add(Weight::from_ref_time(605_836_000).saturating_mul(b as u64))190			.saturating_add(T::DbWeight::get().reads(2 as u64))191			.saturating_add(T::DbWeight::get().writes(1 as u64))192	}193	// Storage: Nonfungible TokenData (r:1 w:0)194	fn token_owner() -> Weight {195		Weight::from_ref_time(4_366_000)196			.saturating_add(T::DbWeight::get().reads(1 as u64))197	}198}199200// For backwards compatibility and tests201impl WeightInfo for () {202	// Storage: Nonfungible TokensMinted (r:1 w:1)203	// Storage: Nonfungible AccountBalance (r:1 w:1)204	// Storage: Nonfungible TokenData (r:0 w:1)205	// Storage: Nonfungible Owned (r:0 w:1)206	fn create_item() -> Weight {207		Weight::from_ref_time(25_905_000)208			.saturating_add(RocksDbWeight::get().reads(2 as u64))209			.saturating_add(RocksDbWeight::get().writes(4 as u64))210	}211	// Storage: Nonfungible TokensMinted (r:1 w:1)212	// Storage: Nonfungible AccountBalance (r:1 w:1)213	// Storage: Nonfungible TokenData (r:0 w:4)214	// Storage: Nonfungible Owned (r:0 w:4)215	fn create_multiple_items(b: u32, ) -> Weight {216		Weight::from_ref_time(24_955_000)217			// Standard Error: 3_000218			.saturating_add(Weight::from_ref_time(5_340_000).saturating_mul(b as u64))219			.saturating_add(RocksDbWeight::get().reads(2 as u64))220			.saturating_add(RocksDbWeight::get().writes(2 as u64))221			.saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(b as u64)))222	}223	// Storage: Nonfungible TokensMinted (r:1 w:1)224	// Storage: Nonfungible AccountBalance (r:4 w:4)225	// Storage: Nonfungible TokenData (r:0 w:4)226	// Storage: Nonfungible Owned (r:0 w:4)227	fn create_multiple_items_ex(b: u32, ) -> Weight {228		Weight::from_ref_time(13_666_000)229			// Standard Error: 5_000230			.saturating_add(Weight::from_ref_time(8_299_000).saturating_mul(b as u64))231			.saturating_add(RocksDbWeight::get().reads(1 as u64))232			.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))233			.saturating_add(RocksDbWeight::get().writes(1 as u64))234			.saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(b as u64)))235	}236	// Storage: Nonfungible TokenData (r:1 w:1)237	// Storage: Nonfungible TokenChildren (r:1 w:0)238	// Storage: Nonfungible TokensBurnt (r:1 w:1)239	// Storage: Nonfungible AccountBalance (r:1 w:1)240	// Storage: Nonfungible Allowance (r:1 w:0)241	// Storage: Nonfungible Owned (r:0 w:1)242	// Storage: Nonfungible TokenProperties (r:0 w:1)243	fn burn_item() -> Weight {244		Weight::from_ref_time(36_205_000)245			.saturating_add(RocksDbWeight::get().reads(5 as u64))246			.saturating_add(RocksDbWeight::get().writes(5 as u64))247	}248	// Storage: Nonfungible TokenChildren (r:1 w:0)249	// Storage: Nonfungible TokenData (r:1 w:1)250	// Storage: Nonfungible TokensBurnt (r:1 w:1)251	// Storage: Nonfungible AccountBalance (r:1 w:1)252	// Storage: Nonfungible Allowance (r:1 w:0)253	// Storage: Nonfungible Owned (r:0 w:1)254	// Storage: Nonfungible TokenProperties (r:0 w:1)255	fn burn_recursively_self_raw() -> Weight {256		Weight::from_ref_time(44_550_000)257			.saturating_add(RocksDbWeight::get().reads(5 as u64))258			.saturating_add(RocksDbWeight::get().writes(5 as u64))259	}260	// Storage: Nonfungible TokenChildren (r:1 w:0)261	// Storage: Nonfungible TokenData (r:1 w:1)262	// Storage: Nonfungible TokensBurnt (r:1 w:1)263	// Storage: Nonfungible AccountBalance (r:1 w:1)264	// Storage: Nonfungible Allowance (r:1 w:0)265	// Storage: Nonfungible Owned (r:0 w:1)266	// Storage: Nonfungible TokenProperties (r:0 w:1)267	// Storage: Common CollectionById (r:1 w:0)268	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {269		(Weight::from_ref_time(0))270			// Standard Error: 1_536_000271			.saturating_add(Weight::from_ref_time(312_125_000).saturating_mul(b as u64))272			.saturating_add(RocksDbWeight::get().reads(7 as u64))273			.saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(b as u64)))274			.saturating_add(RocksDbWeight::get().writes(6 as u64))275			.saturating_add(RocksDbWeight::get().writes((4 as u64).saturating_mul(b as u64)))276	}277	// Storage: Nonfungible TokenData (r:1 w:1)278	// Storage: Nonfungible AccountBalance (r:2 w:2)279	// Storage: Nonfungible Allowance (r:1 w:0)280	// Storage: Nonfungible Owned (r:0 w:2)281	fn transfer() -> Weight {282		Weight::from_ref_time(31_116_000)283			.saturating_add(RocksDbWeight::get().reads(4 as u64))284			.saturating_add(RocksDbWeight::get().writes(5 as u64))285	}286	// Storage: Nonfungible TokenData (r:1 w:0)287	// Storage: Nonfungible Allowance (r:1 w:1)288	fn approve() -> Weight {289		Weight::from_ref_time(20_802_000)290			.saturating_add(RocksDbWeight::get().reads(2 as u64))291			.saturating_add(RocksDbWeight::get().writes(1 as u64))292	}293	// Storage: Nonfungible Allowance (r:1 w:1)294	// Storage: Nonfungible TokenData (r:1 w:1)295	// Storage: Nonfungible AccountBalance (r:2 w:2)296	// Storage: Nonfungible Owned (r:0 w:2)297	fn transfer_from() -> Weight {298		Weight::from_ref_time(36_083_000)299			.saturating_add(RocksDbWeight::get().reads(4 as u64))300			.saturating_add(RocksDbWeight::get().writes(6 as u64))301	}302	// Storage: Nonfungible Allowance (r:1 w:1)303	// Storage: Nonfungible TokenData (r:1 w:1)304	// Storage: Nonfungible TokenChildren (r:1 w:0)305	// Storage: Nonfungible TokensBurnt (r:1 w:1)306	// Storage: Nonfungible AccountBalance (r:1 w:1)307	// Storage: Nonfungible Owned (r:0 w:1)308	// Storage: Nonfungible TokenProperties (r:0 w:1)309	fn burn_from() -> Weight {310		Weight::from_ref_time(41_781_000)311			.saturating_add(RocksDbWeight::get().reads(5 as u64))312			.saturating_add(RocksDbWeight::get().writes(6 as u64))313	}314	// Storage: Common CollectionPropertyPermissions (r:1 w:1)315	fn set_token_property_permissions(b: u32, ) -> Weight {316		(Weight::from_ref_time(0))317			// Standard Error: 58_000318			.saturating_add(Weight::from_ref_time(15_705_000).saturating_mul(b as u64))319			.saturating_add(RocksDbWeight::get().reads(1 as u64))320			.saturating_add(RocksDbWeight::get().writes(1 as u64))321	}322	// Storage: Common CollectionPropertyPermissions (r:1 w:0)323	// Storage: Nonfungible TokenProperties (r:1 w:1)324	fn set_token_properties(b: u32, ) -> Weight {325		(Weight::from_ref_time(0))326			// Standard Error: 3_595_000327			.saturating_add(Weight::from_ref_time(590_344_000).saturating_mul(b as u64))328			.saturating_add(RocksDbWeight::get().reads(2 as u64))329			.saturating_add(RocksDbWeight::get().writes(1 as u64))330	}331	// Storage: Common CollectionPropertyPermissions (r:1 w:0)332	// Storage: Nonfungible TokenProperties (r:1 w:1)333	fn delete_token_properties(b: u32, ) -> Weight {334		(Weight::from_ref_time(0))335			// Standard Error: 3_664_000336			.saturating_add(Weight::from_ref_time(605_836_000).saturating_mul(b as u64))337			.saturating_add(RocksDbWeight::get().reads(2 as u64))338			.saturating_add(RocksDbWeight::get().writes(1 as u64))339	}340	// Storage: Nonfungible TokenData (r:1 w:0)341	fn token_owner() -> Weight {342		Weight::from_ref_time(4_366_000)343			.saturating_add(RocksDbWeight::get().reads(1 as u64))344	}345}