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

difftreelog

source

pallets/nonfungible/src/weights.rs13.9 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-06-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}5051/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.52pub struct SubstrateWeight<T>(PhantomData<T>);53impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {54	// Storage: Nonfungible TokensMinted (r:1 w:1)55	// Storage: Nonfungible AccountBalance (r:1 w:1)56	// Storage: Nonfungible TokenData (r:0 w:1)57	// Storage: Nonfungible Owned (r:0 w:1)58	fn create_item() -> Weight {59		(24_135_000 as Weight)60			.saturating_add(T::DbWeight::get().reads(2 as Weight))61			.saturating_add(T::DbWeight::get().writes(4 as Weight))62	}63	// Storage: Nonfungible TokensMinted (r:1 w:1)64	// Storage: Nonfungible AccountBalance (r:1 w:1)65	// Storage: Nonfungible TokenData (r:0 w:4)66	// Storage: Nonfungible Owned (r:0 w:4)67	fn create_multiple_items(b: u32, ) -> Weight {68		(21_952_000 as Weight)69			// Standard Error: 5_00070			.saturating_add((4_727_000 as Weight).saturating_mul(b as Weight))71			.saturating_add(T::DbWeight::get().reads(2 as Weight))72			.saturating_add(T::DbWeight::get().writes(2 as Weight))73			.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))74	}75	// Storage: Nonfungible TokensMinted (r:1 w:1)76	// Storage: Nonfungible AccountBalance (r:4 w:4)77	// Storage: Nonfungible TokenData (r:0 w:4)78	// Storage: Nonfungible Owned (r:0 w:4)79	fn create_multiple_items_ex(b: u32, ) -> Weight {80		(10_432_000 as Weight)81			// Standard Error: 6_00082			.saturating_add((7_383_000 as Weight).saturating_mul(b as Weight))83			.saturating_add(T::DbWeight::get().reads(1 as Weight))84			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))85			.saturating_add(T::DbWeight::get().writes(1 as Weight))86			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))87	}88	// Storage: Nonfungible TokenData (r:1 w:1)89	// Storage: Nonfungible TokenChildren (r:1 w:0)90	// Storage: Nonfungible TokensBurnt (r:1 w:1)91	// Storage: Nonfungible AccountBalance (r:1 w:1)92	// Storage: Nonfungible Allowance (r:1 w:0)93	// Storage: Nonfungible Owned (r:0 w:1)94	// Storage: Nonfungible TokenProperties (r:0 w:1)95	fn burn_item() -> Weight {96		(29_798_000 as Weight)97			.saturating_add(T::DbWeight::get().reads(5 as Weight))98			.saturating_add(T::DbWeight::get().writes(5 as Weight))99	}100	// Storage: Nonfungible TokenChildren (r:1 w:0)101	// Storage: Nonfungible TokenData (r:1 w:1)102	// Storage: Nonfungible TokensBurnt (r:1 w:1)103	// Storage: Nonfungible AccountBalance (r:1 w:1)104	// Storage: Nonfungible Allowance (r:1 w:0)105	// Storage: Nonfungible Owned (r:0 w:1)106	// Storage: Nonfungible TokenProperties (r:0 w:1)107	fn burn_recursively_self_raw() -> Weight {108		(37_955_000 as Weight)109			.saturating_add(T::DbWeight::get().reads(5 as Weight))110			.saturating_add(T::DbWeight::get().writes(5 as Weight))111	}112	// Storage: Nonfungible TokenChildren (r:1 w:0)113	// Storage: Nonfungible TokenData (r:1 w:1)114	// Storage: Nonfungible TokensBurnt (r:1 w:1)115	// Storage: Nonfungible AccountBalance (r:1 w:1)116	// Storage: Nonfungible Allowance (r:1 w:0)117	// Storage: Nonfungible Owned (r:0 w:1)118	// Storage: Nonfungible TokenProperties (r:0 w:1)119	// Storage: Common CollectionById (r:1 w:0)120	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {121		(0 as Weight)122			// Standard Error: 1_349_000123			.saturating_add((275_145_000 as Weight).saturating_mul(b as Weight))124			.saturating_add(T::DbWeight::get().reads(7 as Weight))125			.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))126			.saturating_add(T::DbWeight::get().writes(6 as Weight))127			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))128	}129	// Storage: Nonfungible TokenData (r:1 w:1)130	// Storage: Nonfungible AccountBalance (r:2 w:2)131	// Storage: Nonfungible Allowance (r:1 w:0)132	// Storage: Nonfungible Owned (r:0 w:2)133	fn transfer() -> Weight {134		(27_867_000 as Weight)135			.saturating_add(T::DbWeight::get().reads(4 as Weight))136			.saturating_add(T::DbWeight::get().writes(5 as Weight))137	}138	// Storage: Nonfungible TokenData (r:1 w:0)139	// Storage: Nonfungible Allowance (r:1 w:1)140	fn approve() -> Weight {141		(18_824_000 as Weight)142			.saturating_add(T::DbWeight::get().reads(2 as Weight))143			.saturating_add(T::DbWeight::get().writes(1 as Weight))144	}145	// Storage: Nonfungible Allowance (r:1 w:1)146	// Storage: Nonfungible TokenData (r:1 w:1)147	// Storage: Nonfungible AccountBalance (r:2 w:2)148	// Storage: Nonfungible Owned (r:0 w:2)149	fn transfer_from() -> Weight {150		(32_879_000 as Weight)151			.saturating_add(T::DbWeight::get().reads(4 as Weight))152			.saturating_add(T::DbWeight::get().writes(6 as Weight))153	}154	// Storage: Nonfungible Allowance (r:1 w:1)155	// Storage: Nonfungible TokenData (r:1 w:1)156	// Storage: Nonfungible TokenChildren (r:1 w:0)157	// Storage: Nonfungible TokensBurnt (r:1 w:1)158	// Storage: Nonfungible AccountBalance (r:1 w:1)159	// Storage: Nonfungible Owned (r:0 w:1)160	// Storage: Nonfungible TokenProperties (r:0 w:1)161	fn burn_from() -> Weight {162		(37_061_000 as Weight)163			.saturating_add(T::DbWeight::get().reads(5 as Weight))164			.saturating_add(T::DbWeight::get().writes(6 as Weight))165	}166	// Storage: Common CollectionPropertyPermissions (r:1 w:1)167	fn set_token_property_permissions(b: u32, ) -> Weight {168		(0 as Weight)169			// Standard Error: 57_000170			.saturating_add((15_149_000 as Weight).saturating_mul(b as Weight))171			.saturating_add(T::DbWeight::get().reads(1 as Weight))172			.saturating_add(T::DbWeight::get().writes(1 as Weight))173	}174	// Storage: Common CollectionPropertyPermissions (r:1 w:0)175	// Storage: Nonfungible TokenData (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: 2_278_000180			.saturating_add((409_613_000 as Weight).saturating_mul(b as Weight))181			.saturating_add(T::DbWeight::get().reads(3 as Weight))182			.saturating_add(T::DbWeight::get().writes(1 as Weight))183	}184	// Storage: Common CollectionPropertyPermissions (r:1 w:0)185	// Storage: Nonfungible TokenData (r:1 w:0)186	// Storage: Nonfungible TokenProperties (r:1 w:1)187	fn delete_token_properties(b: u32, ) -> Weight {188		(0 as Weight)189			// Standard Error: 2_234_000190			.saturating_add((408_185_000 as Weight).saturating_mul(b as Weight))191			.saturating_add(T::DbWeight::get().reads(3 as Weight))192			.saturating_add(T::DbWeight::get().writes(1 as Weight))193	}194}195196// For backwards compatibility and tests197impl WeightInfo for () {198	// Storage: Nonfungible TokensMinted (r:1 w:1)199	// Storage: Nonfungible AccountBalance (r:1 w:1)200	// Storage: Nonfungible TokenData (r:0 w:1)201	// Storage: Nonfungible Owned (r:0 w:1)202	fn create_item() -> Weight {203		(24_135_000 as Weight)204			.saturating_add(RocksDbWeight::get().reads(2 as Weight))205			.saturating_add(RocksDbWeight::get().writes(4 as Weight))206	}207	// Storage: Nonfungible TokensMinted (r:1 w:1)208	// Storage: Nonfungible AccountBalance (r:1 w:1)209	// Storage: Nonfungible TokenData (r:0 w:4)210	// Storage: Nonfungible Owned (r:0 w:4)211	fn create_multiple_items(b: u32, ) -> Weight {212		(21_952_000 as Weight)213			// Standard Error: 5_000214			.saturating_add((4_727_000 as Weight).saturating_mul(b as Weight))215			.saturating_add(RocksDbWeight::get().reads(2 as Weight))216			.saturating_add(RocksDbWeight::get().writes(2 as Weight))217			.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))218	}219	// Storage: Nonfungible TokensMinted (r:1 w:1)220	// Storage: Nonfungible AccountBalance (r:4 w:4)221	// Storage: Nonfungible TokenData (r:0 w:4)222	// Storage: Nonfungible Owned (r:0 w:4)223	fn create_multiple_items_ex(b: u32, ) -> Weight {224		(10_432_000 as Weight)225			// Standard Error: 6_000226			.saturating_add((7_383_000 as Weight).saturating_mul(b as Weight))227			.saturating_add(RocksDbWeight::get().reads(1 as Weight))228			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))229			.saturating_add(RocksDbWeight::get().writes(1 as Weight))230			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))231	}232	// Storage: Nonfungible TokenData (r:1 w:1)233	// Storage: Nonfungible TokenChildren (r:1 w:0)234	// Storage: Nonfungible TokensBurnt (r:1 w:1)235	// Storage: Nonfungible AccountBalance (r:1 w:1)236	// Storage: Nonfungible Allowance (r:1 w:0)237	// Storage: Nonfungible Owned (r:0 w:1)238	// Storage: Nonfungible TokenProperties (r:0 w:1)239	fn burn_item() -> Weight {240		(29_798_000 as Weight)241			.saturating_add(RocksDbWeight::get().reads(5 as Weight))242			.saturating_add(RocksDbWeight::get().writes(5 as Weight))243	}244	// Storage: Nonfungible TokenChildren (r:1 w:0)245	// Storage: Nonfungible TokenData (r:1 w:1)246	// Storage: Nonfungible TokensBurnt (r:1 w:1)247	// Storage: Nonfungible AccountBalance (r:1 w:1)248	// Storage: Nonfungible Allowance (r:1 w:0)249	// Storage: Nonfungible Owned (r:0 w:1)250	// Storage: Nonfungible TokenProperties (r:0 w:1)251	fn burn_recursively_self_raw() -> Weight {252		(37_955_000 as Weight)253			.saturating_add(RocksDbWeight::get().reads(5 as Weight))254			.saturating_add(RocksDbWeight::get().writes(5 as Weight))255	}256	// Storage: Nonfungible TokenChildren (r:1 w:0)257	// Storage: Nonfungible TokenData (r:1 w:1)258	// Storage: Nonfungible TokensBurnt (r:1 w:1)259	// Storage: Nonfungible AccountBalance (r:1 w:1)260	// Storage: Nonfungible Allowance (r:1 w:0)261	// Storage: Nonfungible Owned (r:0 w:1)262	// Storage: Nonfungible TokenProperties (r:0 w:1)263	// Storage: Common CollectionById (r:1 w:0)264	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {265		(0 as Weight)266			// Standard Error: 1_349_000267			.saturating_add((275_145_000 as Weight).saturating_mul(b as Weight))268			.saturating_add(RocksDbWeight::get().reads(7 as Weight))269			.saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))270			.saturating_add(RocksDbWeight::get().writes(6 as Weight))271			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))272	}273	// Storage: Nonfungible TokenData (r:1 w:1)274	// Storage: Nonfungible AccountBalance (r:2 w:2)275	// Storage: Nonfungible Allowance (r:1 w:0)276	// Storage: Nonfungible Owned (r:0 w:2)277	fn transfer() -> Weight {278		(27_867_000 as Weight)279			.saturating_add(RocksDbWeight::get().reads(4 as Weight))280			.saturating_add(RocksDbWeight::get().writes(5 as Weight))281	}282	// Storage: Nonfungible TokenData (r:1 w:0)283	// Storage: Nonfungible Allowance (r:1 w:1)284	fn approve() -> Weight {285		(18_824_000 as Weight)286			.saturating_add(RocksDbWeight::get().reads(2 as Weight))287			.saturating_add(RocksDbWeight::get().writes(1 as Weight))288	}289	// Storage: Nonfungible Allowance (r:1 w:1)290	// Storage: Nonfungible TokenData (r:1 w:1)291	// Storage: Nonfungible AccountBalance (r:2 w:2)292	// Storage: Nonfungible Owned (r:0 w:2)293	fn transfer_from() -> Weight {294		(32_879_000 as Weight)295			.saturating_add(RocksDbWeight::get().reads(4 as Weight))296			.saturating_add(RocksDbWeight::get().writes(6 as Weight))297	}298	// Storage: Nonfungible Allowance (r:1 w:1)299	// Storage: Nonfungible TokenData (r:1 w:1)300	// Storage: Nonfungible TokenChildren (r:1 w:0)301	// Storage: Nonfungible TokensBurnt (r:1 w:1)302	// Storage: Nonfungible AccountBalance (r:1 w:1)303	// Storage: Nonfungible Owned (r:0 w:1)304	// Storage: Nonfungible TokenProperties (r:0 w:1)305	fn burn_from() -> Weight {306		(37_061_000 as Weight)307			.saturating_add(RocksDbWeight::get().reads(5 as Weight))308			.saturating_add(RocksDbWeight::get().writes(6 as Weight))309	}310	// Storage: Common CollectionPropertyPermissions (r:1 w:1)311	fn set_token_property_permissions(b: u32, ) -> Weight {312		(0 as Weight)313			// Standard Error: 57_000314			.saturating_add((15_149_000 as Weight).saturating_mul(b as Weight))315			.saturating_add(RocksDbWeight::get().reads(1 as Weight))316			.saturating_add(RocksDbWeight::get().writes(1 as Weight))317	}318	// Storage: Common CollectionPropertyPermissions (r:1 w:0)319	// Storage: Nonfungible TokenData (r:1 w:0)320	// Storage: Nonfungible TokenProperties (r:1 w:1)321	fn set_token_properties(b: u32, ) -> Weight {322		(0 as Weight)323			// Standard Error: 2_278_000324			.saturating_add((409_613_000 as Weight).saturating_mul(b as Weight))325			.saturating_add(RocksDbWeight::get().reads(3 as Weight))326			.saturating_add(RocksDbWeight::get().writes(1 as Weight))327	}328	// Storage: Common CollectionPropertyPermissions (r:1 w:0)329	// Storage: Nonfungible TokenData (r:1 w:0)330	// Storage: Nonfungible TokenProperties (r:1 w:1)331	fn delete_token_properties(b: u32, ) -> Weight {332		(0 as Weight)333			// Standard Error: 2_234_000334			.saturating_add((408_185_000 as Weight).saturating_mul(b as Weight))335			.saturating_add(RocksDbWeight::get().reads(3 as Weight))336			.saturating_add(RocksDbWeight::get().writes(1 as Weight))337	}338}