git.delta.rocks / unique-network / refs/commits / 7563962a61ba

difftreelog

source

pallets/refungible/src/weights.rs15.6 KiBsourcehistory
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_refungible4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2022-06-27, 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-refungible15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=8023// --heap-pages=409624// --output=./pallets/refungible/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_refungible.35pub trait WeightInfo {36	fn create_item() -> Weight;37	fn create_multiple_items(b: u32, ) -> Weight;38	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight;39	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight;40	fn burn_item_partial() -> Weight;41	fn burn_item_fully() -> Weight;42	fn transfer_normal() -> Weight;43	fn transfer_creating() -> Weight;44	fn transfer_removing() -> Weight;45	fn transfer_creating_removing() -> Weight;46	fn approve() -> Weight;47	fn transfer_from_normal() -> Weight;48	fn transfer_from_creating() -> Weight;49	fn transfer_from_removing() -> Weight;50	fn transfer_from_creating_removing() -> Weight;51	fn burn_from() -> Weight;52	fn repartition_item() -> Weight;53}5455/// Weights for pallet_refungible using the Substrate node and recommended hardware.56pub struct SubstrateWeight<T>(PhantomData<T>);57impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {58	// Storage: Refungible TokensMinted (r:1 w:1)59	// Storage: Refungible AccountBalance (r:1 w:1)60	// Storage: Refungible Balance (r:0 w:1)61	// Storage: Refungible TotalSupply (r:0 w:1)62	// Storage: Refungible TokenData (r:0 w:1)63	// Storage: Refungible Owned (r:0 w:1)64	fn create_item() -> Weight {65		(17_553_000 as Weight)66			.saturating_add(T::DbWeight::get().reads(2 as Weight))67			.saturating_add(T::DbWeight::get().writes(6 as Weight))68	}69	// Storage: Refungible TokensMinted (r:1 w:1)70	// Storage: Refungible AccountBalance (r:1 w:1)71	// Storage: Refungible Balance (r:0 w:4)72	// Storage: Refungible TotalSupply (r:0 w:4)73	// Storage: Refungible TokenData (r:0 w:4)74	// Storage: Refungible Owned (r:0 w:4)75	fn create_multiple_items(b: u32, ) -> Weight {76		(10_654_000 as Weight)77			// Standard Error: 1_00078			.saturating_add((5_114_000 as Weight).saturating_mul(b as Weight))79			.saturating_add(T::DbWeight::get().reads(2 as Weight))80			.saturating_add(T::DbWeight::get().writes(2 as Weight))81			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))82	}83	// Storage: Refungible TokensMinted (r:1 w:1)84	// Storage: Refungible AccountBalance (r:4 w:4)85	// Storage: Refungible Balance (r:0 w:4)86	// Storage: Refungible TotalSupply (r:0 w:4)87	// Storage: Refungible TokenData (r:0 w:4)88	// Storage: Refungible Owned (r:0 w:4)89	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {90		(3_587_000 as Weight)91			// Standard Error: 2_00092			.saturating_add((7_931_000 as Weight).saturating_mul(b as Weight))93			.saturating_add(T::DbWeight::get().reads(1 as Weight))94			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))95			.saturating_add(T::DbWeight::get().writes(1 as Weight))96			.saturating_add(T::DbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))97	}98	// Storage: Refungible TokensMinted (r:1 w:1)99	// Storage: Refungible TotalSupply (r:0 w:1)100	// Storage: Refungible TokenData (r:0 w:1)101	// Storage: Refungible AccountBalance (r:4 w:4)102	// Storage: Refungible Balance (r:0 w:4)103	// Storage: Refungible Owned (r:0 w:4)104	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {105		(1_980_000 as Weight)106			// Standard Error: 2_000107			.saturating_add((6_305_000 as Weight).saturating_mul(b as Weight))108			.saturating_add(T::DbWeight::get().reads(1 as Weight))109			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))110			.saturating_add(T::DbWeight::get().writes(3 as Weight))111			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))112	}113	// Storage: Refungible TotalSupply (r:1 w:1)114	// Storage: Refungible Balance (r:1 w:1)115	// Storage: Refungible AccountBalance (r:1 w:1)116	// Storage: Refungible Owned (r:0 w:1)117	fn burn_item_partial() -> Weight {118		(21_010_000 as Weight)119			.saturating_add(T::DbWeight::get().reads(3 as Weight))120			.saturating_add(T::DbWeight::get().writes(4 as Weight))121	}122	// Storage: Refungible TotalSupply (r:1 w:1)123	// Storage: Refungible Balance (r:1 w:1)124	// Storage: Refungible AccountBalance (r:1 w:1)125	// Storage: Refungible TokensBurnt (r:1 w:1)126	// Storage: Refungible TokenData (r:0 w:1)127	// Storage: Refungible Owned (r:0 w:1)128	fn burn_item_fully() -> Weight {129		(28_413_000 as Weight)130			.saturating_add(T::DbWeight::get().reads(4 as Weight))131			.saturating_add(T::DbWeight::get().writes(6 as Weight))132	}133	// Storage: Refungible Balance (r:2 w:2)134	fn transfer_normal() -> Weight {135		(17_513_000 as Weight)136			.saturating_add(T::DbWeight::get().reads(2 as Weight))137			.saturating_add(T::DbWeight::get().writes(2 as Weight))138	}139	// Storage: Refungible Balance (r:2 w:2)140	// Storage: Refungible AccountBalance (r:1 w:1)141	// Storage: Refungible Owned (r:0 w:1)142	fn transfer_creating() -> Weight {143		(20_469_000 as Weight)144			.saturating_add(T::DbWeight::get().reads(3 as Weight))145			.saturating_add(T::DbWeight::get().writes(4 as Weight))146	}147	// Storage: Refungible Balance (r:2 w:2)148	// Storage: Refungible AccountBalance (r:1 w:1)149	// Storage: Refungible Owned (r:0 w:1)150	fn transfer_removing() -> Weight {151		(22_472_000 as Weight)152			.saturating_add(T::DbWeight::get().reads(3 as Weight))153			.saturating_add(T::DbWeight::get().writes(4 as Weight))154	}155	// Storage: Refungible Balance (r:2 w:2)156	// Storage: Refungible AccountBalance (r:2 w:2)157	// Storage: Refungible Owned (r:0 w:2)158	fn transfer_creating_removing() -> Weight {159		(24_866_000 as Weight)160			.saturating_add(T::DbWeight::get().reads(4 as Weight))161			.saturating_add(T::DbWeight::get().writes(6 as Weight))162	}163	// Storage: Refungible Balance (r:1 w:0)164	// Storage: Refungible Allowance (r:0 w:1)165	fn approve() -> Weight {166		(13_475_000 as Weight)167			.saturating_add(T::DbWeight::get().reads(1 as Weight))168			.saturating_add(T::DbWeight::get().writes(1 as Weight))169	}170	// Storage: Refungible Allowance (r:1 w:1)171	// Storage: Refungible Balance (r:2 w:2)172	fn transfer_from_normal() -> Weight {173		(24_707_000 as Weight)174			.saturating_add(T::DbWeight::get().reads(3 as Weight))175			.saturating_add(T::DbWeight::get().writes(3 as Weight))176	}177	// Storage: Refungible Allowance (r:1 w:1)178	// Storage: Refungible Balance (r:2 w:2)179	// Storage: Refungible AccountBalance (r:1 w:1)180	// Storage: Refungible Owned (r:0 w:1)181	fn transfer_from_creating() -> Weight {182		(27_812_000 as Weight)183			.saturating_add(T::DbWeight::get().reads(4 as Weight))184			.saturating_add(T::DbWeight::get().writes(5 as Weight))185	}186	// Storage: Refungible Allowance (r:1 w:1)187	// Storage: Refungible Balance (r:2 w:2)188	// Storage: Refungible AccountBalance (r:1 w:1)189	// Storage: Refungible Owned (r:0 w:1)190	fn transfer_from_removing() -> Weight {191		(29_966_000 as Weight)192			.saturating_add(T::DbWeight::get().reads(4 as Weight))193			.saturating_add(T::DbWeight::get().writes(5 as Weight))194	}195	// Storage: Refungible Allowance (r:1 w:1)196	// Storage: Refungible Balance (r:2 w:2)197	// Storage: Refungible AccountBalance (r:2 w:2)198	// Storage: Refungible Owned (r:0 w:2)199	fn transfer_from_creating_removing() -> Weight {200		(31_660_000 as Weight)201			.saturating_add(T::DbWeight::get().reads(5 as Weight))202			.saturating_add(T::DbWeight::get().writes(7 as Weight))203	}204	// Storage: Refungible Allowance (r:1 w:1)205	// Storage: Refungible TotalSupply (r:1 w:1)206	// Storage: Refungible Balance (r:1 w:1)207	// Storage: Refungible AccountBalance (r:1 w:1)208	// Storage: Refungible TokensBurnt (r:1 w:1)209	// Storage: Refungible TokenData (r:0 w:1)210	// Storage: Refungible Owned (r:0 w:1)211	fn burn_from() -> Weight {212		(36_248_000 as Weight)213			.saturating_add(T::DbWeight::get().reads(5 as Weight))214			.saturating_add(T::DbWeight::get().writes(7 as Weight))215	}216	// Storage: Refungible TotalSupply (r:1 w:1)217	// Storage: Refungible Balance (r:1 w:1)218	fn repartition_item() -> Weight {219		(8_226_000 as Weight)220			.saturating_add(T::DbWeight::get().reads(2 as Weight))221			.saturating_add(T::DbWeight::get().writes(2 as Weight))222	}223}224225// For backwards compatibility and tests226impl WeightInfo for () {227	// Storage: Refungible TokensMinted (r:1 w:1)228	// Storage: Refungible AccountBalance (r:1 w:1)229	// Storage: Refungible Balance (r:0 w:1)230	// Storage: Refungible TotalSupply (r:0 w:1)231	// Storage: Refungible TokenData (r:0 w:1)232	// Storage: Refungible Owned (r:0 w:1)233	fn create_item() -> Weight {234		(17_553_000 as Weight)235			.saturating_add(RocksDbWeight::get().reads(2 as Weight))236			.saturating_add(RocksDbWeight::get().writes(6 as Weight))237	}238	// Storage: Refungible TokensMinted (r:1 w:1)239	// Storage: Refungible AccountBalance (r:1 w:1)240	// Storage: Refungible Balance (r:0 w:4)241	// Storage: Refungible TotalSupply (r:0 w:4)242	// Storage: Refungible TokenData (r:0 w:4)243	// Storage: Refungible Owned (r:0 w:4)244	fn create_multiple_items(b: u32, ) -> Weight {245		(10_654_000 as Weight)246			// Standard Error: 1_000247			.saturating_add((5_114_000 as Weight).saturating_mul(b as Weight))248			.saturating_add(RocksDbWeight::get().reads(2 as Weight))249			.saturating_add(RocksDbWeight::get().writes(2 as Weight))250			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))251	}252	// Storage: Refungible TokensMinted (r:1 w:1)253	// Storage: Refungible AccountBalance (r:4 w:4)254	// Storage: Refungible Balance (r:0 w:4)255	// Storage: Refungible TotalSupply (r:0 w:4)256	// Storage: Refungible TokenData (r:0 w:4)257	// Storage: Refungible Owned (r:0 w:4)258	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {259		(3_587_000 as Weight)260			// Standard Error: 2_000261			.saturating_add((7_931_000 as Weight).saturating_mul(b as Weight))262			.saturating_add(RocksDbWeight::get().reads(1 as Weight))263			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))264			.saturating_add(RocksDbWeight::get().writes(1 as Weight))265			.saturating_add(RocksDbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))266	}267	// Storage: Refungible TokensMinted (r:1 w:1)268	// Storage: Refungible TotalSupply (r:0 w:1)269	// Storage: Refungible TokenData (r:0 w:1)270	// Storage: Refungible AccountBalance (r:4 w:4)271	// Storage: Refungible Balance (r:0 w:4)272	// Storage: Refungible Owned (r:0 w:4)273	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {274		(1_980_000 as Weight)275			// Standard Error: 2_000276			.saturating_add((6_305_000 as Weight).saturating_mul(b as Weight))277			.saturating_add(RocksDbWeight::get().reads(1 as Weight))278			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))279			.saturating_add(RocksDbWeight::get().writes(3 as Weight))280			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))281	}282	// Storage: Refungible TotalSupply (r:1 w:1)283	// Storage: Refungible Balance (r:1 w:1)284	// Storage: Refungible AccountBalance (r:1 w:1)285	// Storage: Refungible Owned (r:0 w:1)286	fn burn_item_partial() -> Weight {287		(21_010_000 as Weight)288			.saturating_add(RocksDbWeight::get().reads(3 as Weight))289			.saturating_add(RocksDbWeight::get().writes(4 as Weight))290	}291	// Storage: Refungible TotalSupply (r:1 w:1)292	// Storage: Refungible Balance (r:1 w:1)293	// Storage: Refungible AccountBalance (r:1 w:1)294	// Storage: Refungible TokensBurnt (r:1 w:1)295	// Storage: Refungible TokenData (r:0 w:1)296	// Storage: Refungible Owned (r:0 w:1)297	fn burn_item_fully() -> Weight {298		(28_413_000 as Weight)299			.saturating_add(RocksDbWeight::get().reads(4 as Weight))300			.saturating_add(RocksDbWeight::get().writes(6 as Weight))301	}302	// Storage: Refungible Balance (r:2 w:2)303	fn transfer_normal() -> Weight {304		(17_513_000 as Weight)305			.saturating_add(RocksDbWeight::get().reads(2 as Weight))306			.saturating_add(RocksDbWeight::get().writes(2 as Weight))307	}308	// Storage: Refungible Balance (r:2 w:2)309	// Storage: Refungible AccountBalance (r:1 w:1)310	// Storage: Refungible Owned (r:0 w:1)311	fn transfer_creating() -> Weight {312		(20_469_000 as Weight)313			.saturating_add(RocksDbWeight::get().reads(3 as Weight))314			.saturating_add(RocksDbWeight::get().writes(4 as Weight))315	}316	// Storage: Refungible Balance (r:2 w:2)317	// Storage: Refungible AccountBalance (r:1 w:1)318	// Storage: Refungible Owned (r:0 w:1)319	fn transfer_removing() -> Weight {320		(22_472_000 as Weight)321			.saturating_add(RocksDbWeight::get().reads(3 as Weight))322			.saturating_add(RocksDbWeight::get().writes(4 as Weight))323	}324	// Storage: Refungible Balance (r:2 w:2)325	// Storage: Refungible AccountBalance (r:2 w:2)326	// Storage: Refungible Owned (r:0 w:2)327	fn transfer_creating_removing() -> Weight {328		(24_866_000 as Weight)329			.saturating_add(RocksDbWeight::get().reads(4 as Weight))330			.saturating_add(RocksDbWeight::get().writes(6 as Weight))331	}332	// Storage: Refungible Balance (r:1 w:0)333	// Storage: Refungible Allowance (r:0 w:1)334	fn approve() -> Weight {335		(13_475_000 as Weight)336			.saturating_add(RocksDbWeight::get().reads(1 as Weight))337			.saturating_add(RocksDbWeight::get().writes(1 as Weight))338	}339	// Storage: Refungible Allowance (r:1 w:1)340	// Storage: Refungible Balance (r:2 w:2)341	fn transfer_from_normal() -> Weight {342		(24_707_000 as Weight)343			.saturating_add(RocksDbWeight::get().reads(3 as Weight))344			.saturating_add(RocksDbWeight::get().writes(3 as Weight))345	}346	// Storage: Refungible Allowance (r:1 w:1)347	// Storage: Refungible Balance (r:2 w:2)348	// Storage: Refungible AccountBalance (r:1 w:1)349	// Storage: Refungible Owned (r:0 w:1)350	fn transfer_from_creating() -> Weight {351		(27_812_000 as Weight)352			.saturating_add(RocksDbWeight::get().reads(4 as Weight))353			.saturating_add(RocksDbWeight::get().writes(5 as Weight))354	}355	// Storage: Refungible Allowance (r:1 w:1)356	// Storage: Refungible Balance (r:2 w:2)357	// Storage: Refungible AccountBalance (r:1 w:1)358	// Storage: Refungible Owned (r:0 w:1)359	fn transfer_from_removing() -> Weight {360		(29_966_000 as Weight)361			.saturating_add(RocksDbWeight::get().reads(4 as Weight))362			.saturating_add(RocksDbWeight::get().writes(5 as Weight))363	}364	// Storage: Refungible Allowance (r:1 w:1)365	// Storage: Refungible Balance (r:2 w:2)366	// Storage: Refungible AccountBalance (r:2 w:2)367	// Storage: Refungible Owned (r:0 w:2)368	fn transfer_from_creating_removing() -> Weight {369		(31_660_000 as Weight)370			.saturating_add(RocksDbWeight::get().reads(5 as Weight))371			.saturating_add(RocksDbWeight::get().writes(7 as Weight))372	}373	// Storage: Refungible Allowance (r:1 w:1)374	// Storage: Refungible TotalSupply (r:1 w:1)375	// Storage: Refungible Balance (r:1 w:1)376	// Storage: Refungible AccountBalance (r:1 w:1)377	// Storage: Refungible TokensBurnt (r:1 w:1)378	// Storage: Refungible TokenData (r:0 w:1)379	// Storage: Refungible Owned (r:0 w:1)380	fn burn_from() -> Weight {381		(36_248_000 as Weight)382			.saturating_add(RocksDbWeight::get().reads(5 as Weight))383			.saturating_add(RocksDbWeight::get().writes(7 as Weight))384	}385	// Storage: Refungible TotalSupply (r:1 w:1)386	// Storage: Refungible Balance (r:1 w:1)387	fn repartition_item() -> Weight {388		(8_226_000 as Weight)389			.saturating_add(RocksDbWeight::get().reads(2 as Weight))390			.saturating_add(RocksDbWeight::get().writes(2 as Weight))391	}392}