git.delta.rocks / unique-network / refs/commits / 4dff934f02cf

difftreelog

source

pallets/nonfungible/src/weights.rs16.0 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-12-26, 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	fn repair_item() -> Weight;54}5556/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.57pub struct SubstrateWeight<T>(PhantomData<T>);58impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {59	// Storage: Nonfungible TokensMinted (r:1 w:1)60	// Storage: Nonfungible AccountBalance (r:1 w:1)61	// Storage: Nonfungible TokenData (r:0 w:1)62	// Storage: Nonfungible Owned (r:0 w:1)63	fn create_item() -> Weight {64		Weight::from_ref_time(26_377_000 as u64)65			.saturating_add(T::DbWeight::get().reads(2 as u64))66			.saturating_add(T::DbWeight::get().writes(4 as u64))67	}68	// Storage: Nonfungible TokensMinted (r:1 w:1)69	// Storage: Nonfungible AccountBalance (r:1 w:1)70	// Storage: Nonfungible TokenData (r:0 w:4)71	// Storage: Nonfungible Owned (r:0 w:4)72	fn create_multiple_items(b: u32, ) -> Weight {73		Weight::from_ref_time(20_059_186 as u64)74			// Standard Error: 4_73575			.saturating_add(Weight::from_ref_time(4_856_306 as u64).saturating_mul(b as u64))76			.saturating_add(T::DbWeight::get().reads(2 as u64))77			.saturating_add(T::DbWeight::get().writes(2 as u64))78			.saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(b as u64)))79	}80	// Storage: Nonfungible TokensMinted (r:1 w:1)81	// Storage: Nonfungible AccountBalance (r:4 w:4)82	// Storage: Nonfungible TokenData (r:0 w:4)83	// Storage: Nonfungible Owned (r:0 w:4)84	fn create_multiple_items_ex(b: u32, ) -> Weight {85		Weight::from_ref_time(16_365_581 as u64)86			// Standard Error: 9_71187			.saturating_add(Weight::from_ref_time(6_681_940 as u64).saturating_mul(b as u64))88			.saturating_add(T::DbWeight::get().reads(1 as u64))89			.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))90			.saturating_add(T::DbWeight::get().writes(1 as u64))91			.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(b as u64)))92	}93	// Storage: Nonfungible TokenData (r:1 w:1)94	// Storage: Nonfungible TokenChildren (r:1 w:0)95	// Storage: Nonfungible TokensBurnt (r:1 w:1)96	// Storage: Nonfungible AccountBalance (r:1 w:1)97	// Storage: Nonfungible Allowance (r:1 w:0)98	// Storage: Nonfungible Owned (r:0 w:1)99	// Storage: Nonfungible TokenProperties (r:0 w:1)100	fn burn_item() -> Weight {101		Weight::from_ref_time(33_502_000 as u64)102			.saturating_add(T::DbWeight::get().reads(5 as u64))103			.saturating_add(T::DbWeight::get().writes(5 as u64))104	}105	// Storage: Nonfungible TokenChildren (r:1 w:0)106	// Storage: Nonfungible TokenData (r:1 w:1)107	// Storage: Nonfungible TokensBurnt (r:1 w:1)108	// Storage: Nonfungible AccountBalance (r:1 w:1)109	// Storage: Nonfungible Allowance (r:1 w:0)110	// Storage: Nonfungible Owned (r:0 w:1)111	// Storage: Nonfungible TokenProperties (r:0 w:1)112	fn burn_recursively_self_raw() -> Weight {113		Weight::from_ref_time(43_255_000 as u64)114			.saturating_add(T::DbWeight::get().reads(5 as u64))115			.saturating_add(T::DbWeight::get().writes(5 as u64))116	}117	// Storage: Nonfungible TokenChildren (r:1 w:0)118	// Storage: Nonfungible TokenData (r:1 w:1)119	// Storage: Nonfungible TokensBurnt (r:1 w:1)120	// Storage: Nonfungible AccountBalance (r:1 w:1)121	// Storage: Nonfungible Allowance (r:1 w:0)122	// Storage: Nonfungible Owned (r:0 w:1)123	// Storage: Nonfungible TokenProperties (r:0 w:1)124	// Storage: Common CollectionById (r:1 w:0)125	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {126		Weight::from_ref_time(42_992_000 as u64)127			// Standard Error: 1_010_119128			.saturating_add(Weight::from_ref_time(209_972_755 as u64).saturating_mul(b as u64))129			.saturating_add(T::DbWeight::get().reads(7 as u64))130			.saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(b as u64)))131			.saturating_add(T::DbWeight::get().writes(6 as u64))132			.saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(b as u64)))133	}134	// Storage: Nonfungible TokenData (r:1 w:1)135	// Storage: Nonfungible AccountBalance (r:2 w:2)136	// Storage: Nonfungible Allowance (r:1 w:0)137	// Storage: Nonfungible Owned (r:0 w:2)138	fn transfer() -> Weight {139		Weight::from_ref_time(31_239_000 as u64)140			.saturating_add(T::DbWeight::get().reads(4 as u64))141			.saturating_add(T::DbWeight::get().writes(5 as u64))142	}143	// Storage: Nonfungible TokenData (r:1 w:0)144	// Storage: Nonfungible Allowance (r:1 w:1)145	fn approve() -> Weight {146		Weight::from_ref_time(21_985_000 as u64)147			.saturating_add(T::DbWeight::get().reads(2 as u64))148			.saturating_add(T::DbWeight::get().writes(1 as u64))149	}150	// Storage: Nonfungible Allowance (r:1 w:1)151	// Storage: Nonfungible TokenData (r:1 w:1)152	// Storage: Nonfungible AccountBalance (r:2 w:2)153	// Storage: Nonfungible Owned (r:0 w:2)154	fn transfer_from() -> Weight {155		Weight::from_ref_time(36_382_000 as u64)156			.saturating_add(T::DbWeight::get().reads(4 as u64))157			.saturating_add(T::DbWeight::get().writes(6 as u64))158	}159	// Storage: Nonfungible Allowance (r:1 w:1)160	// Storage: Nonfungible TokenData (r:1 w:1)161	// Storage: Nonfungible TokenChildren (r:1 w:0)162	// Storage: Nonfungible TokensBurnt (r:1 w:1)163	// Storage: Nonfungible AccountBalance (r:1 w:1)164	// Storage: Nonfungible Owned (r:0 w:1)165	// Storage: Nonfungible TokenProperties (r:0 w:1)166	fn burn_from() -> Weight {167		Weight::from_ref_time(42_046_000 as u64)168			.saturating_add(T::DbWeight::get().reads(5 as u64))169			.saturating_add(T::DbWeight::get().writes(6 as u64))170	}171	// Storage: Common CollectionPropertyPermissions (r:1 w:1)172	fn set_token_property_permissions(b: u32, ) -> Weight {173		Weight::from_ref_time(5_543_000 as u64)174			// Standard Error: 40_525175			.saturating_add(Weight::from_ref_time(12_126_787 as u64).saturating_mul(b as u64))176			.saturating_add(T::DbWeight::get().reads(1 as u64))177			.saturating_add(T::DbWeight::get().writes(1 as u64))178	}179	// Storage: Common CollectionPropertyPermissions (r:1 w:0)180	// Storage: Nonfungible TokenProperties (r:1 w:1)181	fn set_token_properties(b: u32, ) -> Weight {182		Weight::from_ref_time(4_361_000 as u64)183			// Standard Error: 5_349_868184			.saturating_add(Weight::from_ref_time(637_246_356 as u64).saturating_mul(b as u64))185			.saturating_add(T::DbWeight::get().reads(2 as u64))186			.saturating_add(T::DbWeight::get().writes(1 as u64))187	}188	// Storage: Common CollectionPropertyPermissions (r:1 w:0)189	// Storage: Nonfungible TokenProperties (r:1 w:1)190	fn delete_token_properties(b: u32, ) -> Weight {191		Weight::from_ref_time(4_489_000 as u64)192			// Standard Error: 5_738_954193			.saturating_add(Weight::from_ref_time(689_912_822 as u64).saturating_mul(b as u64))194			.saturating_add(T::DbWeight::get().reads(2 as u64))195			.saturating_add(T::DbWeight::get().writes(1 as u64))196	}197	// Storage: Nonfungible TokenData (r:1 w:0)198	fn token_owner() -> Weight {199		Weight::from_ref_time(6_881_000 as u64)200			.saturating_add(T::DbWeight::get().reads(1 as u64))201	}202	// Storage: Nonfungible CollectionAllowance (r:0 w:1)203	fn set_allowance_for_all() -> Weight {204		Weight::from_ref_time(16_223_000 as u64)205			.saturating_add(T::DbWeight::get().writes(1 as u64))206	}207	// Storage: Nonfungible CollectionAllowance (r:1 w:0)208	fn allowance_for_all() -> Weight {209		Weight::from_ref_time(5_639_000 as u64)210			.saturating_add(T::DbWeight::get().reads(1 as u64))211	}212	// Storage: Nonfungible TokenProperties (r:1 w:1)213	fn repair_item() -> Weight {214		Weight::from_ref_time(6_111_000 as u64)215			.saturating_add(T::DbWeight::get().reads(1 as u64))216			.saturating_add(T::DbWeight::get().writes(1 as u64))217	}218}219220// For backwards compatibility and tests221impl WeightInfo for () {222	// Storage: Nonfungible TokensMinted (r:1 w:1)223	// Storage: Nonfungible AccountBalance (r:1 w:1)224	// Storage: Nonfungible TokenData (r:0 w:1)225	// Storage: Nonfungible Owned (r:0 w:1)226	fn create_item() -> Weight {227		Weight::from_ref_time(26_377_000 as u64)228			.saturating_add(RocksDbWeight::get().reads(2 as u64))229			.saturating_add(RocksDbWeight::get().writes(4 as u64))230	}231	// Storage: Nonfungible TokensMinted (r:1 w:1)232	// Storage: Nonfungible AccountBalance (r:1 w:1)233	// Storage: Nonfungible TokenData (r:0 w:4)234	// Storage: Nonfungible Owned (r:0 w:4)235	fn create_multiple_items(b: u32, ) -> Weight {236		Weight::from_ref_time(20_059_186 as u64)237			// Standard Error: 4_735238			.saturating_add(Weight::from_ref_time(4_856_306 as u64).saturating_mul(b as u64))239			.saturating_add(RocksDbWeight::get().reads(2 as u64))240			.saturating_add(RocksDbWeight::get().writes(2 as u64))241			.saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(b as u64)))242	}243	// Storage: Nonfungible TokensMinted (r:1 w:1)244	// Storage: Nonfungible AccountBalance (r:4 w:4)245	// Storage: Nonfungible TokenData (r:0 w:4)246	// Storage: Nonfungible Owned (r:0 w:4)247	fn create_multiple_items_ex(b: u32, ) -> Weight {248		Weight::from_ref_time(16_365_581 as u64)249			// Standard Error: 9_711250			.saturating_add(Weight::from_ref_time(6_681_940 as u64).saturating_mul(b as u64))251			.saturating_add(RocksDbWeight::get().reads(1 as u64))252			.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))253			.saturating_add(RocksDbWeight::get().writes(1 as u64))254			.saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(b as u64)))255	}256	// Storage: Nonfungible TokenData (r:1 w:1)257	// Storage: Nonfungible TokenChildren (r:1 w:0)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	fn burn_item() -> Weight {264		Weight::from_ref_time(33_502_000 as u64)265			.saturating_add(RocksDbWeight::get().reads(5 as u64))266			.saturating_add(RocksDbWeight::get().writes(5 as u64))267	}268	// Storage: Nonfungible TokenChildren (r:1 w:0)269	// Storage: Nonfungible TokenData (r:1 w:1)270	// Storage: Nonfungible TokensBurnt (r:1 w:1)271	// Storage: Nonfungible AccountBalance (r:1 w:1)272	// Storage: Nonfungible Allowance (r:1 w:0)273	// Storage: Nonfungible Owned (r:0 w:1)274	// Storage: Nonfungible TokenProperties (r:0 w:1)275	fn burn_recursively_self_raw() -> Weight {276		Weight::from_ref_time(43_255_000 as u64)277			.saturating_add(RocksDbWeight::get().reads(5 as u64))278			.saturating_add(RocksDbWeight::get().writes(5 as u64))279	}280	// Storage: Nonfungible TokenChildren (r:1 w:0)281	// Storage: Nonfungible TokenData (r:1 w:1)282	// Storage: Nonfungible TokensBurnt (r:1 w:1)283	// Storage: Nonfungible AccountBalance (r:1 w:1)284	// Storage: Nonfungible Allowance (r:1 w:0)285	// Storage: Nonfungible Owned (r:0 w:1)286	// Storage: Nonfungible TokenProperties (r:0 w:1)287	// Storage: Common CollectionById (r:1 w:0)288	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {289		Weight::from_ref_time(42_992_000 as u64)290			// Standard Error: 1_010_119291			.saturating_add(Weight::from_ref_time(209_972_755 as u64).saturating_mul(b as u64))292			.saturating_add(RocksDbWeight::get().reads(7 as u64))293			.saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(b as u64)))294			.saturating_add(RocksDbWeight::get().writes(6 as u64))295			.saturating_add(RocksDbWeight::get().writes((4 as u64).saturating_mul(b as u64)))296	}297	// Storage: Nonfungible TokenData (r:1 w:1)298	// Storage: Nonfungible AccountBalance (r:2 w:2)299	// Storage: Nonfungible Allowance (r:1 w:0)300	// Storage: Nonfungible Owned (r:0 w:2)301	fn transfer() -> Weight {302		Weight::from_ref_time(31_239_000 as u64)303			.saturating_add(RocksDbWeight::get().reads(4 as u64))304			.saturating_add(RocksDbWeight::get().writes(5 as u64))305	}306	// Storage: Nonfungible TokenData (r:1 w:0)307	// Storage: Nonfungible Allowance (r:1 w:1)308	fn approve() -> Weight {309		Weight::from_ref_time(21_985_000 as u64)310			.saturating_add(RocksDbWeight::get().reads(2 as u64))311			.saturating_add(RocksDbWeight::get().writes(1 as u64))312	}313	// Storage: Nonfungible Allowance (r:1 w:1)314	// Storage: Nonfungible TokenData (r:1 w:1)315	// Storage: Nonfungible AccountBalance (r:2 w:2)316	// Storage: Nonfungible Owned (r:0 w:2)317	fn transfer_from() -> Weight {318		Weight::from_ref_time(36_382_000 as u64)319			.saturating_add(RocksDbWeight::get().reads(4 as u64))320			.saturating_add(RocksDbWeight::get().writes(6 as u64))321	}322	// Storage: Nonfungible Allowance (r:1 w:1)323	// Storage: Nonfungible TokenData (r:1 w:1)324	// Storage: Nonfungible TokenChildren (r:1 w:0)325	// Storage: Nonfungible TokensBurnt (r:1 w:1)326	// Storage: Nonfungible AccountBalance (r:1 w:1)327	// Storage: Nonfungible Owned (r:0 w:1)328	// Storage: Nonfungible TokenProperties (r:0 w:1)329	fn burn_from() -> Weight {330		Weight::from_ref_time(42_046_000 as u64)331			.saturating_add(RocksDbWeight::get().reads(5 as u64))332			.saturating_add(RocksDbWeight::get().writes(6 as u64))333	}334	// Storage: Common CollectionPropertyPermissions (r:1 w:1)335	fn set_token_property_permissions(b: u32, ) -> Weight {336		Weight::from_ref_time(5_543_000 as u64)337			// Standard Error: 40_525338			.saturating_add(Weight::from_ref_time(12_126_787 as u64).saturating_mul(b as u64))339			.saturating_add(RocksDbWeight::get().reads(1 as u64))340			.saturating_add(RocksDbWeight::get().writes(1 as u64))341	}342	// Storage: Common CollectionPropertyPermissions (r:1 w:0)343	// Storage: Nonfungible TokenProperties (r:1 w:1)344	fn set_token_properties(b: u32, ) -> Weight {345		Weight::from_ref_time(4_361_000 as u64)346			// Standard Error: 5_349_868347			.saturating_add(Weight::from_ref_time(637_246_356 as u64).saturating_mul(b as u64))348			.saturating_add(RocksDbWeight::get().reads(2 as u64))349			.saturating_add(RocksDbWeight::get().writes(1 as u64))350	}351	// Storage: Common CollectionPropertyPermissions (r:1 w:0)352	// Storage: Nonfungible TokenProperties (r:1 w:1)353	fn delete_token_properties(b: u32, ) -> Weight {354		Weight::from_ref_time(4_489_000 as u64)355			// Standard Error: 5_738_954356			.saturating_add(Weight::from_ref_time(689_912_822 as u64).saturating_mul(b as u64))357			.saturating_add(RocksDbWeight::get().reads(2 as u64))358			.saturating_add(RocksDbWeight::get().writes(1 as u64))359	}360	// Storage: Nonfungible TokenData (r:1 w:0)361	fn token_owner() -> Weight {362		Weight::from_ref_time(6_881_000 as u64)363			.saturating_add(RocksDbWeight::get().reads(1 as u64))364	}365	// Storage: Nonfungible CollectionAllowance (r:0 w:1)366	fn set_allowance_for_all() -> Weight {367		Weight::from_ref_time(16_223_000 as u64)368			.saturating_add(RocksDbWeight::get().writes(1 as u64))369	}370	// Storage: Nonfungible CollectionAllowance (r:1 w:0)371	fn allowance_for_all() -> Weight {372		Weight::from_ref_time(5_639_000 as u64)373			.saturating_add(RocksDbWeight::get().reads(1 as u64))374	}375	// Storage: Nonfungible TokenProperties (r:1 w:1)376	fn repair_item() -> Weight {377		Weight::from_ref_time(6_111_000 as u64)378			.saturating_add(RocksDbWeight::get().reads(1 as u64))379			.saturating_add(RocksDbWeight::get().writes(1 as u64))380	}381}