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

difftreelog

source

pallets/fungible/src/weights.rs5.7 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_property() -> Weight;39	fn transfer() -> Weight;40	fn approve() -> Weight;41	fn transfer_from() -> Weight;42	fn burn_from() -> Weight;43}4445/// Weights for pallet_fungible using the Substrate node and recommended hardware.46pub struct SubstrateWeight<T>(PhantomData<T>);47impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {48	// Storage: Fungible TotalSupply (r:1 w:1)49	// Storage: Fungible Balance (r:1 w:1)50	fn create_item() -> Weight {51		(14_407_000 as Weight)52			.saturating_add(T::DbWeight::get().reads(2 as Weight))53			.saturating_add(T::DbWeight::get().writes(2 as Weight))54	}55	// Storage: Fungible TotalSupply (r:1 w:1)56	// Storage: Fungible Balance (r:4 w:4)57	fn create_multiple_items_ex(b: u32, ) -> Weight {58		(13_030_000 as Weight)59			// Standard Error: 1_00060			.saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))61			.saturating_add(T::DbWeight::get().reads(1 as Weight))62			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))63			.saturating_add(T::DbWeight::get().writes(1 as Weight))64			.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))65	}66	// Storage: Fungible TotalSupply (r:1 w:1)67	// Storage: Fungible Balance (r:1 w:1)68	fn burn_item() -> Weight {69		(15_565_000 as Weight)70			.saturating_add(T::DbWeight::get().reads(2 as Weight))71			.saturating_add(T::DbWeight::get().writes(2 as Weight))72	}7374	fn set_property() -> Weight {75		// Error76		077	}7879	// Storage: Fungible Balance (r:2 w:2)80	fn transfer() -> Weight {81		(17_713_000 as Weight)82			.saturating_add(T::DbWeight::get().reads(2 as Weight))83			.saturating_add(T::DbWeight::get().writes(2 as Weight))84	}85	// Storage: Fungible Balance (r:1 w:0)86	// Storage: Fungible Allowance (r:0 w:1)87	fn approve() -> Weight {88		(14_834_000 as Weight)89			.saturating_add(T::DbWeight::get().reads(1 as Weight))90			.saturating_add(T::DbWeight::get().writes(1 as Weight))91	}92	// Storage: Fungible Allowance (r:1 w:1)93	// Storage: Fungible Balance (r:2 w:2)94	fn transfer_from() -> Weight {95		(25_189_000 as Weight)96			.saturating_add(T::DbWeight::get().reads(3 as Weight))97			.saturating_add(T::DbWeight::get().writes(3 as Weight))98	}99	// Storage: Fungible Allowance (r:1 w:1)100	// Storage: Fungible TotalSupply (r:1 w:1)101	// Storage: Fungible Balance (r:1 w:1)102	fn burn_from() -> Weight {103		(24_065_000 as Weight)104			.saturating_add(T::DbWeight::get().reads(3 as Weight))105			.saturating_add(T::DbWeight::get().writes(3 as Weight))106	}107}108109// For backwards compatibility and tests110impl WeightInfo for () {111	// Storage: Fungible TotalSupply (r:1 w:1)112	// Storage: Fungible Balance (r:1 w:1)113	fn create_item() -> Weight {114		(14_407_000 as Weight)115			.saturating_add(RocksDbWeight::get().reads(2 as Weight))116			.saturating_add(RocksDbWeight::get().writes(2 as Weight))117	}118	// Storage: Fungible TotalSupply (r:1 w:1)119	// Storage: Fungible Balance (r:4 w:4)120	fn create_multiple_items_ex(b: u32, ) -> Weight {121		(13_030_000 as Weight)122			// Standard Error: 1_000123			.saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))124			.saturating_add(RocksDbWeight::get().reads(1 as Weight))125			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))126			.saturating_add(RocksDbWeight::get().writes(1 as Weight))127			.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))128	}129	// Storage: Fungible TotalSupply (r:1 w:1)130	// Storage: Fungible Balance (r:1 w:1)131	fn burn_item() -> Weight {132		(15_565_000 as Weight)133			.saturating_add(RocksDbWeight::get().reads(2 as Weight))134			.saturating_add(RocksDbWeight::get().writes(2 as Weight))135	}136137	fn set_property() -> Weight {138		// Error139		0140	}141142	// Storage: Fungible Balance (r:2 w:2)143	fn transfer() -> Weight {144		(17_713_000 as Weight)145			.saturating_add(RocksDbWeight::get().reads(2 as Weight))146			.saturating_add(RocksDbWeight::get().writes(2 as Weight))147	}148	// Storage: Fungible Balance (r:1 w:0)149	// Storage: Fungible Allowance (r:0 w:1)150	fn approve() -> Weight {151		(14_834_000 as Weight)152			.saturating_add(RocksDbWeight::get().reads(1 as Weight))153			.saturating_add(RocksDbWeight::get().writes(1 as Weight))154	}155	// Storage: Fungible Allowance (r:1 w:1)156	// Storage: Fungible Balance (r:2 w:2)157	fn transfer_from() -> Weight {158		(25_189_000 as Weight)159			.saturating_add(RocksDbWeight::get().reads(3 as Weight))160			.saturating_add(RocksDbWeight::get().writes(3 as Weight))161	}162	// Storage: Fungible Allowance (r:1 w:1)163	// Storage: Fungible TotalSupply (r:1 w:1)164	// Storage: Fungible Balance (r:1 w:1)165	fn burn_from() -> Weight {166		(24_065_000 as Weight)167			.saturating_add(RocksDbWeight::get().reads(3 as Weight))168			.saturating_add(RocksDbWeight::get().writes(3 as Weight))169	}170}