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

difftreelog

source

pallets/nonfungible/src/weights.rs15.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-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(missing_docs)]30#![allow(clippy::unnecessary_cast)]3132use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};33use sp_std::marker::PhantomData;3435/// Weight functions needed for pallet_nonfungible.36pub trait WeightInfo {37	fn create_item() -> Weight;38	fn create_multiple_items(b: u32, ) -> Weight;39	fn create_multiple_items_ex(b: u32, ) -> Weight;40	fn burn_item() -> Weight;41	fn burn_recursively_self_raw() -> Weight;42	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight;43	fn transfer() -> Weight;44	fn approve() -> Weight;45	fn transfer_from() -> Weight;46	fn burn_from() -> Weight;47	fn set_token_property_permissions(b: u32, ) -> Weight;48	fn set_token_properties(b: u32, ) -> Weight;49	fn delete_token_properties(b: u32, ) -> Weight;50	fn token_owner() -> Weight;51	fn set_allowance_for_all() -> Weight;52	fn allowance_for_all() -> Weight;53}5455/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.56pub struct SubstrateWeight<T>(PhantomData<T>);57impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {58	// Storage: Nonfungible TokensMinted (r:1 w:1)59	// Storage: Nonfungible AccountBalance (r:1 w:1)60	// Storage: Nonfungible TokenData (r:0 w:1)61	// Storage: Nonfungible Owned (r:0 w:1)62	fn create_item() -> Weight {63		Weight::from_ref_time(25_905_000)64			.saturating_add(T::DbWeight::get().reads(2 as u64))65			.saturating_add(T::DbWeight::get().writes(4 as u64))66	}67	// Storage: Nonfungible TokensMinted (r:1 w:1)68	// Storage: Nonfungible AccountBalance (r:1 w:1)69	// Storage: Nonfungible TokenData (r:0 w:4)70	// Storage: Nonfungible Owned (r:0 w:4)71	fn create_multiple_items(b: u32, ) -> Weight {72		Weight::from_ref_time(24_955_000)73			// Standard Error: 3_00074			.saturating_add(Weight::from_ref_time(5_340_000).saturating_mul(b as u64))75			.saturating_add(T::DbWeight::get().reads(2 as u64))76			.saturating_add(T::DbWeight::get().writes(2 as u64))77			.saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(b as u64)))78	}79	// Storage: Nonfungible TokensMinted (r:1 w:1)80	// Storage: Nonfungible AccountBalance (r:4 w:4)81	// Storage: Nonfungible TokenData (r:0 w:4)82	// Storage: Nonfungible Owned (r:0 w:4)83	fn create_multiple_items_ex(b: u32, ) -> Weight {84		Weight::from_ref_time(13_666_000)85			// Standard Error: 5_00086			.saturating_add(Weight::from_ref_time(8_299_000).saturating_mul(b as u64))87			.saturating_add(T::DbWeight::get().reads(1 as u64))88			.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))89			.saturating_add(T::DbWeight::get().writes(1 as u64))90			.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(b as u64)))91	}92	// Storage: Nonfungible TokenData (r:1 w:1)93	// Storage: Nonfungible TokenChildren (r:1 w:0)94	// Storage: Nonfungible TokensBurnt (r:1 w:1)95	// Storage: Nonfungible AccountBalance (r:1 w:1)96	// Storage: Nonfungible Allowance (r:1 w:0)97	// Storage: Nonfungible Owned (r:0 w:1)98	// Storage: Nonfungible TokenProperties (r:0 w:1)99	fn burn_item() -> Weight {100		Weight::from_ref_time(36_205_000)101			.saturating_add(T::DbWeight::get().reads(5 as u64))102			.saturating_add(T::DbWeight::get().writes(5 as u64))103	}104	// Storage: Nonfungible TokenChildren (r:1 w:0)105	// Storage: Nonfungible TokenData (r:1 w:1)106	// Storage: Nonfungible TokensBurnt (r:1 w:1)107	// Storage: Nonfungible AccountBalance (r:1 w:1)108	// Storage: Nonfungible Allowance (r:1 w:0)109	// Storage: Nonfungible Owned (r:0 w:1)110	// Storage: Nonfungible TokenProperties (r:0 w:1)111	fn burn_recursively_self_raw() -> Weight {112		Weight::from_ref_time(44_550_000)113			.saturating_add(T::DbWeight::get().reads(5 as u64))114			.saturating_add(T::DbWeight::get().writes(5 as u64))115	}116	// Storage: Nonfungible TokenChildren (r:1 w:0)117	// Storage: Nonfungible TokenData (r:1 w:1)118	// Storage: Nonfungible TokensBurnt (r:1 w:1)119	// Storage: Nonfungible AccountBalance (r:1 w:1)120	// Storage: Nonfungible Allowance (r:1 w:0)121	// Storage: Nonfungible Owned (r:0 w:1)122	// Storage: Nonfungible TokenProperties (r:0 w:1)123	// Storage: Common CollectionById (r:1 w:0)124	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {125		(Weight::from_ref_time(0))126			// Standard Error: 1_536_000127			.saturating_add(Weight::from_ref_time(312_125_000).saturating_mul(b as u64))128			.saturating_add(T::DbWeight::get().reads(7 as u64))129			.saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(b as u64)))130			.saturating_add(T::DbWeight::get().writes(6 as u64))131			.saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(b as u64)))132	}133	// Storage: Nonfungible TokenData (r:1 w:1)134	// Storage: Nonfungible AccountBalance (r:2 w:2)135	// Storage: Nonfungible Allowance (r:1 w:0)136	// Storage: Nonfungible Owned (r:0 w:2)137	fn transfer() -> Weight {138		Weight::from_ref_time(31_116_000)139			.saturating_add(T::DbWeight::get().reads(4 as u64))140			.saturating_add(T::DbWeight::get().writes(5 as u64))141	}142	// Storage: Nonfungible TokenData (r:1 w:0)143	// Storage: Nonfungible Allowance (r:1 w:1)144	fn approve() -> Weight {145		Weight::from_ref_time(20_802_000)146			.saturating_add(T::DbWeight::get().reads(2 as u64))147			.saturating_add(T::DbWeight::get().writes(1 as u64))148	}149	// Storage: Nonfungible Allowance (r:1 w:1)150	// Storage: Nonfungible TokenData (r:1 w:1)151	// Storage: Nonfungible AccountBalance (r:2 w:2)152	// Storage: Nonfungible Owned (r:0 w:2)153	fn transfer_from() -> Weight {154		Weight::from_ref_time(36_083_000)155			.saturating_add(T::DbWeight::get().reads(4 as u64))156			.saturating_add(T::DbWeight::get().writes(6 as u64))157	}158	// Storage: Nonfungible Allowance (r:1 w:1)159	// Storage: Nonfungible TokenData (r:1 w:1)160	// Storage: Nonfungible TokenChildren (r:1 w:0)161	// Storage: Nonfungible TokensBurnt (r:1 w:1)162	// Storage: Nonfungible AccountBalance (r:1 w:1)163	// Storage: Nonfungible Owned (r:0 w:1)164	// Storage: Nonfungible TokenProperties (r:0 w:1)165	fn burn_from() -> Weight {166		Weight::from_ref_time(41_781_000)167			.saturating_add(T::DbWeight::get().reads(5 as u64))168			.saturating_add(T::DbWeight::get().writes(6 as u64))169	}170	// Storage: Common CollectionPropertyPermissions (r:1 w:1)171	fn set_token_property_permissions(b: u32, ) -> Weight {172		(Weight::from_ref_time(0))173			// Standard Error: 58_000174			.saturating_add(Weight::from_ref_time(15_705_000).saturating_mul(b as u64))175			.saturating_add(T::DbWeight::get().reads(1 as u64))176			.saturating_add(T::DbWeight::get().writes(1 as u64))177	}178	// Storage: Common CollectionPropertyPermissions (r:1 w:0)179	// Storage: Nonfungible TokenProperties (r:1 w:1)180	fn set_token_properties(b: u32, ) -> Weight {181		(Weight::from_ref_time(0))182			// Standard Error: 3_595_000183			.saturating_add(Weight::from_ref_time(590_344_000).saturating_mul(b as u64))184			.saturating_add(T::DbWeight::get().reads(2 as u64))185			.saturating_add(T::DbWeight::get().writes(1 as u64))186	}187	// Storage: Common CollectionPropertyPermissions (r:1 w:0)188	// Storage: Nonfungible TokenProperties (r:1 w:1)189	fn delete_token_properties(b: u32, ) -> Weight {190		(Weight::from_ref_time(0))191			// Standard Error: 3_664_000192			.saturating_add(Weight::from_ref_time(605_836_000).saturating_mul(b as u64))193			.saturating_add(T::DbWeight::get().reads(2 as u64))194			.saturating_add(T::DbWeight::get().writes(1 as u64))195	}196	// Storage: Nonfungible TokenData (r:1 w:0)197	fn token_owner() -> Weight {198		Weight::from_ref_time(4_366_000)199			.saturating_add(T::DbWeight::get().reads(1 as u64))200	}201	// Storage: Nonfungible WalletOperator (r:0 w:1)202	fn set_allowance_for_all() -> Weight {203		Weight::from_ref_time(16_231_000 as u64)204			.saturating_add(T::DbWeight::get().writes(1 as u64))205	}206	// Storage: Nonfungible WalletOperator (r:1 w:0)207	fn allowance_for_all() -> Weight {208		Weight::from_ref_time(6_161_000 as u64)209			.saturating_add(T::DbWeight::get().reads(1 as u64))210	}211}212213// For backwards compatibility and tests214impl WeightInfo for () {215	// Storage: Nonfungible TokensMinted (r:1 w:1)216	// Storage: Nonfungible AccountBalance (r:1 w:1)217	// Storage: Nonfungible TokenData (r:0 w:1)218	// Storage: Nonfungible Owned (r:0 w:1)219	fn create_item() -> Weight {220		Weight::from_ref_time(25_905_000)221			.saturating_add(RocksDbWeight::get().reads(2 as u64))222			.saturating_add(RocksDbWeight::get().writes(4 as u64))223	}224	// Storage: Nonfungible TokensMinted (r:1 w:1)225	// Storage: Nonfungible AccountBalance (r:1 w:1)226	// Storage: Nonfungible TokenData (r:0 w:4)227	// Storage: Nonfungible Owned (r:0 w:4)228	fn create_multiple_items(b: u32, ) -> Weight {229		Weight::from_ref_time(24_955_000)230			// Standard Error: 3_000231			.saturating_add(Weight::from_ref_time(5_340_000).saturating_mul(b as u64))232			.saturating_add(RocksDbWeight::get().reads(2 as u64))233			.saturating_add(RocksDbWeight::get().writes(2 as u64))234			.saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(b as u64)))235	}236	// Storage: Nonfungible TokensMinted (r:1 w:1)237	// Storage: Nonfungible AccountBalance (r:4 w:4)238	// Storage: Nonfungible TokenData (r:0 w:4)239	// Storage: Nonfungible Owned (r:0 w:4)240	fn create_multiple_items_ex(b: u32, ) -> Weight {241		Weight::from_ref_time(13_666_000)242			// Standard Error: 5_000243			.saturating_add(Weight::from_ref_time(8_299_000).saturating_mul(b as u64))244			.saturating_add(RocksDbWeight::get().reads(1 as u64))245			.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))246			.saturating_add(RocksDbWeight::get().writes(1 as u64))247			.saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(b as u64)))248	}249	// Storage: Nonfungible TokenData (r:1 w:1)250	// Storage: Nonfungible TokenChildren (r:1 w:0)251	// Storage: Nonfungible TokensBurnt (r:1 w:1)252	// Storage: Nonfungible AccountBalance (r:1 w:1)253	// Storage: Nonfungible Allowance (r:1 w:0)254	// Storage: Nonfungible Owned (r:0 w:1)255	// Storage: Nonfungible TokenProperties (r:0 w:1)256	fn burn_item() -> Weight {257		Weight::from_ref_time(36_205_000)258			.saturating_add(RocksDbWeight::get().reads(5 as u64))259			.saturating_add(RocksDbWeight::get().writes(5 as u64))260	}261	// Storage: Nonfungible TokenChildren (r:1 w:0)262	// Storage: Nonfungible TokenData (r:1 w:1)263	// Storage: Nonfungible TokensBurnt (r:1 w:1)264	// Storage: Nonfungible AccountBalance (r:1 w:1)265	// Storage: Nonfungible Allowance (r:1 w:0)266	// Storage: Nonfungible Owned (r:0 w:1)267	// Storage: Nonfungible TokenProperties (r:0 w:1)268	fn burn_recursively_self_raw() -> Weight {269		Weight::from_ref_time(44_550_000)270			.saturating_add(RocksDbWeight::get().reads(5 as u64))271			.saturating_add(RocksDbWeight::get().writes(5 as u64))272	}273	// Storage: Nonfungible TokenChildren (r:1 w:0)274	// Storage: Nonfungible TokenData (r:1 w:1)275	// Storage: Nonfungible TokensBurnt (r:1 w:1)276	// Storage: Nonfungible AccountBalance (r:1 w:1)277	// Storage: Nonfungible Allowance (r:1 w:0)278	// Storage: Nonfungible Owned (r:0 w:1)279	// Storage: Nonfungible TokenProperties (r:0 w:1)280	// Storage: Common CollectionById (r:1 w:0)281	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {282		(Weight::from_ref_time(0))283			// Standard Error: 1_536_000284			.saturating_add(Weight::from_ref_time(312_125_000).saturating_mul(b as u64))285			.saturating_add(RocksDbWeight::get().reads(7 as u64))286			.saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(b as u64)))287			.saturating_add(RocksDbWeight::get().writes(6 as u64))288			.saturating_add(RocksDbWeight::get().writes((4 as u64).saturating_mul(b as u64)))289	}290	// Storage: Nonfungible TokenData (r:1 w:1)291	// Storage: Nonfungible AccountBalance (r:2 w:2)292	// Storage: Nonfungible Allowance (r:1 w:0)293	// Storage: Nonfungible Owned (r:0 w:2)294	fn transfer() -> Weight {295		Weight::from_ref_time(31_116_000)296			.saturating_add(RocksDbWeight::get().reads(4 as u64))297			.saturating_add(RocksDbWeight::get().writes(5 as u64))298	}299	// Storage: Nonfungible TokenData (r:1 w:0)300	// Storage: Nonfungible Allowance (r:1 w:1)301	fn approve() -> Weight {302		Weight::from_ref_time(20_802_000)303			.saturating_add(RocksDbWeight::get().reads(2 as u64))304			.saturating_add(RocksDbWeight::get().writes(1 as u64))305	}306	// Storage: Nonfungible Allowance (r:1 w:1)307	// Storage: Nonfungible TokenData (r:1 w:1)308	// Storage: Nonfungible AccountBalance (r:2 w:2)309	// Storage: Nonfungible Owned (r:0 w:2)310	fn transfer_from() -> Weight {311		Weight::from_ref_time(36_083_000)312			.saturating_add(RocksDbWeight::get().reads(4 as u64))313			.saturating_add(RocksDbWeight::get().writes(6 as u64))314	}315	// Storage: Nonfungible Allowance (r:1 w:1)316	// Storage: Nonfungible TokenData (r:1 w:1)317	// Storage: Nonfungible TokenChildren (r:1 w:0)318	// Storage: Nonfungible TokensBurnt (r:1 w:1)319	// Storage: Nonfungible AccountBalance (r:1 w:1)320	// Storage: Nonfungible Owned (r:0 w:1)321	// Storage: Nonfungible TokenProperties (r:0 w:1)322	fn burn_from() -> Weight {323		Weight::from_ref_time(41_781_000)324			.saturating_add(RocksDbWeight::get().reads(5 as u64))325			.saturating_add(RocksDbWeight::get().writes(6 as u64))326	}327	// Storage: Common CollectionPropertyPermissions (r:1 w:1)328	fn set_token_property_permissions(b: u32, ) -> Weight {329		(Weight::from_ref_time(0))330			// Standard Error: 58_000331			.saturating_add(Weight::from_ref_time(15_705_000).saturating_mul(b as u64))332			.saturating_add(RocksDbWeight::get().reads(1 as u64))333			.saturating_add(RocksDbWeight::get().writes(1 as u64))334	}335	// Storage: Common CollectionPropertyPermissions (r:1 w:0)336	// Storage: Nonfungible TokenProperties (r:1 w:1)337	fn set_token_properties(b: u32, ) -> Weight {338		(Weight::from_ref_time(0))339			// Standard Error: 3_595_000340			.saturating_add(Weight::from_ref_time(590_344_000).saturating_mul(b as u64))341			.saturating_add(RocksDbWeight::get().reads(2 as u64))342			.saturating_add(RocksDbWeight::get().writes(1 as u64))343	}344	// Storage: Common CollectionPropertyPermissions (r:1 w:0)345	// Storage: Nonfungible TokenProperties (r:1 w:1)346	fn delete_token_properties(b: u32, ) -> Weight {347		(Weight::from_ref_time(0))348			// Standard Error: 3_664_000349			.saturating_add(Weight::from_ref_time(605_836_000).saturating_mul(b as u64))350			.saturating_add(RocksDbWeight::get().reads(2 as u64))351			.saturating_add(RocksDbWeight::get().writes(1 as u64))352	}353	// Storage: Nonfungible TokenData (r:1 w:0)354	fn token_owner() -> Weight {355		Weight::from_ref_time(4_366_000)356			.saturating_add(RocksDbWeight::get().reads(1 as u64))357	}358	// Storage: Nonfungible WalletOperator (r:0 w:1)359	fn set_allowance_for_all() -> Weight {360		Weight::from_ref_time(16_231_000 as u64)361			.saturating_add(RocksDbWeight::get().writes(1 as u64))362	}363	// Storage: Nonfungible WalletOperator (r:1 w:0)364	fn allowance_for_all() -> Weight {365		Weight::from_ref_time(6_161_000 as u64)366			.saturating_add(RocksDbWeight::get().reads(1 as u64))367	}368}