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

difftreelog

source

pallets/fungible/src/weights.rs12.3 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: 2023-03-30, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! WORST CASE MAP SIZE: `1000000`8//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024910// Executed Command:11// target/release/unique-collator12// benchmark13// pallet14// --pallet15// pallet-fungible16// --wasm-execution17// compiled18// --extrinsic19// *20// --template=.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_raw() -> Weight;41	fn approve() -> Weight;42	fn approve_from() -> Weight;43	fn check_allowed_raw() -> Weight;44	fn set_allowance_unchecked_raw() -> Weight;45	fn burn_from() -> Weight;46}4748/// Weights for pallet_fungible using the Substrate node and recommended hardware.49pub struct SubstrateWeight<T>(PhantomData<T>);50impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {51	/// Storage: Fungible TotalSupply (r:1 w:1)52	/// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)53	/// Storage: Fungible Balance (r:1 w:1)54	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)55	fn create_item() -> Weight {56		// Proof Size summary in bytes:57		//  Measured:  `42`58		//  Estimated: `5055`59		// Minimum execution time: 10_152_000 picoseconds.60		Weight::from_parts(10_520_000, 5055)61			.saturating_add(T::DbWeight::get().reads(2_u64))62			.saturating_add(T::DbWeight::get().writes(2_u64))63	}64	/// Storage: Fungible TotalSupply (r:1 w:1)65	/// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)66	/// Storage: Fungible Balance (r:200 w:200)67	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)68	/// The range of component `b` is `[0, 200]`.69	fn create_multiple_items_ex(b: u32, ) -> Weight {70		// Proof Size summary in bytes:71		//  Measured:  `42`72		//  Estimated: `2503 + b * (2552 ±0)`73		// Minimum execution time: 3_437_000 picoseconds.74		Weight::from_parts(13_322_752, 2503)75			// Standard Error: 1_72876			.saturating_add(Weight::from_parts(3_605_522, 0).saturating_mul(b.into()))77			.saturating_add(T::DbWeight::get().reads(1_u64))78			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(b.into())))79			.saturating_add(T::DbWeight::get().writes(1_u64))80			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(b.into())))81			.saturating_add(Weight::from_parts(0, 2552).saturating_mul(b.into()))82	}83	/// Storage: Fungible TotalSupply (r:1 w:1)84	/// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)85	/// Storage: Fungible Balance (r:1 w:1)86	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)87	fn burn_item() -> Weight {88		// Proof Size summary in bytes:89		//  Measured:  `197`90		//  Estimated: `5055`91		// Minimum execution time: 12_894_000 picoseconds.92		Weight::from_parts(13_347_000, 5055)93			.saturating_add(T::DbWeight::get().reads(2_u64))94			.saturating_add(T::DbWeight::get().writes(2_u64))95	}96	/// Storage: Fungible Balance (r:2 w:2)97	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)98	fn transfer_raw() -> Weight {99		// Proof Size summary in bytes:100		//  Measured:  `182`101		//  Estimated: `5104`102		// Minimum execution time: 6_678_000 picoseconds.103		Weight::from_parts(7_151_000, 5104)104			.saturating_add(T::DbWeight::get().reads(2_u64))105			.saturating_add(T::DbWeight::get().writes(2_u64))106	}107	/// Storage: Fungible Balance (r:1 w:0)108	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)109	/// Storage: Fungible Allowance (r:0 w:1)110	/// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)111	fn approve() -> Weight {112		// Proof Size summary in bytes:113		//  Measured:  `182`114		//  Estimated: `2552`115		// Minimum execution time: 12_417_000 picoseconds.116		Weight::from_parts(12_658_000, 2552)117			.saturating_add(T::DbWeight::get().reads(1_u64))118			.saturating_add(T::DbWeight::get().writes(1_u64))119	}120	/// Storage: Fungible Balance (r:1 w:0)121	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)122	/// Storage: Fungible Allowance (r:0 w:1)123	/// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)124	fn approve_from() -> Weight {125		// Proof Size summary in bytes:126		//  Measured:  `170`127		//  Estimated: `2552`128		// Minimum execution time: 12_322_000 picoseconds.129		Weight::from_parts(12_629_000, 2552)130			.saturating_add(T::DbWeight::get().reads(1_u64))131			.saturating_add(T::DbWeight::get().writes(1_u64))132	}133	/// Storage: Fungible Allowance (r:1 w:0)134	/// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)135	fn check_allowed_raw() -> Weight {136		// Proof Size summary in bytes:137		//  Measured:  `210`138		//  Estimated: `2568`139		// Minimum execution time: 2_842_000 picoseconds.140		Weight::from_parts(3_077_000, 2568)141			.saturating_add(T::DbWeight::get().reads(1_u64))142	}143	/// Storage: Fungible Allowance (r:0 w:1)144	/// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)145	fn set_allowance_unchecked_raw() -> Weight {146		// Proof Size summary in bytes:147		//  Measured:  `0`148		//  Estimated: `0`149		// Minimum execution time: 2_532_000 picoseconds.150		Weight::from_parts(2_680_000, 0)151			.saturating_add(T::DbWeight::get().writes(1_u64))152	}153	/// Storage: Fungible Allowance (r:1 w:1)154	/// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)155	/// Storage: Fungible TotalSupply (r:1 w:1)156	/// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)157	/// Storage: Fungible Balance (r:1 w:1)158	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)159	fn burn_from() -> Weight {160		// Proof Size summary in bytes:161		//  Measured:  `315`162		//  Estimated: `7623`163		// Minimum execution time: 21_271_000 picoseconds.164		Weight::from_parts(21_709_000, 7623)165			.saturating_add(T::DbWeight::get().reads(3_u64))166			.saturating_add(T::DbWeight::get().writes(3_u64))167	}168}169170// For backwards compatibility and tests171impl WeightInfo for () {172	/// Storage: Fungible TotalSupply (r:1 w:1)173	/// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)174	/// Storage: Fungible Balance (r:1 w:1)175	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)176	fn create_item() -> Weight {177		// Proof Size summary in bytes:178		//  Measured:  `42`179		//  Estimated: `5055`180		// Minimum execution time: 10_152_000 picoseconds.181		Weight::from_parts(10_520_000, 5055)182			.saturating_add(RocksDbWeight::get().reads(2_u64))183			.saturating_add(RocksDbWeight::get().writes(2_u64))184	}185	/// Storage: Fungible TotalSupply (r:1 w:1)186	/// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)187	/// Storage: Fungible Balance (r:200 w:200)188	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)189	/// The range of component `b` is `[0, 200]`.190	fn create_multiple_items_ex(b: u32, ) -> Weight {191		// Proof Size summary in bytes:192		//  Measured:  `42`193		//  Estimated: `2503 + b * (2552 ±0)`194		// Minimum execution time: 3_437_000 picoseconds.195		Weight::from_parts(13_322_752, 2503)196			// Standard Error: 1_728197			.saturating_add(Weight::from_parts(3_605_522, 0).saturating_mul(b.into()))198			.saturating_add(RocksDbWeight::get().reads(1_u64))199			.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(b.into())))200			.saturating_add(RocksDbWeight::get().writes(1_u64))201			.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(b.into())))202			.saturating_add(Weight::from_parts(0, 2552).saturating_mul(b.into()))203	}204	/// Storage: Fungible TotalSupply (r:1 w:1)205	/// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)206	/// Storage: Fungible Balance (r:1 w:1)207	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)208	fn burn_item() -> Weight {209		// Proof Size summary in bytes:210		//  Measured:  `197`211		//  Estimated: `5055`212		// Minimum execution time: 12_894_000 picoseconds.213		Weight::from_parts(13_347_000, 5055)214			.saturating_add(RocksDbWeight::get().reads(2_u64))215			.saturating_add(RocksDbWeight::get().writes(2_u64))216	}217	/// Storage: Fungible Balance (r:2 w:2)218	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)219	fn transfer_raw() -> Weight {220		// Proof Size summary in bytes:221		//  Measured:  `182`222		//  Estimated: `5104`223		// Minimum execution time: 6_678_000 picoseconds.224		Weight::from_parts(7_151_000, 5104)225			.saturating_add(RocksDbWeight::get().reads(2_u64))226			.saturating_add(RocksDbWeight::get().writes(2_u64))227	}228	/// Storage: Fungible Balance (r:1 w:0)229	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)230	/// Storage: Fungible Allowance (r:0 w:1)231	/// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)232	fn approve() -> Weight {233		// Proof Size summary in bytes:234		//  Measured:  `182`235		//  Estimated: `2552`236		// Minimum execution time: 12_417_000 picoseconds.237		Weight::from_parts(12_658_000, 2552)238			.saturating_add(RocksDbWeight::get().reads(1_u64))239			.saturating_add(RocksDbWeight::get().writes(1_u64))240	}241	/// Storage: Fungible Balance (r:1 w:0)242	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)243	/// Storage: Fungible Allowance (r:0 w:1)244	/// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)245	fn approve_from() -> Weight {246		// Proof Size summary in bytes:247		//  Measured:  `170`248		//  Estimated: `2552`249		// Minimum execution time: 12_322_000 picoseconds.250		Weight::from_parts(12_629_000, 2552)251			.saturating_add(RocksDbWeight::get().reads(1_u64))252			.saturating_add(RocksDbWeight::get().writes(1_u64))253	}254	/// Storage: Fungible Allowance (r:1 w:0)255	/// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)256	fn check_allowed_raw() -> Weight {257		// Proof Size summary in bytes:258		//  Measured:  `210`259		//  Estimated: `2568`260		// Minimum execution time: 2_842_000 picoseconds.261		Weight::from_parts(3_077_000, 2568)262			.saturating_add(RocksDbWeight::get().reads(1_u64))263	}264	/// Storage: Fungible Allowance (r:0 w:1)265	/// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)266	fn set_allowance_unchecked_raw() -> Weight {267		// Proof Size summary in bytes:268		//  Measured:  `0`269		//  Estimated: `0`270		// Minimum execution time: 2_532_000 picoseconds.271		Weight::from_parts(2_680_000, 0)272			.saturating_add(RocksDbWeight::get().writes(1_u64))273	}274	/// Storage: Fungible Allowance (r:1 w:1)275	/// Proof: Fungible Allowance (max_values: None, max_size: Some(93), added: 2568, mode: MaxEncodedLen)276	/// Storage: Fungible TotalSupply (r:1 w:1)277	/// Proof: Fungible TotalSupply (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)278	/// Storage: Fungible Balance (r:1 w:1)279	/// Proof: Fungible Balance (max_values: None, max_size: Some(77), added: 2552, mode: MaxEncodedLen)280	fn burn_from() -> Weight {281		// Proof Size summary in bytes:282		//  Measured:  `315`283		//  Estimated: `7623`284		// Minimum execution time: 21_271_000 picoseconds.285		Weight::from_parts(21_709_000, 7623)286			.saturating_add(RocksDbWeight::get().reads(3_u64))287			.saturating_add(RocksDbWeight::get().writes(3_u64))288	}289}290