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

difftreelog

source

pallets/fungible/src/weights.rs6.2 KiBsourcehistory
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_fungible4//!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-fungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=20022// --heap-pages=409623// --output=./pallets/fungible/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_fungible.34pub trait WeightInfo {35	fn create_item() -> Weight;36	fn create_multiple_items_ex(b: u32, ) -> Weight;37	fn burn_item() -> Weight;38	fn set_collection_properties(amount: u32) -> Weight;39	fn set_token_properties(amount: u32) -> Weight;40	fn set_property_permissions(amount: u32) -> Weight;41	fn transfer() -> Weight;42	fn approve() -> Weight;43	fn transfer_from() -> Weight;44	fn burn_from() -> Weight;45}4647/// Weights for pallet_fungible using the Substrate node and recommended hardware.48pub struct SubstrateWeight<T>(PhantomData<T>);49impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {50	// Storage: Fungible TotalSupply (r:1 w:1)51	// Storage: Fungible Balance (r:1 w:1)52	fn create_item() -> Weight {53		(14_407_000 as Weight)54			.saturating_add(T::DbWeight::get().reads(2 as Weight))55			.saturating_add(T::DbWeight::get().writes(2 as Weight))56	}57	// Storage: Fungible TotalSupply (r:1 w:1)58	// Storage: Fungible Balance (r:4 w:4)59	fn create_multiple_items_ex(b: u32, ) -> Weight {60		(13_030_000 as Weight)61			// Standard Error: 1_00062			.saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))63			.saturating_add(T::DbWeight::get().reads(1 as Weight))64			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))65			.saturating_add(T::DbWeight::get().writes(1 as Weight))66			.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))67	}68	// Storage: Fungible TotalSupply (r:1 w:1)69	// Storage: Fungible Balance (r:1 w:1)70	fn burn_item() -> Weight {71		(15_565_000 as Weight)72			.saturating_add(T::DbWeight::get().reads(2 as Weight))73			.saturating_add(T::DbWeight::get().writes(2 as Weight))74	}7576	fn set_collection_properties(amount: u32) -> Weight {77		// Error78		079	}8081	fn set_token_properties(amount: u32) -> Weight {82		// Error83		084	}8586	fn set_property_permissions(amount: u32) -> Weight {87		// Error88		089	}9091	// Storage: Fungible Balance (r:2 w:2)92	fn transfer() -> Weight {93		(17_713_000 as Weight)94			.saturating_add(T::DbWeight::get().reads(2 as Weight))95			.saturating_add(T::DbWeight::get().writes(2 as Weight))96	}97	// Storage: Fungible Balance (r:1 w:0)98	// Storage: Fungible Allowance (r:0 w:1)99	fn approve() -> Weight {100		(14_834_000 as Weight)101			.saturating_add(T::DbWeight::get().reads(1 as Weight))102			.saturating_add(T::DbWeight::get().writes(1 as Weight))103	}104	// Storage: Fungible Allowance (r:1 w:1)105	// Storage: Fungible Balance (r:2 w:2)106	fn transfer_from() -> Weight {107		(25_189_000 as Weight)108			.saturating_add(T::DbWeight::get().reads(3 as Weight))109			.saturating_add(T::DbWeight::get().writes(3 as Weight))110	}111	// Storage: Fungible Allowance (r:1 w:1)112	// Storage: Fungible TotalSupply (r:1 w:1)113	// Storage: Fungible Balance (r:1 w:1)114	fn burn_from() -> Weight {115		(24_065_000 as Weight)116			.saturating_add(T::DbWeight::get().reads(3 as Weight))117			.saturating_add(T::DbWeight::get().writes(3 as Weight))118	}119}120121// For backwards compatibility and tests122impl WeightInfo for () {123	// Storage: Fungible TotalSupply (r:1 w:1)124	// Storage: Fungible Balance (r:1 w:1)125	fn create_item() -> Weight {126		(14_407_000 as Weight)127			.saturating_add(RocksDbWeight::get().reads(2 as Weight))128			.saturating_add(RocksDbWeight::get().writes(2 as Weight))129	}130	// Storage: Fungible TotalSupply (r:1 w:1)131	// Storage: Fungible Balance (r:4 w:4)132	fn create_multiple_items_ex(b: u32, ) -> Weight {133		(13_030_000 as Weight)134			// Standard Error: 1_000135			.saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))136			.saturating_add(RocksDbWeight::get().reads(1 as Weight))137			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))138			.saturating_add(RocksDbWeight::get().writes(1 as Weight))139			.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))140	}141	// Storage: Fungible TotalSupply (r:1 w:1)142	// Storage: Fungible Balance (r:1 w:1)143	fn burn_item() -> Weight {144		(15_565_000 as Weight)145			.saturating_add(RocksDbWeight::get().reads(2 as Weight))146			.saturating_add(RocksDbWeight::get().writes(2 as Weight))147	}148149	fn set_collection_properties(amount: u32) -> Weight {150		// Error151		0152	}153154	fn set_token_properties(amount: u32) -> Weight {155		// Error156		0157	}158159	fn set_property_permissions(amount: u32) -> Weight {160		// Error161		0162	}163164	// Storage: Fungible Balance (r:2 w:2)165	fn transfer() -> Weight {166		(17_713_000 as Weight)167			.saturating_add(RocksDbWeight::get().reads(2 as Weight))168			.saturating_add(RocksDbWeight::get().writes(2 as Weight))169	}170	// Storage: Fungible Balance (r:1 w:0)171	// Storage: Fungible Allowance (r:0 w:1)172	fn approve() -> Weight {173		(14_834_000 as Weight)174			.saturating_add(RocksDbWeight::get().reads(1 as Weight))175			.saturating_add(RocksDbWeight::get().writes(1 as Weight))176	}177	// Storage: Fungible Allowance (r:1 w:1)178	// Storage: Fungible Balance (r:2 w:2)179	fn transfer_from() -> Weight {180		(25_189_000 as Weight)181			.saturating_add(RocksDbWeight::get().reads(3 as Weight))182			.saturating_add(RocksDbWeight::get().writes(3 as Weight))183	}184	// Storage: Fungible Allowance (r:1 w:1)185	// Storage: Fungible TotalSupply (r:1 w:1)186	// Storage: Fungible Balance (r:1 w:1)187	fn burn_from() -> Weight {188		(24_065_000 as Weight)189			.saturating_add(RocksDbWeight::get().reads(3 as Weight))190			.saturating_add(RocksDbWeight::get().writes(3 as Weight))191	}192}