git.delta.rocks / unique-network / refs/commits / 3fa58894bbf0

difftreelog

source

pallets/nonfungible/src/weights.rs13.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-07-20, 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		(20_328_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		(10_134_000 as Weight)69			// Standard Error: 3_00070			.saturating_add((4_927_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		(5_710_000 as Weight)81			// Standard Error: 4_00082			.saturating_add((7_578_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		(28_433_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		(34_435_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_539_000123			.saturating_add((304_456_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		(24_376_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		(15_890_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		(28_634_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		(32_201_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_232_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 TokenProperties (r:1 w:1)176	fn set_token_properties(b: u32, ) -> Weight {177		(0 as Weight)178			// Standard Error: 1_648_000179			.saturating_add((288_654_000 as Weight).saturating_mul(b as Weight))180			.saturating_add(T::DbWeight::get().reads(2 as Weight))181			.saturating_add(T::DbWeight::get().writes(1 as Weight))182	}183	// Storage: Common CollectionPropertyPermissions (r:1 w:0)184	// Storage: Nonfungible TokenProperties (r:1 w:1)185	fn delete_token_properties(b: u32, ) -> Weight {186		(0 as Weight)187			// Standard Error: 1_632_000188			.saturating_add((289_190_000 as Weight).saturating_mul(b as Weight))189			.saturating_add(T::DbWeight::get().reads(2 as Weight))190			.saturating_add(T::DbWeight::get().writes(1 as Weight))191	}192}193194// For backwards compatibility and tests195impl WeightInfo for () {196	// Storage: Nonfungible TokensMinted (r:1 w:1)197	// Storage: Nonfungible AccountBalance (r:1 w:1)198	// Storage: Nonfungible TokenData (r:0 w:1)199	// Storage: Nonfungible Owned (r:0 w:1)200	fn create_item() -> Weight {201		(20_328_000 as Weight)202			.saturating_add(RocksDbWeight::get().reads(2 as Weight))203			.saturating_add(RocksDbWeight::get().writes(4 as Weight))204	}205	// Storage: Nonfungible TokensMinted (r:1 w:1)206	// Storage: Nonfungible AccountBalance (r:1 w:1)207	// Storage: Nonfungible TokenData (r:0 w:4)208	// Storage: Nonfungible Owned (r:0 w:4)209	fn create_multiple_items(b: u32, ) -> Weight {210		(10_134_000 as Weight)211			// Standard Error: 3_000212			.saturating_add((4_927_000 as Weight).saturating_mul(b as Weight))213			.saturating_add(RocksDbWeight::get().reads(2 as Weight))214			.saturating_add(RocksDbWeight::get().writes(2 as Weight))215			.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))216	}217	// Storage: Nonfungible TokensMinted (r:1 w:1)218	// Storage: Nonfungible AccountBalance (r:4 w:4)219	// Storage: Nonfungible TokenData (r:0 w:4)220	// Storage: Nonfungible Owned (r:0 w:4)221	fn create_multiple_items_ex(b: u32, ) -> Weight {222		(5_710_000 as Weight)223			// Standard Error: 4_000224			.saturating_add((7_578_000 as Weight).saturating_mul(b as Weight))225			.saturating_add(RocksDbWeight::get().reads(1 as Weight))226			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))227			.saturating_add(RocksDbWeight::get().writes(1 as Weight))228			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))229	}230	// Storage: Nonfungible TokenData (r:1 w:1)231	// Storage: Nonfungible TokenChildren (r:1 w:0)232	// Storage: Nonfungible TokensBurnt (r:1 w:1)233	// Storage: Nonfungible AccountBalance (r:1 w:1)234	// Storage: Nonfungible Allowance (r:1 w:0)235	// Storage: Nonfungible Owned (r:0 w:1)236	// Storage: Nonfungible TokenProperties (r:0 w:1)237	fn burn_item() -> Weight {238		(28_433_000 as Weight)239			.saturating_add(RocksDbWeight::get().reads(5 as Weight))240			.saturating_add(RocksDbWeight::get().writes(5 as Weight))241	}242	// Storage: Nonfungible TokenChildren (r:1 w:0)243	// Storage: Nonfungible TokenData (r:1 w:1)244	// Storage: Nonfungible TokensBurnt (r:1 w:1)245	// Storage: Nonfungible AccountBalance (r:1 w:1)246	// Storage: Nonfungible Allowance (r:1 w:0)247	// Storage: Nonfungible Owned (r:0 w:1)248	// Storage: Nonfungible TokenProperties (r:0 w:1)249	fn burn_recursively_self_raw() -> Weight {250		(34_435_000 as Weight)251			.saturating_add(RocksDbWeight::get().reads(5 as Weight))252			.saturating_add(RocksDbWeight::get().writes(5 as Weight))253	}254	// Storage: Nonfungible TokenChildren (r:1 w:0)255	// Storage: Nonfungible TokenData (r:1 w:1)256	// Storage: Nonfungible TokensBurnt (r:1 w:1)257	// Storage: Nonfungible AccountBalance (r:1 w:1)258	// Storage: Nonfungible Allowance (r:1 w:0)259	// Storage: Nonfungible Owned (r:0 w:1)260	// Storage: Nonfungible TokenProperties (r:0 w:1)261	// Storage: Common CollectionById (r:1 w:0)262	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {263		(0 as Weight)264			// Standard Error: 1_539_000265			.saturating_add((304_456_000 as Weight).saturating_mul(b as Weight))266			.saturating_add(RocksDbWeight::get().reads(7 as Weight))267			.saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))268			.saturating_add(RocksDbWeight::get().writes(6 as Weight))269			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))270	}271	// Storage: Nonfungible TokenData (r:1 w:1)272	// Storage: Nonfungible AccountBalance (r:2 w:2)273	// Storage: Nonfungible Allowance (r:1 w:0)274	// Storage: Nonfungible Owned (r:0 w:2)275	fn transfer() -> Weight {276		(24_376_000 as Weight)277			.saturating_add(RocksDbWeight::get().reads(4 as Weight))278			.saturating_add(RocksDbWeight::get().writes(5 as Weight))279	}280	// Storage: Nonfungible TokenData (r:1 w:0)281	// Storage: Nonfungible Allowance (r:1 w:1)282	fn approve() -> Weight {283		(15_890_000 as Weight)284			.saturating_add(RocksDbWeight::get().reads(2 as Weight))285			.saturating_add(RocksDbWeight::get().writes(1 as Weight))286	}287	// Storage: Nonfungible Allowance (r:1 w:1)288	// Storage: Nonfungible TokenData (r:1 w:1)289	// Storage: Nonfungible AccountBalance (r:2 w:2)290	// Storage: Nonfungible Owned (r:0 w:2)291	fn transfer_from() -> Weight {292		(28_634_000 as Weight)293			.saturating_add(RocksDbWeight::get().reads(4 as Weight))294			.saturating_add(RocksDbWeight::get().writes(6 as Weight))295	}296	// Storage: Nonfungible Allowance (r:1 w:1)297	// Storage: Nonfungible TokenData (r:1 w:1)298	// Storage: Nonfungible TokenChildren (r:1 w:0)299	// Storage: Nonfungible TokensBurnt (r:1 w:1)300	// Storage: Nonfungible AccountBalance (r:1 w:1)301	// Storage: Nonfungible Owned (r:0 w:1)302	// Storage: Nonfungible TokenProperties (r:0 w:1)303	fn burn_from() -> Weight {304		(32_201_000 as Weight)305			.saturating_add(RocksDbWeight::get().reads(5 as Weight))306			.saturating_add(RocksDbWeight::get().writes(6 as Weight))307	}308	// Storage: Common CollectionPropertyPermissions (r:1 w:1)309	fn set_token_property_permissions(b: u32, ) -> Weight {310		(0 as Weight)311			// Standard Error: 57_000312			.saturating_add((15_232_000 as Weight).saturating_mul(b as Weight))313			.saturating_add(RocksDbWeight::get().reads(1 as Weight))314			.saturating_add(RocksDbWeight::get().writes(1 as Weight))315	}316	// Storage: Common CollectionPropertyPermissions (r:1 w:0)317	// Storage: Nonfungible TokenProperties (r:1 w:1)318	fn set_token_properties(b: u32, ) -> Weight {319		(0 as Weight)320			// Standard Error: 1_648_000321			.saturating_add((288_654_000 as Weight).saturating_mul(b as Weight))322			.saturating_add(RocksDbWeight::get().reads(2 as Weight))323			.saturating_add(RocksDbWeight::get().writes(1 as Weight))324	}325	// Storage: Common CollectionPropertyPermissions (r:1 w:0)326	// Storage: Nonfungible TokenProperties (r:1 w:1)327	fn delete_token_properties(b: u32, ) -> Weight {328		(0 as Weight)329			// Standard Error: 1_632_000330			.saturating_add((289_190_000 as Weight).saturating_mul(b as Weight))331			.saturating_add(RocksDbWeight::get().reads(2 as Weight))332			.saturating_add(RocksDbWeight::get().writes(1 as Weight))333	}334}