git.delta.rocks / unique-network / refs/commits / 4dff934f02cf

difftreelog

source

pallets/fungible/src/weights.rs5.8 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-12-26, 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(missing_docs)]30#![allow(clippy::unnecessary_cast)]3132use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};33use sp_std::marker::PhantomData;3435/// Weight functions needed for pallet_fungible.36pub trait WeightInfo {37	fn create_item() -> Weight;38	fn create_multiple_items_ex(b: u32, ) -> Weight;39	fn burn_item() -> Weight;40	fn transfer() -> Weight;41	fn approve() -> Weight;42	fn transfer_from() -> Weight;43	fn burn_from() -> Weight;44}4546/// Weights for pallet_fungible using the Substrate node and recommended hardware.47pub struct SubstrateWeight<T>(PhantomData<T>);48impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {49	// Storage: Fungible TotalSupply (r:1 w:1)50	// Storage: Fungible Balance (r:1 w:1)51	fn create_item() -> Weight {52		Weight::from_ref_time(19_626_000 as u64)53			.saturating_add(T::DbWeight::get().reads(2 as u64))54			.saturating_add(T::DbWeight::get().writes(2 as u64))55	}56	// Storage: Fungible TotalSupply (r:1 w:1)57	// Storage: Fungible Balance (r:4 w:4)58	fn create_multiple_items_ex(b: u32, ) -> Weight {59		Weight::from_ref_time(22_364_107 as u64)60			// Standard Error: 6_12361			.saturating_add(Weight::from_ref_time(3_608_476 as u64).saturating_mul(b as u64))62			.saturating_add(T::DbWeight::get().reads(1 as u64))63			.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))64			.saturating_add(T::DbWeight::get().writes(1 as u64))65			.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(b as u64)))66	}67	// Storage: Fungible TotalSupply (r:1 w:1)68	// Storage: Fungible Balance (r:1 w:1)69	fn burn_item() -> Weight {70		Weight::from_ref_time(21_886_000 as u64)71			.saturating_add(T::DbWeight::get().reads(2 as u64))72			.saturating_add(T::DbWeight::get().writes(2 as u64))73	}74	// Storage: Fungible Balance (r:2 w:2)75	fn transfer() -> Weight {76		Weight::from_ref_time(23_827_000 as u64)77			.saturating_add(T::DbWeight::get().reads(2 as u64))78			.saturating_add(T::DbWeight::get().writes(2 as u64))79	}80	// Storage: Fungible Balance (r:1 w:0)81	// Storage: Fungible Allowance (r:0 w:1)82	fn approve() -> Weight {83		Weight::from_ref_time(21_626_000 as u64)84			.saturating_add(T::DbWeight::get().reads(1 as u64))85			.saturating_add(T::DbWeight::get().writes(1 as u64))86	}87	// Storage: Fungible Allowance (r:1 w:1)88	// Storage: Fungible Balance (r:2 w:2)89	fn transfer_from() -> Weight {90		Weight::from_ref_time(31_398_000 as u64)91			.saturating_add(T::DbWeight::get().reads(3 as u64))92			.saturating_add(T::DbWeight::get().writes(3 as u64))93	}94	// Storage: Fungible Allowance (r:1 w:1)95	// Storage: Fungible TotalSupply (r:1 w:1)96	// Storage: Fungible Balance (r:1 w:1)97	fn burn_from() -> Weight {98		Weight::from_ref_time(30_499_000 as u64)99			.saturating_add(T::DbWeight::get().reads(3 as u64))100			.saturating_add(T::DbWeight::get().writes(3 as u64))101	}102}103104// For backwards compatibility and tests105impl WeightInfo for () {106	// Storage: Fungible TotalSupply (r:1 w:1)107	// Storage: Fungible Balance (r:1 w:1)108	fn create_item() -> Weight {109		Weight::from_ref_time(19_626_000 as u64)110			.saturating_add(RocksDbWeight::get().reads(2 as u64))111			.saturating_add(RocksDbWeight::get().writes(2 as u64))112	}113	// Storage: Fungible TotalSupply (r:1 w:1)114	// Storage: Fungible Balance (r:4 w:4)115	fn create_multiple_items_ex(b: u32, ) -> Weight {116		Weight::from_ref_time(22_364_107 as u64)117			// Standard Error: 6_123118			.saturating_add(Weight::from_ref_time(3_608_476 as u64).saturating_mul(b as u64))119			.saturating_add(RocksDbWeight::get().reads(1 as u64))120			.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))121			.saturating_add(RocksDbWeight::get().writes(1 as u64))122			.saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(b as u64)))123	}124	// Storage: Fungible TotalSupply (r:1 w:1)125	// Storage: Fungible Balance (r:1 w:1)126	fn burn_item() -> Weight {127		Weight::from_ref_time(21_886_000 as u64)128			.saturating_add(RocksDbWeight::get().reads(2 as u64))129			.saturating_add(RocksDbWeight::get().writes(2 as u64))130	}131	// Storage: Fungible Balance (r:2 w:2)132	fn transfer() -> Weight {133		Weight::from_ref_time(23_827_000 as u64)134			.saturating_add(RocksDbWeight::get().reads(2 as u64))135			.saturating_add(RocksDbWeight::get().writes(2 as u64))136	}137	// Storage: Fungible Balance (r:1 w:0)138	// Storage: Fungible Allowance (r:0 w:1)139	fn approve() -> Weight {140		Weight::from_ref_time(21_626_000 as u64)141			.saturating_add(RocksDbWeight::get().reads(1 as u64))142			.saturating_add(RocksDbWeight::get().writes(1 as u64))143	}144	// Storage: Fungible Allowance (r:1 w:1)145	// Storage: Fungible Balance (r:2 w:2)146	fn transfer_from() -> Weight {147		Weight::from_ref_time(31_398_000 as u64)148			.saturating_add(RocksDbWeight::get().reads(3 as u64))149			.saturating_add(RocksDbWeight::get().writes(3 as u64))150	}151	// Storage: Fungible Allowance (r:1 w:1)152	// Storage: Fungible TotalSupply (r:1 w:1)153	// Storage: Fungible Balance (r:1 w:1)154	fn burn_from() -> Weight {155		Weight::from_ref_time(30_499_000 as u64)156			.saturating_add(RocksDbWeight::get().reads(3 as u64))157			.saturating_add(RocksDbWeight::get().writes(3 as u64))158	}159}