git.delta.rocks / unique-network / refs/commits / 9bfc203a27ca

difftreelog

source

pallets/refungible/src/weights.rs12.4 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: 2021-10-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 12889// Executed Command:10// target/release/unique-collator11// benchmark12// --pallet13// pallet-refungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=2022// --output=./pallets/refungible/src/weights.rs232425#![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_refungible.34pub trait WeightInfo {35	fn create_item() -> Weight;36	fn create_multiple_items(b: u32, ) -> Weight;37	fn burn_item_partial() -> Weight;38	fn burn_item_fully() -> Weight;39	fn transfer_normal() -> Weight;40	fn transfer_creating() -> Weight;41	fn transfer_removing() -> Weight;42	fn transfer_creating_removing() -> Weight;43	fn approve() -> Weight;44	fn transfer_from_normal() -> Weight;45	fn transfer_from_creating() -> Weight;46	fn transfer_from_removing() -> Weight;47	fn transfer_from_creating_removing() -> Weight;48	fn burn_from() -> Weight;49	fn set_variable_metadata(b: u32, ) -> Weight;50}5152/// Weights for pallet_refungible using the Substrate node and recommended hardware.53pub struct SubstrateWeight<T>(PhantomData<T>);54impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {55	// Storage: Refungible TokensMinted (r:1 w:1)56	// Storage: Refungible AccountBalance (r:1 w:1)57	// Storage: Refungible Balance (r:0 w:1)58	// Storage: Refungible TotalSupply (r:0 w:1)59	// Storage: Refungible TokenData (r:0 w:1)60	// Storage: Refungible Owned (r:0 w:1)61	fn create_item() -> Weight {62		(18_681_000 as Weight)63			.saturating_add(T::DbWeight::get().reads(2 as Weight))64			.saturating_add(T::DbWeight::get().writes(6 as Weight))65	}66	// Storage: Refungible TokensMinted (r:1 w:1)67	// Storage: Refungible AccountBalance (r:1 w:1)68	// Storage: Refungible Balance (r:0 w:4)69	// Storage: Refungible TotalSupply (r:0 w:4)70	// Storage: Refungible TokenData (r:0 w:4)71	// Storage: Refungible Owned (r:0 w:4)72	fn create_multiple_items(b: u32, ) -> Weight {73		(13_869_000 as Weight)74			// Standard Error: 28_00075			.saturating_add((5_611_000 as Weight).saturating_mul(b as Weight))76			.saturating_add(T::DbWeight::get().reads(2 as Weight))77			.saturating_add(T::DbWeight::get().writes(2 as Weight))78			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))79	}80	// Storage: Refungible TotalSupply (r:1 w:1)81	// Storage: Refungible Balance (r:1 w:1)82	// Storage: Refungible AccountBalance (r:1 w:1)83	// Storage: Refungible Owned (r:0 w:1)84	fn burn_item_partial() -> Weight {85		(21_591_000 as Weight)86			.saturating_add(T::DbWeight::get().reads(3 as Weight))87			.saturating_add(T::DbWeight::get().writes(4 as Weight))88	}89	// Storage: Refungible TotalSupply (r:1 w:1)90	// Storage: Refungible Balance (r:1 w:1)91	// Storage: Refungible AccountBalance (r:1 w:1)92	// Storage: Refungible TokensBurnt (r:1 w:1)93	// Storage: Refungible TokenData (r:0 w:1)94	// Storage: Refungible Owned (r:0 w:1)95	fn burn_item_fully() -> Weight {96		(29_257_000 as Weight)97			.saturating_add(T::DbWeight::get().reads(4 as Weight))98			.saturating_add(T::DbWeight::get().writes(6 as Weight))99	}100	// Storage: Refungible Balance (r:2 w:2)101	fn transfer_normal() -> Weight {102		(17_733_000 as Weight)103			.saturating_add(T::DbWeight::get().reads(2 as Weight))104			.saturating_add(T::DbWeight::get().writes(2 as Weight))105	}106	// Storage: Refungible Balance (r:2 w:2)107	// Storage: Refungible AccountBalance (r:1 w:1)108	// Storage: Refungible Owned (r:0 w:1)109	fn transfer_creating() -> Weight {110		(20_943_000 as Weight)111			.saturating_add(T::DbWeight::get().reads(3 as Weight))112			.saturating_add(T::DbWeight::get().writes(4 as Weight))113	}114	// Storage: Refungible Balance (r:2 w:2)115	// Storage: Refungible AccountBalance (r:1 w:1)116	// Storage: Refungible Owned (r:0 w:1)117	fn transfer_removing() -> Weight {118		(22_406_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 Balance (r:2 w:2)123	// Storage: Refungible AccountBalance (r:2 w:2)124	// Storage: Refungible Owned (r:0 w:2)125	fn transfer_creating_removing() -> Weight {126		(24_762_000 as Weight)127			.saturating_add(T::DbWeight::get().reads(4 as Weight))128			.saturating_add(T::DbWeight::get().writes(6 as Weight))129	}130	// Storage: Refungible Balance (r:1 w:0)131	// Storage: Refungible Allowance (r:0 w:1)132	fn approve() -> Weight {133		(14_109_000 as Weight)134			.saturating_add(T::DbWeight::get().reads(1 as Weight))135			.saturating_add(T::DbWeight::get().writes(1 as Weight))136	}137	// Storage: Refungible Allowance (r:1 w:1)138	// Storage: Refungible Balance (r:2 w:2)139	fn transfer_from_normal() -> Weight {140		(25_348_000 as Weight)141			.saturating_add(T::DbWeight::get().reads(3 as Weight))142			.saturating_add(T::DbWeight::get().writes(3 as Weight))143	}144	// Storage: Refungible Allowance (r:1 w:1)145	// Storage: Refungible Balance (r:2 w:2)146	// Storage: Refungible AccountBalance (r:1 w:1)147	// Storage: Refungible Owned (r:0 w:1)148	fn transfer_from_creating() -> Weight {149		(28_647_000 as Weight)150			.saturating_add(T::DbWeight::get().reads(4 as Weight))151			.saturating_add(T::DbWeight::get().writes(5 as Weight))152	}153	// Storage: Refungible Allowance (r:1 w:1)154	// Storage: Refungible Balance (r:2 w:2)155	// Storage: Refungible AccountBalance (r:1 w:1)156	// Storage: Refungible Owned (r:0 w:1)157	fn transfer_from_removing() -> Weight {158		(30_472_000 as Weight)159			.saturating_add(T::DbWeight::get().reads(4 as Weight))160			.saturating_add(T::DbWeight::get().writes(5 as Weight))161	}162	// Storage: Refungible Allowance (r:1 w:1)163	// Storage: Refungible Balance (r:2 w:2)164	// Storage: Refungible AccountBalance (r:2 w:2)165	// Storage: Refungible Owned (r:0 w:2)166	fn transfer_from_creating_removing() -> Weight {167		(32_362_000 as Weight)168			.saturating_add(T::DbWeight::get().reads(5 as Weight))169			.saturating_add(T::DbWeight::get().writes(7 as Weight))170	}171	// Storage: Refungible Allowance (r:1 w:1)172	// Storage: Refungible TotalSupply (r:1 w:1)173	// Storage: Refungible Balance (r:1 w:1)174	// Storage: Refungible AccountBalance (r:1 w:1)175	// Storage: Refungible TokensBurnt (r:1 w:1)176	// Storage: Refungible TokenData (r:0 w:1)177	// Storage: Refungible Owned (r:0 w:1)178	fn burn_from() -> Weight {179		(60_903_000 as Weight)180			.saturating_add(T::DbWeight::get().reads(5 as Weight))181			.saturating_add(T::DbWeight::get().writes(7 as Weight))182	}183	// Storage: Refungible TokenData (r:1 w:1)184	fn set_variable_metadata(_b: u32, ) -> Weight {185		(6_801_000 as Weight)186			.saturating_add(T::DbWeight::get().reads(1 as Weight))187			.saturating_add(T::DbWeight::get().writes(1 as Weight))188	}189}190191// For backwards compatibility and tests192impl WeightInfo for () {193	// Storage: Refungible TokensMinted (r:1 w:1)194	// Storage: Refungible AccountBalance (r:1 w:1)195	// Storage: Refungible Balance (r:0 w:1)196	// Storage: Refungible TotalSupply (r:0 w:1)197	// Storage: Refungible TokenData (r:0 w:1)198	// Storage: Refungible Owned (r:0 w:1)199	fn create_item() -> Weight {200		(18_681_000 as Weight)201			.saturating_add(RocksDbWeight::get().reads(2 as Weight))202			.saturating_add(RocksDbWeight::get().writes(6 as Weight))203	}204	// Storage: Refungible TokensMinted (r:1 w:1)205	// Storage: Refungible AccountBalance (r:1 w:1)206	// Storage: Refungible Balance (r:0 w:4)207	// Storage: Refungible TotalSupply (r:0 w:4)208	// Storage: Refungible TokenData (r:0 w:4)209	// Storage: Refungible Owned (r:0 w:4)210	fn create_multiple_items(b: u32, ) -> Weight {211		(13_869_000 as Weight)212			// Standard Error: 28_000213			.saturating_add((5_611_000 as Weight).saturating_mul(b as Weight))214			.saturating_add(RocksDbWeight::get().reads(2 as Weight))215			.saturating_add(RocksDbWeight::get().writes(2 as Weight))216			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))217	}218	// Storage: Refungible TotalSupply (r:1 w:1)219	// Storage: Refungible Balance (r:1 w:1)220	// Storage: Refungible AccountBalance (r:1 w:1)221	// Storage: Refungible Owned (r:0 w:1)222	fn burn_item_partial() -> Weight {223		(21_591_000 as Weight)224			.saturating_add(RocksDbWeight::get().reads(3 as Weight))225			.saturating_add(RocksDbWeight::get().writes(4 as Weight))226	}227	// Storage: Refungible TotalSupply (r:1 w:1)228	// Storage: Refungible Balance (r:1 w:1)229	// Storage: Refungible AccountBalance (r:1 w:1)230	// Storage: Refungible TokensBurnt (r:1 w:1)231	// Storage: Refungible TokenData (r:0 w:1)232	// Storage: Refungible Owned (r:0 w:1)233	fn burn_item_fully() -> Weight {234		(29_257_000 as Weight)235			.saturating_add(RocksDbWeight::get().reads(4 as Weight))236			.saturating_add(RocksDbWeight::get().writes(6 as Weight))237	}238	// Storage: Refungible Balance (r:2 w:2)239	fn transfer_normal() -> Weight {240		(17_733_000 as Weight)241			.saturating_add(RocksDbWeight::get().reads(2 as Weight))242			.saturating_add(RocksDbWeight::get().writes(2 as Weight))243	}244	// Storage: Refungible Balance (r:2 w:2)245	// Storage: Refungible AccountBalance (r:1 w:1)246	// Storage: Refungible Owned (r:0 w:1)247	fn transfer_creating() -> Weight {248		(20_943_000 as Weight)249			.saturating_add(RocksDbWeight::get().reads(3 as Weight))250			.saturating_add(RocksDbWeight::get().writes(4 as Weight))251	}252	// Storage: Refungible Balance (r:2 w:2)253	// Storage: Refungible AccountBalance (r:1 w:1)254	// Storage: Refungible Owned (r:0 w:1)255	fn transfer_removing() -> Weight {256		(22_406_000 as Weight)257			.saturating_add(RocksDbWeight::get().reads(3 as Weight))258			.saturating_add(RocksDbWeight::get().writes(4 as Weight))259	}260	// Storage: Refungible Balance (r:2 w:2)261	// Storage: Refungible AccountBalance (r:2 w:2)262	// Storage: Refungible Owned (r:0 w:2)263	fn transfer_creating_removing() -> Weight {264		(24_762_000 as Weight)265			.saturating_add(RocksDbWeight::get().reads(4 as Weight))266			.saturating_add(RocksDbWeight::get().writes(6 as Weight))267	}268	// Storage: Refungible Balance (r:1 w:0)269	// Storage: Refungible Allowance (r:0 w:1)270	fn approve() -> Weight {271		(14_109_000 as Weight)272			.saturating_add(RocksDbWeight::get().reads(1 as Weight))273			.saturating_add(RocksDbWeight::get().writes(1 as Weight))274	}275	// Storage: Refungible Allowance (r:1 w:1)276	// Storage: Refungible Balance (r:2 w:2)277	fn transfer_from_normal() -> Weight {278		(25_348_000 as Weight)279			.saturating_add(RocksDbWeight::get().reads(3 as Weight))280			.saturating_add(RocksDbWeight::get().writes(3 as Weight))281	}282	// Storage: Refungible Allowance (r:1 w:1)283	// Storage: Refungible Balance (r:2 w:2)284	// Storage: Refungible AccountBalance (r:1 w:1)285	// Storage: Refungible Owned (r:0 w:1)286	fn transfer_from_creating() -> Weight {287		(28_647_000 as Weight)288			.saturating_add(RocksDbWeight::get().reads(4 as Weight))289			.saturating_add(RocksDbWeight::get().writes(5 as Weight))290	}291	// Storage: Refungible Allowance (r:1 w:1)292	// Storage: Refungible Balance (r:2 w:2)293	// Storage: Refungible AccountBalance (r:1 w:1)294	// Storage: Refungible Owned (r:0 w:1)295	fn transfer_from_removing() -> Weight {296		(30_472_000 as Weight)297			.saturating_add(RocksDbWeight::get().reads(4 as Weight))298			.saturating_add(RocksDbWeight::get().writes(5 as Weight))299	}300	// Storage: Refungible Allowance (r:1 w:1)301	// Storage: Refungible Balance (r:2 w:2)302	// Storage: Refungible AccountBalance (r:2 w:2)303	// Storage: Refungible Owned (r:0 w:2)304	fn transfer_from_creating_removing() -> Weight {305		(32_362_000 as Weight)306			.saturating_add(RocksDbWeight::get().reads(5 as Weight))307			.saturating_add(RocksDbWeight::get().writes(7 as Weight))308	}309	// Storage: Refungible Allowance (r:1 w:1)310	// Storage: Refungible TotalSupply (r:1 w:1)311	// Storage: Refungible Balance (r:1 w:1)312	// Storage: Refungible AccountBalance (r:1 w:1)313	// Storage: Refungible TokensBurnt (r:1 w:1)314	// Storage: Refungible TokenData (r:0 w:1)315	// Storage: Refungible Owned (r:0 w:1)316	fn burn_from() -> Weight {317		(60_903_000 as Weight)318			.saturating_add(RocksDbWeight::get().reads(5 as Weight))319			.saturating_add(RocksDbWeight::get().writes(7 as Weight))320	}321	// Storage: Refungible TokenData (r:1 w:1)322	fn set_variable_metadata(_b: u32, ) -> Weight {323		(6_801_000 as Weight)324			.saturating_add(RocksDbWeight::get().reads(1 as Weight))325			.saturating_add(RocksDbWeight::get().writes(1 as Weight))326	}327}