git.delta.rocks / unique-network / refs/commits / 2f9c8d434e2f

difftreelog

source

pallets/fungible/src/weights.rs5.6 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 transfer() -> Weight;39	fn approve() -> Weight;40	fn transfer_from() -> Weight;41	fn burn_from() -> Weight;42}4344/// Weights for pallet_fungible using the Substrate node and recommended hardware.45pub struct SubstrateWeight<T>(PhantomData<T>);46impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {47	// Storage: Fungible TotalSupply (r:1 w:1)48	// Storage: Fungible Balance (r:1 w:1)49	fn create_item() -> Weight {50		(14_407_000 as Weight)51			.saturating_add(T::DbWeight::get().reads(2 as Weight))52			.saturating_add(T::DbWeight::get().writes(2 as Weight))53	}54	// Storage: Fungible TotalSupply (r:1 w:1)55	// Storage: Fungible Balance (r:4 w:4)56	fn create_multiple_items_ex(b: u32, ) -> Weight {57		(13_030_000 as Weight)58			// Standard Error: 1_00059			.saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))60			.saturating_add(T::DbWeight::get().reads(1 as Weight))61			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))62			.saturating_add(T::DbWeight::get().writes(1 as Weight))63			.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))64	}65	// Storage: Fungible TotalSupply (r:1 w:1)66	// Storage: Fungible Balance (r:1 w:1)67	fn burn_item() -> Weight {68		(15_565_000 as Weight)69			.saturating_add(T::DbWeight::get().reads(2 as Weight))70			.saturating_add(T::DbWeight::get().writes(2 as Weight))71	}72	// Storage: Fungible Balance (r:2 w:2)73	fn transfer() -> Weight {74		(17_713_000 as Weight)75			.saturating_add(T::DbWeight::get().reads(2 as Weight))76			.saturating_add(T::DbWeight::get().writes(2 as Weight))77	}78	// Storage: Fungible Balance (r:1 w:0)79	// Storage: Fungible Allowance (r:0 w:1)80	fn approve() -> Weight {81		(14_834_000 as Weight)82			.saturating_add(T::DbWeight::get().reads(1 as Weight))83			.saturating_add(T::DbWeight::get().writes(1 as Weight))84	}85	// Storage: Fungible Allowance (r:1 w:1)86	// Storage: Fungible Balance (r:2 w:2)87	fn transfer_from() -> Weight {88		(25_189_000 as Weight)89			.saturating_add(T::DbWeight::get().reads(3 as Weight))90			.saturating_add(T::DbWeight::get().writes(3 as Weight))91	}92	// Storage: Fungible Allowance (r:1 w:1)93	// Storage: Fungible TotalSupply (r:1 w:1)94	// Storage: Fungible Balance (r:1 w:1)95	fn burn_from() -> Weight {96		(24_065_000 as Weight)97			.saturating_add(T::DbWeight::get().reads(3 as Weight))98			.saturating_add(T::DbWeight::get().writes(3 as Weight))99	}100}101102// For backwards compatibility and tests103impl WeightInfo for () {104	// Storage: Fungible TotalSupply (r:1 w:1)105	// Storage: Fungible Balance (r:1 w:1)106	fn create_item() -> Weight {107		(14_407_000 as Weight)108			.saturating_add(RocksDbWeight::get().reads(2 as Weight))109			.saturating_add(RocksDbWeight::get().writes(2 as Weight))110	}111	// Storage: Fungible TotalSupply (r:1 w:1)112	// Storage: Fungible Balance (r:4 w:4)113	fn create_multiple_items_ex(b: u32, ) -> Weight {114		(13_030_000 as Weight)115			// Standard Error: 1_000116			.saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))117			.saturating_add(RocksDbWeight::get().reads(1 as Weight))118			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))119			.saturating_add(RocksDbWeight::get().writes(1 as Weight))120			.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))121	}122	// Storage: Fungible TotalSupply (r:1 w:1)123	// Storage: Fungible Balance (r:1 w:1)124	fn burn_item() -> Weight {125		(15_565_000 as Weight)126			.saturating_add(RocksDbWeight::get().reads(2 as Weight))127			.saturating_add(RocksDbWeight::get().writes(2 as Weight))128	}129	// Storage: Fungible Balance (r:2 w:2)130	fn transfer() -> Weight {131		(17_713_000 as Weight)132			.saturating_add(RocksDbWeight::get().reads(2 as Weight))133			.saturating_add(RocksDbWeight::get().writes(2 as Weight))134	}135	// Storage: Fungible Balance (r:1 w:0)136	// Storage: Fungible Allowance (r:0 w:1)137	fn approve() -> Weight {138		(14_834_000 as Weight)139			.saturating_add(RocksDbWeight::get().reads(1 as Weight))140			.saturating_add(RocksDbWeight::get().writes(1 as Weight))141	}142	// Storage: Fungible Allowance (r:1 w:1)143	// Storage: Fungible Balance (r:2 w:2)144	fn transfer_from() -> Weight {145		(25_189_000 as Weight)146			.saturating_add(RocksDbWeight::get().reads(3 as Weight))147			.saturating_add(RocksDbWeight::get().writes(3 as Weight))148	}149	// Storage: Fungible Allowance (r:1 w:1)150	// Storage: Fungible TotalSupply (r:1 w:1)151	// Storage: Fungible Balance (r:1 w:1)152	fn burn_from() -> Weight {153		(24_065_000 as Weight)154			.saturating_add(RocksDbWeight::get().reads(3 as Weight))155			.saturating_add(RocksDbWeight::get().writes(3 as Weight))156	}157}