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

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: 20, 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=2022// --output=./pallets/fungible/src/weights.rs2324#![cfg_attr(rustfmt, rustfmt_skip)]25#![allow(unused_parens)]26#![allow(unused_imports)]27#![allow(clippy::unnecessary_cast)]2829use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};30use sp_std::marker::PhantomData;3132/// Weight functions needed for pallet_fungible.33pub trait WeightInfo {34	fn create_item() -> Weight;35	fn create_multiple_items_ex(b: u32, ) -> Weight;36	fn burn_item() -> Weight;37	fn transfer() -> Weight;38	fn approve() -> Weight;39	fn transfer_from() -> Weight;40	fn burn_from() -> Weight;41}4243/// Weights for pallet_fungible using the Substrate node and recommended hardware.44pub struct SubstrateWeight<T>(PhantomData<T>);45impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {46	// Storage: Fungible TotalSupply (r:1 w:1)47	// Storage: Fungible Balance (r:1 w:1)48	fn create_item() -> Weight {49		(15_015_000 as Weight)50			.saturating_add(T::DbWeight::get().reads(2 as Weight))51			.saturating_add(T::DbWeight::get().writes(2 as Weight))52	}53	// Storage: Fungible TotalSupply (r:1 w:1)54	// Storage: Fungible Balance (r:4 w:4)55	fn create_multiple_items_ex(b: u32, ) -> Weight {56		(15_984_000 as Weight)57			// Standard Error: 5_00058			.saturating_add((3_986_000 as Weight).saturating_mul(b as Weight))59			.saturating_add(T::DbWeight::get().reads(1 as Weight))60			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))61			.saturating_add(T::DbWeight::get().writes(1 as Weight))62			.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))63	}64	// Storage: Fungible TotalSupply (r:1 w:1)65	// Storage: Fungible Balance (r:1 w:1)66	fn burn_item() -> Weight {67		(16_679_000 as Weight)68			.saturating_add(T::DbWeight::get().reads(2 as Weight))69			.saturating_add(T::DbWeight::get().writes(2 as Weight))70	}71	// Storage: Fungible Balance (r:2 w:2)72	fn transfer() -> Weight {73		(18_498_000 as Weight)74			.saturating_add(T::DbWeight::get().reads(2 as Weight))75			.saturating_add(T::DbWeight::get().writes(2 as Weight))76	}77	// Storage: Fungible Balance (r:1 w:0)78	// Storage: Fungible Allowance (r:0 w:1)79	fn approve() -> Weight {80		(15_347_000 as Weight)81			.saturating_add(T::DbWeight::get().reads(1 as Weight))82			.saturating_add(T::DbWeight::get().writes(1 as Weight))83	}84	// Storage: Fungible Allowance (r:1 w:1)85	// Storage: Fungible Balance (r:2 w:2)86	fn transfer_from() -> Weight {87		(25_956_000 as Weight)88			.saturating_add(T::DbWeight::get().reads(3 as Weight))89			.saturating_add(T::DbWeight::get().writes(3 as Weight))90	}91	// Storage: Fungible Allowance (r:1 w:1)92	// Storage: Fungible TotalSupply (r:1 w:1)93	// Storage: Fungible Balance (r:1 w:1)94	fn burn_from() -> Weight {95		(24_472_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}100101// For backwards compatibility and tests102impl WeightInfo for () {103	// Storage: Fungible TotalSupply (r:1 w:1)104	// Storage: Fungible Balance (r:1 w:1)105	fn create_item() -> Weight {106		(15_015_000 as Weight)107			.saturating_add(RocksDbWeight::get().reads(2 as Weight))108			.saturating_add(RocksDbWeight::get().writes(2 as Weight))109	}110	// Storage: Fungible TotalSupply (r:1 w:1)111	// Storage: Fungible Balance (r:4 w:4)112	fn create_multiple_items_ex(b: u32, ) -> Weight {113		(15_984_000 as Weight)114			// Standard Error: 5_000115			.saturating_add((3_986_000 as Weight).saturating_mul(b as Weight))116			.saturating_add(RocksDbWeight::get().reads(1 as Weight))117			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))118			.saturating_add(RocksDbWeight::get().writes(1 as Weight))119			.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))120	}121	// Storage: Fungible TotalSupply (r:1 w:1)122	// Storage: Fungible Balance (r:1 w:1)123	fn burn_item() -> Weight {124		(16_679_000 as Weight)125			.saturating_add(RocksDbWeight::get().reads(2 as Weight))126			.saturating_add(RocksDbWeight::get().writes(2 as Weight))127	}128	// Storage: Fungible Balance (r:2 w:2)129	fn transfer() -> Weight {130		(18_498_000 as Weight)131			.saturating_add(RocksDbWeight::get().reads(2 as Weight))132			.saturating_add(RocksDbWeight::get().writes(2 as Weight))133	}134	// Storage: Fungible Balance (r:1 w:0)135	// Storage: Fungible Allowance (r:0 w:1)136	fn approve() -> Weight {137		(15_347_000 as Weight)138			.saturating_add(RocksDbWeight::get().reads(1 as Weight))139			.saturating_add(RocksDbWeight::get().writes(1 as Weight))140	}141	// Storage: Fungible Allowance (r:1 w:1)142	// Storage: Fungible Balance (r:2 w:2)143	fn transfer_from() -> Weight {144		(25_956_000 as Weight)145			.saturating_add(RocksDbWeight::get().reads(3 as Weight))146			.saturating_add(RocksDbWeight::get().writes(3 as Weight))147	}148	// Storage: Fungible Allowance (r:1 w:1)149	// Storage: Fungible TotalSupply (r:1 w:1)150	// Storage: Fungible Balance (r:1 w:1)151	fn burn_from() -> Weight {152		(24_472_000 as Weight)153			.saturating_add(RocksDbWeight::get().reads(3 as Weight))154			.saturating_add(RocksDbWeight::get().writes(3 as Weight))155	}156}