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

difftreelog

source

pallets/refungible/src/weights.rs18.2 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-07-20, 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 set_token_property_permissions(b: u32, ) -> Weight;53	fn set_token_properties(b: u32, ) -> Weight;54	fn delete_token_properties(b: u32, ) -> Weight;55	fn repartition_item() -> Weight;56}5758/// Weights for pallet_refungible using the Substrate node and recommended hardware.59pub struct SubstrateWeight<T>(PhantomData<T>);60impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {61	// Storage: Refungible TokensMinted (r:1 w:1)62	// Storage: Refungible AccountBalance (r:1 w:1)63	// Storage: Refungible Balance (r:0 w:1)64	// Storage: Refungible TotalSupply (r:0 w:1)65	// Storage: Refungible TokenData (r:0 w:1)66	// Storage: Refungible Owned (r:0 w:1)67	fn create_item() -> Weight {68		(21_310_000 as Weight)69			.saturating_add(T::DbWeight::get().reads(2 as Weight))70			.saturating_add(T::DbWeight::get().writes(6 as Weight))71	}72	// Storage: Refungible TokensMinted (r:1 w:1)73	// Storage: Refungible AccountBalance (r:1 w:1)74	// Storage: Refungible Balance (r:0 w:4)75	// Storage: Refungible TotalSupply (r:0 w:4)76	// Storage: Refungible TokenData (r:0 w:4)77	// Storage: Refungible Owned (r:0 w:4)78	fn create_multiple_items(b: u32, ) -> Weight {79		(9_552_000 as Weight)80			// Standard Error: 2_00081			.saturating_add((7_056_000 as Weight).saturating_mul(b as Weight))82			.saturating_add(T::DbWeight::get().reads(2 as Weight))83			.saturating_add(T::DbWeight::get().writes(2 as Weight))84			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))85	}86	// Storage: Refungible TokensMinted (r:1 w:1)87	// Storage: Refungible AccountBalance (r:4 w:4)88	// Storage: Refungible Balance (r:0 w:4)89	// Storage: Refungible TotalSupply (r:0 w:4)90	// Storage: Refungible TokenData (r:0 w:4)91	// Storage: Refungible Owned (r:0 w:4)92	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {93		(4_857_000 as Weight)94			// Standard Error: 2_00095			.saturating_add((9_838_000 as Weight).saturating_mul(b as Weight))96			.saturating_add(T::DbWeight::get().reads(1 as Weight))97			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))98			.saturating_add(T::DbWeight::get().writes(1 as Weight))99			.saturating_add(T::DbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))100	}101	// Storage: Refungible TokensMinted (r:1 w:1)102	// Storage: Refungible TotalSupply (r:0 w:1)103	// Storage: Refungible TokenData (r:0 w:1)104	// Storage: Refungible AccountBalance (r:4 w:4)105	// Storage: Refungible Balance (r:0 w:4)106	// Storage: Refungible Owned (r:0 w:4)107	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {108		(11_335_000 as Weight)109			// Standard Error: 2_000110			.saturating_add((6_784_000 as Weight).saturating_mul(b as Weight))111			.saturating_add(T::DbWeight::get().reads(1 as Weight))112			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))113			.saturating_add(T::DbWeight::get().writes(3 as Weight))114			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))115	}116	// Storage: Refungible TotalSupply (r:1 w:1)117	// Storage: Refungible Balance (r:1 w:1)118	// Storage: Refungible AccountBalance (r:1 w:1)119	// Storage: Refungible Owned (r:0 w:1)120	fn burn_item_partial() -> Weight {121		(21_239_000 as Weight)122			.saturating_add(T::DbWeight::get().reads(3 as Weight))123			.saturating_add(T::DbWeight::get().writes(4 as Weight))124	}125	// Storage: Refungible TotalSupply (r:1 w:1)126	// Storage: Refungible Balance (r:1 w:1)127	// Storage: Refungible AccountBalance (r:1 w:1)128	// Storage: Refungible TokensBurnt (r:1 w:1)129	// Storage: Refungible TokenData (r:0 w:1)130	// Storage: Refungible Owned (r:0 w:1)131	// Storage: Refungible TokenProperties (r:0 w:1)132	fn burn_item_fully() -> Weight {133		(29_426_000 as Weight)134			.saturating_add(T::DbWeight::get().reads(4 as Weight))135			.saturating_add(T::DbWeight::get().writes(7 as Weight))136	}137	// Storage: Refungible Balance (r:2 w:2)138	fn transfer_normal() -> Weight {139		(17_743_000 as Weight)140			.saturating_add(T::DbWeight::get().reads(2 as Weight))141			.saturating_add(T::DbWeight::get().writes(2 as Weight))142	}143	// Storage: Refungible Balance (r:2 w:2)144	// Storage: Refungible AccountBalance (r:1 w:1)145	// Storage: Refungible Owned (r:0 w:1)146	fn transfer_creating() -> Weight {147		(20_699_000 as Weight)148			.saturating_add(T::DbWeight::get().reads(3 as Weight))149			.saturating_add(T::DbWeight::get().writes(4 as Weight))150	}151	// Storage: Refungible Balance (r:2 w:2)152	// Storage: Refungible AccountBalance (r:1 w:1)153	// Storage: Refungible Owned (r:0 w:1)154	fn transfer_removing() -> Weight {155		(22_833_000 as Weight)156			.saturating_add(T::DbWeight::get().reads(3 as Weight))157			.saturating_add(T::DbWeight::get().writes(4 as Weight))158	}159	// Storage: Refungible Balance (r:2 w:2)160	// Storage: Refungible AccountBalance (r:2 w:2)161	// Storage: Refungible Owned (r:0 w:2)162	fn transfer_creating_removing() -> Weight {163		(24_936_000 as Weight)164			.saturating_add(T::DbWeight::get().reads(4 as Weight))165			.saturating_add(T::DbWeight::get().writes(6 as Weight))166	}167	// Storage: Refungible Balance (r:1 w:0)168	// Storage: Refungible Allowance (r:0 w:1)169	fn approve() -> Weight {170		(13_446_000 as Weight)171			.saturating_add(T::DbWeight::get().reads(1 as Weight))172			.saturating_add(T::DbWeight::get().writes(1 as Weight))173	}174	// Storage: Refungible Allowance (r:1 w:1)175	// Storage: Refungible Balance (r:2 w:2)176	fn transfer_from_normal() -> Weight {177		(24_777_000 as Weight)178			.saturating_add(T::DbWeight::get().reads(3 as Weight))179			.saturating_add(T::DbWeight::get().writes(3 as Weight))180	}181	// Storage: Refungible Allowance (r:1 w:1)182	// Storage: Refungible Balance (r:2 w:2)183	// Storage: Refungible AccountBalance (r:1 w:1)184	// Storage: Refungible Owned (r:0 w:1)185	fn transfer_from_creating() -> Weight {186		(28_483_000 as Weight)187			.saturating_add(T::DbWeight::get().reads(4 as Weight))188			.saturating_add(T::DbWeight::get().writes(5 as Weight))189	}190	// Storage: Refungible Allowance (r:1 w:1)191	// Storage: Refungible Balance (r:2 w:2)192	// Storage: Refungible AccountBalance (r:1 w:1)193	// Storage: Refungible Owned (r:0 w:1)194	fn transfer_from_removing() -> Weight {195		(29_896_000 as Weight)196			.saturating_add(T::DbWeight::get().reads(4 as Weight))197			.saturating_add(T::DbWeight::get().writes(5 as Weight))198	}199	// Storage: Refungible Allowance (r:1 w:1)200	// Storage: Refungible Balance (r:2 w:2)201	// Storage: Refungible AccountBalance (r:2 w:2)202	// Storage: Refungible Owned (r:0 w:2)203	fn transfer_from_creating_removing() -> Weight {204		(32_070_000 as Weight)205			.saturating_add(T::DbWeight::get().reads(5 as Weight))206			.saturating_add(T::DbWeight::get().writes(7 as Weight))207	}208	// Storage: Refungible Allowance (r:1 w:1)209	// Storage: Refungible TotalSupply (r:1 w:1)210	// Storage: Refungible Balance (r:1 w:1)211	// Storage: Refungible AccountBalance (r:1 w:1)212	// Storage: Refungible TokensBurnt (r:1 w:1)213	// Storage: Refungible TokenData (r:0 w:1)214	// Storage: Refungible Owned (r:0 w:1)215	// Storage: Refungible TokenProperties (r:0 w:1)216	fn burn_from() -> Weight {217		(36_789_000 as Weight)218			.saturating_add(T::DbWeight::get().reads(5 as Weight))219			.saturating_add(T::DbWeight::get().writes(8 as Weight))220	}221	// Storage: Common CollectionPropertyPermissions (r:1 w:1)222	fn set_token_property_permissions(b: u32, ) -> Weight {223		(0 as Weight)224			// Standard Error: 62_000225			.saturating_add((15_803_000 as Weight).saturating_mul(b as Weight))226			.saturating_add(T::DbWeight::get().reads(1 as Weight))227			.saturating_add(T::DbWeight::get().writes(1 as Weight))228	}229	// Storage: Common CollectionPropertyPermissions (r:1 w:0)230	// Storage: Refungible TokenProperties (r:1 w:1)231	fn set_token_properties(b: u32, ) -> Weight {232		(0 as Weight)233			// Standard Error: 1_668_000234			.saturating_add((302_308_000 as Weight).saturating_mul(b as Weight))235			.saturating_add(T::DbWeight::get().reads(2 as Weight))236			.saturating_add(T::DbWeight::get().writes(1 as Weight))237	}238	// Storage: Common CollectionPropertyPermissions (r:1 w:0)239	// Storage: Refungible TokenProperties (r:1 w:1)240	fn delete_token_properties(b: u32, ) -> Weight {241		(0 as Weight)242			// Standard Error: 1_619_000243			.saturating_add((294_574_000 as Weight).saturating_mul(b as Weight))244			.saturating_add(T::DbWeight::get().reads(2 as Weight))245			.saturating_add(T::DbWeight::get().writes(1 as Weight))246	}247	// Storage: Refungible TotalSupply (r:1 w:1)248	// Storage: Refungible Balance (r:1 w:1)249	fn repartition_item() -> Weight {250		(8_325_000 as Weight)251			.saturating_add(T::DbWeight::get().reads(2 as Weight))252			.saturating_add(T::DbWeight::get().writes(2 as Weight))253	}254}255256// For backwards compatibility and tests257impl WeightInfo for () {258	// Storage: Refungible TokensMinted (r:1 w:1)259	// Storage: Refungible AccountBalance (r:1 w:1)260	// Storage: Refungible Balance (r:0 w:1)261	// Storage: Refungible TotalSupply (r:0 w:1)262	// Storage: Refungible TokenData (r:0 w:1)263	// Storage: Refungible Owned (r:0 w:1)264	fn create_item() -> Weight {265		(21_310_000 as Weight)266			.saturating_add(RocksDbWeight::get().reads(2 as Weight))267			.saturating_add(RocksDbWeight::get().writes(6 as Weight))268	}269	// Storage: Refungible TokensMinted (r:1 w:1)270	// Storage: Refungible AccountBalance (r:1 w:1)271	// Storage: Refungible Balance (r:0 w:4)272	// Storage: Refungible TotalSupply (r:0 w:4)273	// Storage: Refungible TokenData (r:0 w:4)274	// Storage: Refungible Owned (r:0 w:4)275	fn create_multiple_items(b: u32, ) -> Weight {276		(9_552_000 as Weight)277			// Standard Error: 2_000278			.saturating_add((7_056_000 as Weight).saturating_mul(b as Weight))279			.saturating_add(RocksDbWeight::get().reads(2 as Weight))280			.saturating_add(RocksDbWeight::get().writes(2 as Weight))281			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))282	}283	// Storage: Refungible TokensMinted (r:1 w:1)284	// Storage: Refungible AccountBalance (r:4 w:4)285	// Storage: Refungible Balance (r:0 w:4)286	// Storage: Refungible TotalSupply (r:0 w:4)287	// Storage: Refungible TokenData (r:0 w:4)288	// Storage: Refungible Owned (r:0 w:4)289	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {290		(4_857_000 as Weight)291			// Standard Error: 2_000292			.saturating_add((9_838_000 as Weight).saturating_mul(b as Weight))293			.saturating_add(RocksDbWeight::get().reads(1 as Weight))294			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))295			.saturating_add(RocksDbWeight::get().writes(1 as Weight))296			.saturating_add(RocksDbWeight::get().writes((5 as Weight).saturating_mul(b as Weight)))297	}298	// Storage: Refungible TokensMinted (r:1 w:1)299	// Storage: Refungible TotalSupply (r:0 w:1)300	// Storage: Refungible TokenData (r:0 w:1)301	// Storage: Refungible AccountBalance (r:4 w:4)302	// Storage: Refungible Balance (r:0 w:4)303	// Storage: Refungible Owned (r:0 w:4)304	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {305		(11_335_000 as Weight)306			// Standard Error: 2_000307			.saturating_add((6_784_000 as Weight).saturating_mul(b as Weight))308			.saturating_add(RocksDbWeight::get().reads(1 as Weight))309			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))310			.saturating_add(RocksDbWeight::get().writes(3 as Weight))311			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))312	}313	// Storage: Refungible TotalSupply (r:1 w:1)314	// Storage: Refungible Balance (r:1 w:1)315	// Storage: Refungible AccountBalance (r:1 w:1)316	// Storage: Refungible Owned (r:0 w:1)317	fn burn_item_partial() -> Weight {318		(21_239_000 as Weight)319			.saturating_add(RocksDbWeight::get().reads(3 as Weight))320			.saturating_add(RocksDbWeight::get().writes(4 as Weight))321	}322	// Storage: Refungible TotalSupply (r:1 w:1)323	// Storage: Refungible Balance (r:1 w:1)324	// Storage: Refungible AccountBalance (r:1 w:1)325	// Storage: Refungible TokensBurnt (r:1 w:1)326	// Storage: Refungible TokenData (r:0 w:1)327	// Storage: Refungible Owned (r:0 w:1)328	// Storage: Refungible TokenProperties (r:0 w:1)329	fn burn_item_fully() -> Weight {330		(29_426_000 as Weight)331			.saturating_add(RocksDbWeight::get().reads(4 as Weight))332			.saturating_add(RocksDbWeight::get().writes(7 as Weight))333	}334	// Storage: Refungible Balance (r:2 w:2)335	fn transfer_normal() -> Weight {336		(17_743_000 as Weight)337			.saturating_add(RocksDbWeight::get().reads(2 as Weight))338			.saturating_add(RocksDbWeight::get().writes(2 as Weight))339	}340	// Storage: Refungible Balance (r:2 w:2)341	// Storage: Refungible AccountBalance (r:1 w:1)342	// Storage: Refungible Owned (r:0 w:1)343	fn transfer_creating() -> Weight {344		(20_699_000 as Weight)345			.saturating_add(RocksDbWeight::get().reads(3 as Weight))346			.saturating_add(RocksDbWeight::get().writes(4 as Weight))347	}348	// Storage: Refungible Balance (r:2 w:2)349	// Storage: Refungible AccountBalance (r:1 w:1)350	// Storage: Refungible Owned (r:0 w:1)351	fn transfer_removing() -> Weight {352		(22_833_000 as Weight)353			.saturating_add(RocksDbWeight::get().reads(3 as Weight))354			.saturating_add(RocksDbWeight::get().writes(4 as Weight))355	}356	// Storage: Refungible Balance (r:2 w:2)357	// Storage: Refungible AccountBalance (r:2 w:2)358	// Storage: Refungible Owned (r:0 w:2)359	fn transfer_creating_removing() -> Weight {360		(24_936_000 as Weight)361			.saturating_add(RocksDbWeight::get().reads(4 as Weight))362			.saturating_add(RocksDbWeight::get().writes(6 as Weight))363	}364	// Storage: Refungible Balance (r:1 w:0)365	// Storage: Refungible Allowance (r:0 w:1)366	fn approve() -> Weight {367		(13_446_000 as Weight)368			.saturating_add(RocksDbWeight::get().reads(1 as Weight))369			.saturating_add(RocksDbWeight::get().writes(1 as Weight))370	}371	// Storage: Refungible Allowance (r:1 w:1)372	// Storage: Refungible Balance (r:2 w:2)373	fn transfer_from_normal() -> Weight {374		(24_777_000 as Weight)375			.saturating_add(RocksDbWeight::get().reads(3 as Weight))376			.saturating_add(RocksDbWeight::get().writes(3 as Weight))377	}378	// Storage: Refungible Allowance (r:1 w:1)379	// Storage: Refungible Balance (r:2 w:2)380	// Storage: Refungible AccountBalance (r:1 w:1)381	// Storage: Refungible Owned (r:0 w:1)382	fn transfer_from_creating() -> Weight {383		(28_483_000 as Weight)384			.saturating_add(RocksDbWeight::get().reads(4 as Weight))385			.saturating_add(RocksDbWeight::get().writes(5 as Weight))386	}387	// Storage: Refungible Allowance (r:1 w:1)388	// Storage: Refungible Balance (r:2 w:2)389	// Storage: Refungible AccountBalance (r:1 w:1)390	// Storage: Refungible Owned (r:0 w:1)391	fn transfer_from_removing() -> Weight {392		(29_896_000 as Weight)393			.saturating_add(RocksDbWeight::get().reads(4 as Weight))394			.saturating_add(RocksDbWeight::get().writes(5 as Weight))395	}396	// Storage: Refungible Allowance (r:1 w:1)397	// Storage: Refungible Balance (r:2 w:2)398	// Storage: Refungible AccountBalance (r:2 w:2)399	// Storage: Refungible Owned (r:0 w:2)400	fn transfer_from_creating_removing() -> Weight {401		(32_070_000 as Weight)402			.saturating_add(RocksDbWeight::get().reads(5 as Weight))403			.saturating_add(RocksDbWeight::get().writes(7 as Weight))404	}405	// Storage: Refungible Allowance (r:1 w:1)406	// Storage: Refungible TotalSupply (r:1 w:1)407	// Storage: Refungible Balance (r:1 w:1)408	// Storage: Refungible AccountBalance (r:1 w:1)409	// Storage: Refungible TokensBurnt (r:1 w:1)410	// Storage: Refungible TokenData (r:0 w:1)411	// Storage: Refungible Owned (r:0 w:1)412	// Storage: Refungible TokenProperties (r:0 w:1)413	fn burn_from() -> Weight {414		(36_789_000 as Weight)415			.saturating_add(RocksDbWeight::get().reads(5 as Weight))416			.saturating_add(RocksDbWeight::get().writes(8 as Weight))417	}418	// Storage: Common CollectionPropertyPermissions (r:1 w:1)419	fn set_token_property_permissions(b: u32, ) -> Weight {420		(0 as Weight)421			// Standard Error: 62_000422			.saturating_add((15_803_000 as Weight).saturating_mul(b as Weight))423			.saturating_add(RocksDbWeight::get().reads(1 as Weight))424			.saturating_add(RocksDbWeight::get().writes(1 as Weight))425	}426	// Storage: Common CollectionPropertyPermissions (r:1 w:0)427	// Storage: Refungible TokenProperties (r:1 w:1)428	fn set_token_properties(b: u32, ) -> Weight {429		(0 as Weight)430			// Standard Error: 1_668_000431			.saturating_add((302_308_000 as Weight).saturating_mul(b as Weight))432			.saturating_add(RocksDbWeight::get().reads(2 as Weight))433			.saturating_add(RocksDbWeight::get().writes(1 as Weight))434	}435	// Storage: Common CollectionPropertyPermissions (r:1 w:0)436	// Storage: Refungible TokenProperties (r:1 w:1)437	fn delete_token_properties(b: u32, ) -> Weight {438		(0 as Weight)439			// Standard Error: 1_619_000440			.saturating_add((294_574_000 as Weight).saturating_mul(b as Weight))441			.saturating_add(RocksDbWeight::get().reads(2 as Weight))442			.saturating_add(RocksDbWeight::get().writes(1 as Weight))443	}444	// Storage: Refungible TotalSupply (r:1 w:1)445	// Storage: Refungible Balance (r:1 w:1)446	fn repartition_item() -> Weight {447		(8_325_000 as Weight)448			.saturating_add(RocksDbWeight::get().reads(2 as Weight))449			.saturating_add(RocksDbWeight::get().writes(2 as Weight))450	}451}