git.delta.rocks / unique-network / refs/commits / 6fb759d0245c

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-08-15, 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-fungible15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=8023// --heap-pages=409624// --output=./pallets/fungible/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_fungible.35pub trait WeightInfo {36	fn create_item() -> Weight;37	fn create_multiple_items_ex(b: u32, ) -> Weight;38	fn burn_item() -> 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		Weight::from_ref_time(18_195_000)52			.saturating_add(T::DbWeight::get().reads(2 as u64))53			.saturating_add(T::DbWeight::get().writes(2 as u64))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		Weight::from_ref_time(19_218_000)59			// Standard Error: 3_00060			.saturating_add(Weight::from_ref_time(4_516_000).saturating_mul(b as u64))61			.saturating_add(T::DbWeight::get().reads(1 as u64))62			.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))63			.saturating_add(T::DbWeight::get().writes(1 as u64))64			.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64)))65	}66	// Storage: Fungible TotalSupply (r:1 w:1)67	// Storage: Fungible Balance (r:1 w:1)68	fn burn_item() -> Weight {69		Weight::from_ref_time(18_719_000)70			.saturating_add(T::DbWeight::get().reads(2 as u64))71			.saturating_add(T::DbWeight::get().writes(2 as u64))72	}73	// Storage: Fungible Balance (r:2 w:2)74	fn transfer() -> Weight {75		Weight::from_ref_time(20_563_000)76			.saturating_add(T::DbWeight::get().reads(2 as u64))77			.saturating_add(T::DbWeight::get().writes(2 as u64))78	}79	// Storage: Fungible Balance (r:1 w:0)80	// Storage: Fungible Allowance (r:0 w:1)81	fn approve() -> Weight {82		Weight::from_ref_time(17_583_000)83			.saturating_add(T::DbWeight::get().reads(1 as u64))84			.saturating_add(T::DbWeight::get().writes(1 as u64))85	}86	// Storage: Fungible Allowance (r:1 w:1)87	// Storage: Fungible Balance (r:2 w:2)88	fn transfer_from() -> Weight {89		Weight::from_ref_time(29_845_000)90			.saturating_add(T::DbWeight::get().reads(3 as u64))91			.saturating_add(T::DbWeight::get().writes(3 as u64))92	}93	// Storage: Fungible Allowance (r:1 w:1)94	// Storage: Fungible TotalSupply (r:1 w:1)95	// Storage: Fungible Balance (r:1 w:1)96	fn burn_from() -> Weight {97		Weight::from_ref_time(28_248_000)98			.saturating_add(T::DbWeight::get().reads(3 as u64))99			.saturating_add(T::DbWeight::get().writes(3 as u64))100	}101}102103// For backwards compatibility and tests104impl WeightInfo for () {105	// Storage: Fungible TotalSupply (r:1 w:1)106	// Storage: Fungible Balance (r:1 w:1)107	fn create_item() -> Weight {108		Weight::from_ref_time(18_195_000)109			.saturating_add(RocksDbWeight::get().reads(2 as u64))110			.saturating_add(RocksDbWeight::get().writes(2 as u64))111	}112	// Storage: Fungible TotalSupply (r:1 w:1)113	// Storage: Fungible Balance (r:4 w:4)114	fn create_multiple_items_ex(b: u32, ) -> Weight {115		Weight::from_ref_time(19_218_000)116			// Standard Error: 3_000117			.saturating_add(Weight::from_ref_time(4_516_000).saturating_mul(b as u64))118			.saturating_add(RocksDbWeight::get().reads(1 as u64))119			.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))120			.saturating_add(RocksDbWeight::get().writes(1 as u64))121			.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(b as u64)))122	}123	// Storage: Fungible TotalSupply (r:1 w:1)124	// Storage: Fungible Balance (r:1 w:1)125	fn burn_item() -> Weight {126		Weight::from_ref_time(18_719_000)127			.saturating_add(RocksDbWeight::get().reads(2 as u64))128			.saturating_add(RocksDbWeight::get().writes(2 as u64))129	}130	// Storage: Fungible Balance (r:2 w:2)131	fn transfer() -> Weight {132		Weight::from_ref_time(20_563_000)133			.saturating_add(RocksDbWeight::get().reads(2 as u64))134			.saturating_add(RocksDbWeight::get().writes(2 as u64))135	}136	// Storage: Fungible Balance (r:1 w:0)137	// Storage: Fungible Allowance (r:0 w:1)138	fn approve() -> Weight {139		Weight::from_ref_time(17_583_000)140			.saturating_add(RocksDbWeight::get().reads(1 as u64))141			.saturating_add(RocksDbWeight::get().writes(1 as u64))142	}143	// Storage: Fungible Allowance (r:1 w:1)144	// Storage: Fungible Balance (r:2 w:2)145	fn transfer_from() -> Weight {146		Weight::from_ref_time(29_845_000)147			.saturating_add(RocksDbWeight::get().reads(3 as u64))148			.saturating_add(RocksDbWeight::get().writes(3 as u64))149	}150	// Storage: Fungible Allowance (r:1 w:1)151	// Storage: Fungible TotalSupply (r:1 w:1)152	// Storage: Fungible Balance (r:1 w:1)153	fn burn_from() -> Weight {154		Weight::from_ref_time(28_248_000)155			.saturating_add(RocksDbWeight::get().reads(3 as u64))156			.saturating_add(RocksDbWeight::get().writes(3 as u64))157	}158}