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

difftreelog

source

pallets/nonfungible/src/weights.rs14.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: 2022-08-01, 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		(20_909_000 as Weight)61			.saturating_add(T::DbWeight::get().reads(2 as Weight))62			.saturating_add(T::DbWeight::get().writes(4 as Weight))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		(12_601_000 as Weight)70			// Standard Error: 1_00071			.saturating_add((4_920_000 as Weight).saturating_mul(b as Weight))72			.saturating_add(T::DbWeight::get().reads(2 as Weight))73			.saturating_add(T::DbWeight::get().writes(2 as Weight))74			.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))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		(0 as Weight)82			// Standard Error: 3_00083			.saturating_add((7_734_000 as Weight).saturating_mul(b as Weight))84			.saturating_add(T::DbWeight::get().reads(1 as Weight))85			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))86			.saturating_add(T::DbWeight::get().writes(1 as Weight))87			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))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		(29_746_000 as Weight)98			.saturating_add(T::DbWeight::get().reads(5 as Weight))99			.saturating_add(T::DbWeight::get().writes(5 as Weight))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		(36_077_000 as Weight)110			.saturating_add(T::DbWeight::get().reads(5 as Weight))111			.saturating_add(T::DbWeight::get().writes(5 as Weight))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		(0 as Weight)123			// Standard Error: 1_605_000124			.saturating_add((312_391_000 as Weight).saturating_mul(b as Weight))125			.saturating_add(T::DbWeight::get().reads(7 as Weight))126			.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))127			.saturating_add(T::DbWeight::get().writes(6 as Weight))128			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))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		(25_248_000 as Weight)136			.saturating_add(T::DbWeight::get().reads(4 as Weight))137			.saturating_add(T::DbWeight::get().writes(5 as Weight))138	}139	// Storage: Nonfungible TokenData (r:1 w:0)140	// Storage: Nonfungible Allowance (r:1 w:1)141	fn approve() -> Weight {142		(16_321_000 as Weight)143			.saturating_add(T::DbWeight::get().reads(2 as Weight))144			.saturating_add(T::DbWeight::get().writes(1 as Weight))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		(29_325_000 as Weight)152			.saturating_add(T::DbWeight::get().reads(4 as Weight))153			.saturating_add(T::DbWeight::get().writes(6 as Weight))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		(33_323_000 as Weight)164			.saturating_add(T::DbWeight::get().reads(5 as Weight))165			.saturating_add(T::DbWeight::get().writes(6 as Weight))166	}167	// Storage: Common CollectionPropertyPermissions (r:1 w:1)168	fn set_token_property_permissions(b: u32, ) -> Weight {169		(0 as Weight)170			// Standard Error: 62_000171			.saturating_add((16_222_000 as Weight).saturating_mul(b as Weight))172			.saturating_add(T::DbWeight::get().reads(1 as Weight))173			.saturating_add(T::DbWeight::get().writes(1 as Weight))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		(0 as Weight)179			// Standard Error: 1_750_000180			.saturating_add((304_476_000 as Weight).saturating_mul(b as Weight))181			.saturating_add(T::DbWeight::get().reads(2 as Weight))182			.saturating_add(T::DbWeight::get().writes(1 as Weight))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		(0 as Weight)188			// Standard Error: 1_638_000189			.saturating_add((294_096_000 as Weight).saturating_mul(b as Weight))190			.saturating_add(T::DbWeight::get().reads(2 as Weight))191			.saturating_add(T::DbWeight::get().writes(1 as Weight))192	}193	// Storage: Nonfungible TokenData (r:1 w:0)194	fn token_owner() -> Weight {195		(2_986_000 as Weight)196			.saturating_add(T::DbWeight::get().reads(1 as Weight))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		(20_909_000 as Weight)208			.saturating_add(RocksDbWeight::get().reads(2 as Weight))209			.saturating_add(RocksDbWeight::get().writes(4 as Weight))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		(12_601_000 as Weight)217			// Standard Error: 1_000218			.saturating_add((4_920_000 as Weight).saturating_mul(b as Weight))219			.saturating_add(RocksDbWeight::get().reads(2 as Weight))220			.saturating_add(RocksDbWeight::get().writes(2 as Weight))221			.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))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		(0 as Weight)229			// Standard Error: 3_000230			.saturating_add((7_734_000 as Weight).saturating_mul(b as Weight))231			.saturating_add(RocksDbWeight::get().reads(1 as Weight))232			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))233			.saturating_add(RocksDbWeight::get().writes(1 as Weight))234			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))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		(29_746_000 as Weight)245			.saturating_add(RocksDbWeight::get().reads(5 as Weight))246			.saturating_add(RocksDbWeight::get().writes(5 as Weight))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		(36_077_000 as Weight)257			.saturating_add(RocksDbWeight::get().reads(5 as Weight))258			.saturating_add(RocksDbWeight::get().writes(5 as Weight))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		(0 as Weight)270			// Standard Error: 1_605_000271			.saturating_add((312_391_000 as Weight).saturating_mul(b as Weight))272			.saturating_add(RocksDbWeight::get().reads(7 as Weight))273			.saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))274			.saturating_add(RocksDbWeight::get().writes(6 as Weight))275			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))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		(25_248_000 as Weight)283			.saturating_add(RocksDbWeight::get().reads(4 as Weight))284			.saturating_add(RocksDbWeight::get().writes(5 as Weight))285	}286	// Storage: Nonfungible TokenData (r:1 w:0)287	// Storage: Nonfungible Allowance (r:1 w:1)288	fn approve() -> Weight {289		(16_321_000 as Weight)290			.saturating_add(RocksDbWeight::get().reads(2 as Weight))291			.saturating_add(RocksDbWeight::get().writes(1 as Weight))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		(29_325_000 as Weight)299			.saturating_add(RocksDbWeight::get().reads(4 as Weight))300			.saturating_add(RocksDbWeight::get().writes(6 as Weight))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		(33_323_000 as Weight)311			.saturating_add(RocksDbWeight::get().reads(5 as Weight))312			.saturating_add(RocksDbWeight::get().writes(6 as Weight))313	}314	// Storage: Common CollectionPropertyPermissions (r:1 w:1)315	fn set_token_property_permissions(b: u32, ) -> Weight {316		(0 as Weight)317			// Standard Error: 62_000318			.saturating_add((16_222_000 as Weight).saturating_mul(b as Weight))319			.saturating_add(RocksDbWeight::get().reads(1 as Weight))320			.saturating_add(RocksDbWeight::get().writes(1 as Weight))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		(0 as Weight)326			// Standard Error: 1_750_000327			.saturating_add((304_476_000 as Weight).saturating_mul(b as Weight))328			.saturating_add(RocksDbWeight::get().reads(2 as Weight))329			.saturating_add(RocksDbWeight::get().writes(1 as Weight))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		(0 as Weight)335			// Standard Error: 1_638_000336			.saturating_add((294_096_000 as Weight).saturating_mul(b as Weight))337			.saturating_add(RocksDbWeight::get().reads(2 as Weight))338			.saturating_add(RocksDbWeight::get().writes(1 as Weight))339	}340	// Storage: Nonfungible TokenData (r:1 w:0)341	fn token_owner() -> Weight {342		(2_986_000 as Weight)343			.saturating_add(RocksDbWeight::get().reads(1 as Weight))344	}345}