git.delta.rocks / unique-network / refs/commits / 00a765656f26

difftreelog

source

pallets/nonfungible/src/weights.rs13.5 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 burn_recursively_self_raw() -> Weight;40	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight;41	fn transfer() -> Weight;42	fn approve() -> Weight;43	fn transfer_from() -> Weight;44	fn burn_from() -> Weight;45	fn set_property_permissions(b: u32) -> Weight;46	fn set_token_properties(b: u32) -> Weight;47	fn delete_token_properties(b: u32) -> Weight;48}4950/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.51pub struct SubstrateWeight<T>(PhantomData<T>);52impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {53	// Storage: Nonfungible TokensMinted (r:1 w:1)54	// Storage: Nonfungible AccountBalance (r:1 w:1)55	// Storage: Nonfungible TokenData (r:0 w:1)56	// Storage: Nonfungible Owned (r:0 w:1)57	fn create_item() -> Weight {58		(18_450_000 as Weight)59			.saturating_add(T::DbWeight::get().reads(2 as Weight))60			.saturating_add(T::DbWeight::get().writes(4 as Weight))61	}62	// Storage: Nonfungible TokensMinted (r:1 w:1)63	// Storage: Nonfungible AccountBalance (r:1 w:1)64	// Storage: Nonfungible TokenData (r:0 w:4)65	// Storage: Nonfungible Owned (r:0 w:4)66	fn create_multiple_items(b: u32, ) -> Weight {67		(10_228_000 as Weight)68			// Standard Error: 1_00069			.saturating_add((4_392_000 as Weight).saturating_mul(b as Weight))70			.saturating_add(T::DbWeight::get().reads(2 as Weight))71			.saturating_add(T::DbWeight::get().writes(2 as Weight))72			.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))73	}74	// Storage: Nonfungible TokensMinted (r:1 w:1)75	// Storage: Nonfungible AccountBalance (r:4 w:4)76	// Storage: Nonfungible TokenData (r:0 w:4)77	// Storage: Nonfungible Owned (r:0 w:4)78	fn create_multiple_items_ex(b: u32, ) -> Weight {79		(6_543_000 as Weight)80			// Standard Error: 2_00081			.saturating_add((7_175_000 as Weight).saturating_mul(b as Weight))82			.saturating_add(T::DbWeight::get().reads(1 as Weight))83			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))84			.saturating_add(T::DbWeight::get().writes(1 as Weight))85			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))86	}87	// Storage: Nonfungible TokenData (r:1 w:1)88	// Storage: Nonfungible TokensBurnt (r:1 w:1)89	// Storage: Nonfungible AccountBalance (r:1 w:1)90	// Storage: Nonfungible Allowance (r:1 w:0)91	// Storage: Nonfungible Owned (r:0 w:1)92	fn burn_item() -> Weight {93		(24_554_000 as Weight)94			.saturating_add(T::DbWeight::get().reads(4 as Weight))95			.saturating_add(T::DbWeight::get().writes(4 as Weight))96	}97	// Storage: Nonfungible TokenChildren (r:1 w:0)98	// Storage: Nonfungible TokenData (r:1 w:1)99	// Storage: Nonfungible TokensBurnt (r:1 w:1)100	// Storage: Nonfungible AccountBalance (r:1 w:1)101	// Storage: Nonfungible Allowance (r:1 w:0)102	// Storage: Nonfungible Owned (r:0 w:1)103	// Storage: Nonfungible TokenProperties (r:0 w:1)104	fn burn_recursively_self_raw() -> Weight {105		(86_136_000 as Weight)106			.saturating_add(T::DbWeight::get().reads(5 as Weight))107			.saturating_add(T::DbWeight::get().writes(5 as Weight))108	}109	// Storage: Nonfungible TokenChildren (r:1 w:0)110	// Storage: Nonfungible TokenData (r:1 w:1)111	// Storage: Nonfungible TokensBurnt (r:1 w:1)112	// Storage: Nonfungible AccountBalance (r:1 w:1)113	// Storage: Nonfungible Allowance (r:1 w:0)114	// Storage: Nonfungible Owned (r:0 w:1)115	// Storage: Nonfungible TokenProperties (r:0 w:1)116	// Storage: Common CollectionById (r:1 w:0)117	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {118		(0 as Weight)119			// Standard Error: 42_828_000120			.saturating_add((381_478_000 as Weight).saturating_mul(b as Weight))121			.saturating_add(T::DbWeight::get().reads(6 as Weight))122			.saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))123			.saturating_add(T::DbWeight::get().writes(5 as Weight))124			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))125	}126	// Storage: Nonfungible TokenData (r:1 w:1)127	// Storage: Nonfungible AccountBalance (r:2 w:2)128	// Storage: Nonfungible Allowance (r:1 w:0)129	// Storage: Nonfungible Owned (r:0 w:2)130	fn transfer() -> Weight {131		(28_339_000 as Weight)132			.saturating_add(T::DbWeight::get().reads(4 as Weight))133			.saturating_add(T::DbWeight::get().writes(5 as Weight))134	}135	// Storage: Nonfungible TokenData (r:1 w:0)136	// Storage: Nonfungible Allowance (r:1 w:1)137	fn approve() -> Weight {138		(17_616_000 as Weight)139			.saturating_add(T::DbWeight::get().reads(2 as Weight))140			.saturating_add(T::DbWeight::get().writes(1 as Weight))141	}142	// Storage: Nonfungible Allowance (r:1 w:1)143	// Storage: Nonfungible TokenData (r:1 w:1)144	// Storage: Nonfungible AccountBalance (r:2 w:2)145	// Storage: Nonfungible Owned (r:0 w:2)146	fn transfer_from() -> Weight {147		(32_196_000 as Weight)148			.saturating_add(T::DbWeight::get().reads(4 as Weight))149			.saturating_add(T::DbWeight::get().writes(6 as Weight))150	}151	// Storage: Nonfungible Allowance (r:1 w:1)152	// Storage: Nonfungible TokenData (r:1 w:1)153	// Storage: Nonfungible TokensBurnt (r:1 w:1)154	// Storage: Nonfungible AccountBalance (r:1 w:1)155	// Storage: Nonfungible Owned (r:0 w:1)156	fn burn_from() -> Weight {157		(27_580_000 as Weight)158			.saturating_add(T::DbWeight::get().reads(4 as Weight))159			.saturating_add(T::DbWeight::get().writes(5 as Weight))160	}161	// Storage: Common CollectionPropertyPermissions (r:1 w:1)162	fn set_property_permissions(b: u32, ) -> Weight {163		(0 as Weight)164			// Standard Error: 3_432_000165			.saturating_add((126_888_000 as Weight).saturating_mul(b as Weight))166			.saturating_add(T::DbWeight::get().reads(1 as Weight))167			.saturating_add(T::DbWeight::get().writes(1 as Weight))168	}169	// Storage: Common CollectionPropertyPermissions (r:1 w:0)170	// Storage: Nonfungible TokenData (r:1 w:0)171	// Storage: Nonfungible TokenProperties (r:1 w:1)172	fn set_token_properties(b: u32, ) -> Weight {173		(0 as Weight)174			// Standard Error: 158_583_000175			.saturating_add((4_707_700_000 as Weight).saturating_mul(b as Weight))176			.saturating_add(T::DbWeight::get().reads(3 as Weight))177			.saturating_add(T::DbWeight::get().writes(1 as Weight))178	}179	// Storage: Common CollectionPropertyPermissions (r:1 w:0)180	// Storage: Nonfungible TokenData (r:1 w:0)181	// Storage: Nonfungible TokenProperties (r:1 w:1)182	fn delete_token_properties(b: u32, ) -> Weight {183		(0 as Weight)184			// Standard Error: 169_018_000185			.saturating_add((4_783_967_000 as Weight).saturating_mul(b as Weight))186			.saturating_add(T::DbWeight::get().reads(3 as Weight))187			.saturating_add(T::DbWeight::get().writes(1 as Weight))188	}189}190191// For backwards compatibility and tests192impl WeightInfo for () {193	// Storage: Nonfungible TokensMinted (r:1 w:1)194	// Storage: Nonfungible AccountBalance (r:1 w:1)195	// Storage: Nonfungible TokenData (r:0 w:1)196	// Storage: Nonfungible Owned (r:0 w:1)197	fn create_item() -> Weight {198		(18_450_000 as Weight)199			.saturating_add(RocksDbWeight::get().reads(2 as Weight))200			.saturating_add(RocksDbWeight::get().writes(4 as Weight))201	}202	// Storage: Nonfungible TokensMinted (r:1 w:1)203	// Storage: Nonfungible AccountBalance (r:1 w:1)204	// Storage: Nonfungible TokenData (r:0 w:4)205	// Storage: Nonfungible Owned (r:0 w:4)206	fn create_multiple_items(b: u32, ) -> Weight {207		(10_228_000 as Weight)208			// Standard Error: 1_000209			.saturating_add((4_392_000 as Weight).saturating_mul(b as Weight))210			.saturating_add(RocksDbWeight::get().reads(2 as Weight))211			.saturating_add(RocksDbWeight::get().writes(2 as Weight))212			.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))213	}214	// Storage: Nonfungible TokensMinted (r:1 w:1)215	// Storage: Nonfungible AccountBalance (r:4 w:4)216	// Storage: Nonfungible TokenData (r:0 w:4)217	// Storage: Nonfungible Owned (r:0 w:4)218	fn create_multiple_items_ex(b: u32, ) -> Weight {219		(6_543_000 as Weight)220			// Standard Error: 2_000221			.saturating_add((7_175_000 as Weight).saturating_mul(b as Weight))222			.saturating_add(RocksDbWeight::get().reads(1 as Weight))223			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))224			.saturating_add(RocksDbWeight::get().writes(1 as Weight))225			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))226	}227	// Storage: Nonfungible TokenData (r:1 w:1)228	// Storage: Nonfungible TokensBurnt (r:1 w:1)229	// Storage: Nonfungible AccountBalance (r:1 w:1)230	// Storage: Nonfungible Allowance (r:1 w:0)231	// Storage: Nonfungible Owned (r:0 w:1)232	fn burn_item() -> Weight {233		(24_554_000 as Weight)234			.saturating_add(RocksDbWeight::get().reads(4 as Weight))235			.saturating_add(RocksDbWeight::get().writes(4 as Weight))236	}237	// Storage: Nonfungible TokenChildren (r:1 w:0)238	// Storage: Nonfungible TokenData (r:1 w:1)239	// Storage: Nonfungible TokensBurnt (r:1 w:1)240	// Storage: Nonfungible AccountBalance (r:1 w:1)241	// Storage: Nonfungible Allowance (r:1 w:0)242	// Storage: Nonfungible Owned (r:0 w:1)243	// Storage: Nonfungible TokenProperties (r:0 w:1)244	fn burn_recursively_self_raw() -> Weight {245		(86_136_000 as Weight)246			.saturating_add(RocksDbWeight::get().reads(5 as Weight))247			.saturating_add(RocksDbWeight::get().writes(5 as Weight))248	}249	// Storage: Nonfungible TokenChildren (r:1 w:0)250	// Storage: Nonfungible TokenData (r:1 w:1)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	// Storage: Common CollectionById (r:1 w:0)257	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {258		(0 as Weight)259			// Standard Error: 42_828_000260			.saturating_add((381_478_000 as Weight).saturating_mul(b as Weight))261			.saturating_add(RocksDbWeight::get().reads(6 as Weight))262			.saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))263			.saturating_add(RocksDbWeight::get().writes(5 as Weight))264			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))265	}266	// Storage: Nonfungible TokenData (r:1 w:1)267	// Storage: Nonfungible AccountBalance (r:2 w:2)268	// Storage: Nonfungible Allowance (r:1 w:0)269	// Storage: Nonfungible Owned (r:0 w:2)270	fn transfer() -> Weight {271		(28_339_000 as Weight)272			.saturating_add(RocksDbWeight::get().reads(4 as Weight))273			.saturating_add(RocksDbWeight::get().writes(5 as Weight))274	}275	// Storage: Nonfungible TokenData (r:1 w:0)276	// Storage: Nonfungible Allowance (r:1 w:1)277	fn approve() -> Weight {278		(17_616_000 as Weight)279			.saturating_add(RocksDbWeight::get().reads(2 as Weight))280			.saturating_add(RocksDbWeight::get().writes(1 as Weight))281	}282	// Storage: Nonfungible Allowance (r:1 w:1)283	// Storage: Nonfungible TokenData (r:1 w:1)284	// Storage: Nonfungible AccountBalance (r:2 w:2)285	// Storage: Nonfungible Owned (r:0 w:2)286	fn transfer_from() -> Weight {287		(32_196_000 as Weight)288			.saturating_add(RocksDbWeight::get().reads(4 as Weight))289			.saturating_add(RocksDbWeight::get().writes(6 as Weight))290	}291	// Storage: Nonfungible Allowance (r:1 w:1)292	// Storage: Nonfungible TokenData (r:1 w:1)293	// Storage: Nonfungible TokensBurnt (r:1 w:1)294	// Storage: Nonfungible AccountBalance (r:1 w:1)295	// Storage: Nonfungible Owned (r:0 w:1)296	fn burn_from() -> Weight {297		(27_580_000 as Weight)298			.saturating_add(RocksDbWeight::get().reads(4 as Weight))299			.saturating_add(RocksDbWeight::get().writes(5 as Weight))300	}301	// Storage: Common CollectionPropertyPermissions (r:1 w:1)302	fn set_property_permissions(b: u32, ) -> Weight {303		(0 as Weight)304			// Standard Error: 3_432_000305			.saturating_add((126_888_000 as Weight).saturating_mul(b as Weight))306			.saturating_add(RocksDbWeight::get().reads(1 as Weight))307			.saturating_add(RocksDbWeight::get().writes(1 as Weight))308	}309	// Storage: Common CollectionPropertyPermissions (r:1 w:0)310	// Storage: Nonfungible TokenData (r:1 w:0)311	// Storage: Nonfungible TokenProperties (r:1 w:1)312	fn set_token_properties(b: u32, ) -> Weight {313		(0 as Weight)314			// Standard Error: 158_583_000315			.saturating_add((4_707_700_000 as Weight).saturating_mul(b as Weight))316			.saturating_add(RocksDbWeight::get().reads(3 as Weight))317			.saturating_add(RocksDbWeight::get().writes(1 as Weight))318	}319	// Storage: Common CollectionPropertyPermissions (r:1 w:0)320	// Storage: Nonfungible TokenData (r:1 w:0)321	// Storage: Nonfungible TokenProperties (r:1 w:1)322	fn delete_token_properties(b: u32, ) -> Weight {323		(0 as Weight)324			// Standard Error: 169_018_000325			.saturating_add((4_783_967_000 as Weight).saturating_mul(b as Weight))326			.saturating_add(RocksDbWeight::get().reads(3 as Weight))327			.saturating_add(RocksDbWeight::get().writes(1 as Weight))328	}329}