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

difftreelog

source

pallets/nonfungible/src/weights.rs12.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-03-01, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// --pallet13// pallet-nonfungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=20022// --heap-pages=409623// --output=./pallets/nonfungible/src/weights.rs2425#![cfg_attr(rustfmt, rustfmt_skip)]26#![allow(unused_parens)]27#![allow(unused_imports)]28#![allow(clippy::unnecessary_cast)]2930use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};31use sp_std::marker::PhantomData;3233/// Weight functions needed for pallet_nonfungible.34pub trait WeightInfo {35	fn create_item() -> Weight;36	fn create_multiple_items(b: u32, ) -> Weight;37	fn create_multiple_items_ex(b: u32, ) -> Weight;38	fn burn_item() -> Weight;39	fn transfer() -> Weight;40	fn approve() -> Weight;41	fn transfer_from() -> Weight;42	fn burn_from() -> Weight;43	fn set_property_permissions(b: u32) -> Weight;44	fn set_token_properties(b: u32) -> Weight;45	fn delete_token_properties(b: u32) -> Weight;46}4748/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.49pub struct SubstrateWeight<T>(PhantomData<T>);50impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {51	// Storage: Nonfungible TokensMinted (r:1 w:1)52	// Storage: Nonfungible AccountBalance (r:1 w:1)53	// Storage: Nonfungible TokenData (r:0 w:1)54	// Storage: Nonfungible Owned (r:0 w:1)55	fn create_item() -> Weight {56		(18_450_000 as Weight)57			.saturating_add(T::DbWeight::get().reads(2 as Weight))58			.saturating_add(T::DbWeight::get().writes(4 as Weight))59	}60	// Storage: Nonfungible TokensMinted (r:1 w:1)61	// Storage: Nonfungible AccountBalance (r:1 w:1)62	// Storage: Nonfungible TokenData (r:0 w:4)63	// Storage: Nonfungible Owned (r:0 w:4)64	fn create_multiple_items(b: u32, ) -> Weight {65		(10_228_000 as Weight)66			// Standard Error: 1_00067			.saturating_add((4_392_000 as Weight).saturating_mul(b as Weight))68			.saturating_add(T::DbWeight::get().reads(2 as Weight))69			.saturating_add(T::DbWeight::get().writes(2 as Weight))70			.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))71	}72	// Storage: Nonfungible TokensMinted (r:1 w:1)73	// Storage: Nonfungible AccountBalance (r:4 w:4)74	// Storage: Nonfungible TokenData (r:0 w:4)75	// Storage: Nonfungible Owned (r:0 w:4)76	fn create_multiple_items_ex(b: u32, ) -> Weight {77		(6_543_000 as Weight)78			// Standard Error: 2_00079			.saturating_add((7_175_000 as Weight).saturating_mul(b as Weight))80			.saturating_add(T::DbWeight::get().reads(1 as Weight))81			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))82			.saturating_add(T::DbWeight::get().writes(1 as Weight))83			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))84	}85	// Storage: Nonfungible TokenData (r:1 w:1)86	// Storage: Nonfungible TokensBurnt (r:1 w:1)87	// Storage: Nonfungible AccountBalance (r:1 w:1)88	// Storage: Nonfungible Allowance (r:1 w:0)89	// Storage: Nonfungible Owned (r:0 w:1)90	fn burn_item() -> Weight {91		(24_554_000 as Weight)92			.saturating_add(T::DbWeight::get().reads(4 as Weight))93			.saturating_add(T::DbWeight::get().writes(4 as Weight))94	}95	// Storage: Nonfungible TokenChildren (r:1 w:0)96	// Storage: Nonfungible TokenData (r:1 w:1)97	// Storage: Nonfungible TokensBurnt (r:1 w:1)98	// Storage: Nonfungible AccountBalance (r:1 w:1)99	// Storage: Nonfungible Allowance (r:1 w:0)100	// Storage: Nonfungible Owned (r:0 w:1)101	// Storage: Nonfungible TokenProperties (r:0 w:1)102	fn burn_recursively_self_raw() -> Weight {103		(86_136_000 as Weight)104			.saturating_add(T::DbWeight::get().reads(5 as Weight))105			.saturating_add(T::DbWeight::get().writes(5 as Weight))106	}107	// Storage: Nonfungible TokenChildren (r:1 w:0)108	// Storage: Nonfungible TokenData (r:1 w:1)109	// Storage: Nonfungible TokensBurnt (r:1 w:1)110	// Storage: Nonfungible AccountBalance (r:1 w:1)111	// Storage: Nonfungible Allowance (r:1 w:0)112	// Storage: Nonfungible Owned (r:0 w:1)113	// Storage: Nonfungible TokenProperties (r:0 w:1)114	// Storage: Common CollectionById (r:1 w:0)115	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {116		(0 as Weight)117			// Standard Error: 42_828_000118			.saturating_add((381_478_000 as Weight).saturating_mul(b as Weight))119			.saturating_add(T::DbWeight::get().reads(6 as Weight))120			.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))121			.saturating_add(T::DbWeight::get().writes(5 as Weight))122			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))123	}124	// Storage: Nonfungible TokenData (r:1 w:1)125	// Storage: Nonfungible AccountBalance (r:2 w:2)126	// Storage: Nonfungible Allowance (r:1 w:0)127	// Storage: Nonfungible Owned (r:0 w:2)128	fn transfer() -> Weight {129		(28_339_000 as Weight)130			.saturating_add(T::DbWeight::get().reads(4 as Weight))131			.saturating_add(T::DbWeight::get().writes(5 as Weight))132	}133	// Storage: Nonfungible TokenData (r:1 w:0)134	// Storage: Nonfungible Allowance (r:1 w:1)135	fn approve() -> Weight {136		(17_616_000 as Weight)137			.saturating_add(T::DbWeight::get().reads(2 as Weight))138			.saturating_add(T::DbWeight::get().writes(1 as Weight))139	}140	// Storage: Nonfungible Allowance (r:1 w:1)141	// Storage: Nonfungible TokenData (r:1 w:1)142	// Storage: Nonfungible AccountBalance (r:2 w:2)143	// Storage: Nonfungible Owned (r:0 w:2)144	fn transfer_from() -> Weight {145		(32_196_000 as Weight)146			.saturating_add(T::DbWeight::get().reads(4 as Weight))147			.saturating_add(T::DbWeight::get().writes(6 as Weight))148	}149	// Storage: Nonfungible Allowance (r:1 w:1)150	// Storage: Nonfungible TokenData (r:1 w:1)151	// Storage: Nonfungible TokensBurnt (r:1 w:1)152	// Storage: Nonfungible AccountBalance (r:1 w:1)153	// Storage: Nonfungible Owned (r:0 w:1)154	fn burn_from() -> Weight {155		(27_580_000 as Weight)156			.saturating_add(T::DbWeight::get().reads(4 as Weight))157			.saturating_add(T::DbWeight::get().writes(5 as Weight))158	}159	// Storage: Common CollectionPropertyPermissions (r:1 w:1)160	fn set_property_permissions(b: u32, ) -> Weight {161		(0 as Weight)162			// Standard Error: 3_432_000163			.saturating_add((126_888_000 as Weight).saturating_mul(b as Weight))164			.saturating_add(T::DbWeight::get().reads(1 as Weight))165			.saturating_add(T::DbWeight::get().writes(1 as Weight))166	}167	// Storage: Common CollectionPropertyPermissions (r:1 w:0)168	// Storage: Nonfungible TokenData (r:1 w:0)169	// Storage: Nonfungible TokenProperties (r:1 w:1)170	fn set_token_properties(b: u32, ) -> Weight {171		(0 as Weight)172			// Standard Error: 158_583_000173			.saturating_add((4_707_700_000 as Weight).saturating_mul(b as Weight))174			.saturating_add(T::DbWeight::get().reads(3 as Weight))175			.saturating_add(T::DbWeight::get().writes(1 as Weight))176	}177	// Storage: Common CollectionPropertyPermissions (r:1 w:0)178	// Storage: Nonfungible TokenData (r:1 w:0)179	// Storage: Nonfungible TokenProperties (r:1 w:1)180	fn delete_token_properties(b: u32, ) -> Weight {181		(0 as Weight)182			// Standard Error: 169_018_000183			.saturating_add((4_783_967_000 as Weight).saturating_mul(b as Weight))184			.saturating_add(T::DbWeight::get().reads(3 as Weight))185			.saturating_add(T::DbWeight::get().writes(1 as Weight))186	}187}188189// For backwards compatibility and tests190impl WeightInfo for () {191	// Storage: Nonfungible TokensMinted (r:1 w:1)192	// Storage: Nonfungible AccountBalance (r:1 w:1)193	// Storage: Nonfungible TokenData (r:0 w:1)194	// Storage: Nonfungible Owned (r:0 w:1)195	fn create_item() -> Weight {196		(18_450_000 as Weight)197			.saturating_add(RocksDbWeight::get().reads(2 as Weight))198			.saturating_add(RocksDbWeight::get().writes(4 as Weight))199	}200	// Storage: Nonfungible TokensMinted (r:1 w:1)201	// Storage: Nonfungible AccountBalance (r:1 w:1)202	// Storage: Nonfungible TokenData (r:0 w:4)203	// Storage: Nonfungible Owned (r:0 w:4)204	fn create_multiple_items(b: u32, ) -> Weight {205		(10_228_000 as Weight)206			// Standard Error: 1_000207			.saturating_add((4_392_000 as Weight).saturating_mul(b as Weight))208			.saturating_add(RocksDbWeight::get().reads(2 as Weight))209			.saturating_add(RocksDbWeight::get().writes(2 as Weight))210			.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))211	}212	// Storage: Nonfungible TokensMinted (r:1 w:1)213	// Storage: Nonfungible AccountBalance (r:4 w:4)214	// Storage: Nonfungible TokenData (r:0 w:4)215	// Storage: Nonfungible Owned (r:0 w:4)216	fn create_multiple_items_ex(b: u32, ) -> Weight {217		(6_543_000 as Weight)218			// Standard Error: 2_000219			.saturating_add((7_175_000 as Weight).saturating_mul(b as Weight))220			.saturating_add(RocksDbWeight::get().reads(1 as Weight))221			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))222			.saturating_add(RocksDbWeight::get().writes(1 as Weight))223			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))224	}225	// Storage: Nonfungible TokenData (r:1 w:1)226	// Storage: Nonfungible TokensBurnt (r:1 w:1)227	// Storage: Nonfungible AccountBalance (r:1 w:1)228	// Storage: Nonfungible Allowance (r:1 w:0)229	// Storage: Nonfungible Owned (r:0 w:1)230	fn burn_item() -> Weight {231		(24_554_000 as Weight)232			.saturating_add(RocksDbWeight::get().reads(4 as Weight))233			.saturating_add(RocksDbWeight::get().writes(4 as Weight))234	}235236	// Storage: Nonfungible TokenData (r:1 w:1)237	// Storage: Nonfungible AccountBalance (r:2 w:2)238	// Storage: Nonfungible Allowance (r:1 w:0)239	// Storage: Nonfungible Owned (r:0 w:2)240	fn transfer() -> Weight {241		(28_339_000 as Weight)242			.saturating_add(RocksDbWeight::get().reads(4 as Weight))243			.saturating_add(RocksDbWeight::get().writes(5 as Weight))244	}245	// Storage: Nonfungible TokenData (r:1 w:0)246	// Storage: Nonfungible Allowance (r:1 w:1)247	fn approve() -> Weight {248		(17_616_000 as Weight)249			.saturating_add(RocksDbWeight::get().reads(2 as Weight))250			.saturating_add(RocksDbWeight::get().writes(1 as Weight))251	}252	// Storage: Nonfungible Allowance (r:1 w:1)253	// Storage: Nonfungible TokenData (r:1 w:1)254	// Storage: Nonfungible AccountBalance (r:2 w:2)255	// Storage: Nonfungible Owned (r:0 w:2)256	fn transfer_from() -> Weight {257		(32_196_000 as Weight)258			.saturating_add(RocksDbWeight::get().reads(4 as Weight))259			.saturating_add(RocksDbWeight::get().writes(6 as Weight))260	}261	// Storage: Nonfungible Allowance (r:1 w:1)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 Owned (r:0 w:1)266	fn burn_from() -> Weight {267		(27_580_000 as Weight)268			.saturating_add(RocksDbWeight::get().reads(4 as Weight))269			.saturating_add(RocksDbWeight::get().writes(5 as Weight))270	}271	// Storage: Common CollectionPropertyPermissions (r:1 w:1)272	fn set_property_permissions(b: u32, ) -> Weight {273		(0 as Weight)274			// Standard Error: 3_432_000275			.saturating_add((126_888_000 as Weight).saturating_mul(b as Weight))276			.saturating_add(RocksDbWeight::get().reads(1 as Weight))277			.saturating_add(RocksDbWeight::get().writes(1 as Weight))278	}279	// Storage: Common CollectionPropertyPermissions (r:1 w:0)280	// Storage: Nonfungible TokenData (r:1 w:0)281	// Storage: Nonfungible TokenProperties (r:1 w:1)282	fn set_token_properties(b: u32, ) -> Weight {283		(0 as Weight)284			// Standard Error: 158_583_000285			.saturating_add((4_707_700_000 as Weight).saturating_mul(b as Weight))286			.saturating_add(RocksDbWeight::get().reads(3 as Weight))287			.saturating_add(RocksDbWeight::get().writes(1 as Weight))288	}289	// Storage: Common CollectionPropertyPermissions (r:1 w:0)290	// Storage: Nonfungible TokenData (r:1 w:0)291	// Storage: Nonfungible TokenProperties (r:1 w:1)292	fn delete_token_properties(b: u32, ) -> Weight {293		(0 as Weight)294			// Standard Error: 169_018_000295			.saturating_add((4_783_967_000 as Weight).saturating_mul(b as Weight))296			.saturating_add(RocksDbWeight::get().reads(3 as Weight))297			.saturating_add(RocksDbWeight::get().writes(1 as Weight))298	}299}