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

difftreelog

source

pallets/nonfungible/src/weights.rs8.6 KiBsourcehistory
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_nonfungible4//!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-nonfungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=20022// --heap-pages=409623// --output=./pallets/nonfungible/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_nonfungible.34pub trait WeightInfo {35	fn create_item() -> Weight;36	fn create_multiple_items(b: u32, ) -> 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	fn set_variable_metadata(b: u32, ) -> Weight;44}4546/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.47pub struct SubstrateWeight<T>(PhantomData<T>);48impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {49	// Storage: Nonfungible TokensMinted (r:1 w:1)50	// Storage: Nonfungible AccountBalance (r:1 w:1)51	// Storage: Nonfungible TokenData (r:0 w:1)52	// Storage: Nonfungible Owned (r:0 w:1)53	fn create_item() -> Weight {54		(18_450_000 as Weight)55			.saturating_add(T::DbWeight::get().reads(2 as Weight))56			.saturating_add(T::DbWeight::get().writes(4 as Weight))57	}58	// Storage: Nonfungible TokensMinted (r:1 w:1)59	// Storage: Nonfungible AccountBalance (r:1 w:1)60	// Storage: Nonfungible TokenData (r:0 w:4)61	// Storage: Nonfungible Owned (r:0 w:4)62	fn create_multiple_items(b: u32, ) -> Weight {63		(10_228_000 as Weight)64			// Standard Error: 1_00065			.saturating_add((4_392_000 as Weight).saturating_mul(b as Weight))66			.saturating_add(T::DbWeight::get().reads(2 as Weight))67			.saturating_add(T::DbWeight::get().writes(2 as Weight))68			.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))69	}70	// Storage: Nonfungible TokensMinted (r:1 w:1)71	// Storage: Nonfungible AccountBalance (r:4 w:4)72	// Storage: Nonfungible TokenData (r:0 w:4)73	// Storage: Nonfungible Owned (r:0 w:4)74	fn create_multiple_items_ex(b: u32, ) -> Weight {75		(6_543_000 as Weight)76			// Standard Error: 2_00077			.saturating_add((7_175_000 as Weight).saturating_mul(b as Weight))78			.saturating_add(T::DbWeight::get().reads(1 as Weight))79			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))80			.saturating_add(T::DbWeight::get().writes(1 as Weight))81			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))82	}83	// Storage: Nonfungible TokenData (r:1 w:1)84	// Storage: Nonfungible TokensBurnt (r:1 w:1)85	// Storage: Nonfungible AccountBalance (r:1 w:1)86	// Storage: Nonfungible Allowance (r:1 w:0)87	// Storage: Nonfungible Owned (r:0 w:1)88	fn burn_item() -> Weight {89		(24_554_000 as Weight)90			.saturating_add(T::DbWeight::get().reads(4 as Weight))91			.saturating_add(T::DbWeight::get().writes(4 as Weight))92	}93	// Storage: Nonfungible TokenData (r:1 w:1)94	// Storage: Nonfungible AccountBalance (r:2 w:2)95	// Storage: Nonfungible Allowance (r:1 w:0)96	// Storage: Nonfungible Owned (r:0 w:2)97	fn transfer() -> Weight {98		(28_339_000 as Weight)99			.saturating_add(T::DbWeight::get().reads(4 as Weight))100			.saturating_add(T::DbWeight::get().writes(5 as Weight))101	}102	// Storage: Nonfungible TokenData (r:1 w:0)103	// Storage: Nonfungible Allowance (r:1 w:1)104	fn approve() -> Weight {105		(17_616_000 as Weight)106			.saturating_add(T::DbWeight::get().reads(2 as Weight))107			.saturating_add(T::DbWeight::get().writes(1 as Weight))108	}109	// Storage: Nonfungible Allowance (r:1 w:1)110	// Storage: Nonfungible TokenData (r:1 w:1)111	// Storage: Nonfungible AccountBalance (r:2 w:2)112	// Storage: Nonfungible Owned (r:0 w:2)113	fn transfer_from() -> Weight {114		(32_196_000 as Weight)115			.saturating_add(T::DbWeight::get().reads(4 as Weight))116			.saturating_add(T::DbWeight::get().writes(6 as Weight))117	}118	// Storage: Nonfungible Allowance (r:1 w:1)119	// Storage: Nonfungible TokenData (r:1 w:1)120	// Storage: Nonfungible TokensBurnt (r:1 w:1)121	// Storage: Nonfungible AccountBalance (r:1 w:1)122	// Storage: Nonfungible Owned (r:0 w:1)123	fn burn_from() -> Weight {124		(27_580_000 as Weight)125			.saturating_add(T::DbWeight::get().reads(4 as Weight))126			.saturating_add(T::DbWeight::get().writes(5 as Weight))127	}128	// Storage: Nonfungible TokenData (r:1 w:1)129	fn set_variable_metadata(_b: u32, ) -> Weight {130		(7_700_000 as Weight)131			.saturating_add(T::DbWeight::get().reads(1 as Weight))132			.saturating_add(T::DbWeight::get().writes(1 as Weight))133	}134}135136// For backwards compatibility and tests137impl WeightInfo for () {138	// Storage: Nonfungible TokensMinted (r:1 w:1)139	// Storage: Nonfungible AccountBalance (r:1 w:1)140	// Storage: Nonfungible TokenData (r:0 w:1)141	// Storage: Nonfungible Owned (r:0 w:1)142	fn create_item() -> Weight {143		(18_450_000 as Weight)144			.saturating_add(RocksDbWeight::get().reads(2 as Weight))145			.saturating_add(RocksDbWeight::get().writes(4 as Weight))146	}147	// Storage: Nonfungible TokensMinted (r:1 w:1)148	// Storage: Nonfungible AccountBalance (r:1 w:1)149	// Storage: Nonfungible TokenData (r:0 w:4)150	// Storage: Nonfungible Owned (r:0 w:4)151	fn create_multiple_items(b: u32, ) -> Weight {152		(10_228_000 as Weight)153			// Standard Error: 1_000154			.saturating_add((4_392_000 as Weight).saturating_mul(b as Weight))155			.saturating_add(RocksDbWeight::get().reads(2 as Weight))156			.saturating_add(RocksDbWeight::get().writes(2 as Weight))157			.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))158	}159	// Storage: Nonfungible TokensMinted (r:1 w:1)160	// Storage: Nonfungible AccountBalance (r:4 w:4)161	// Storage: Nonfungible TokenData (r:0 w:4)162	// Storage: Nonfungible Owned (r:0 w:4)163	fn create_multiple_items_ex(b: u32, ) -> Weight {164		(6_543_000 as Weight)165			// Standard Error: 2_000166			.saturating_add((7_175_000 as Weight).saturating_mul(b as Weight))167			.saturating_add(RocksDbWeight::get().reads(1 as Weight))168			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))169			.saturating_add(RocksDbWeight::get().writes(1 as Weight))170			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))171	}172	// Storage: Nonfungible TokenData (r:1 w:1)173	// Storage: Nonfungible TokensBurnt (r:1 w:1)174	// Storage: Nonfungible AccountBalance (r:1 w:1)175	// Storage: Nonfungible Allowance (r:1 w:0)176	// Storage: Nonfungible Owned (r:0 w:1)177	fn burn_item() -> Weight {178		(24_554_000 as Weight)179			.saturating_add(RocksDbWeight::get().reads(4 as Weight))180			.saturating_add(RocksDbWeight::get().writes(4 as Weight))181	}182	// Storage: Nonfungible TokenData (r:1 w:1)183	// Storage: Nonfungible AccountBalance (r:2 w:2)184	// Storage: Nonfungible Allowance (r:1 w:0)185	// Storage: Nonfungible Owned (r:0 w:2)186	fn transfer() -> Weight {187		(28_339_000 as Weight)188			.saturating_add(RocksDbWeight::get().reads(4 as Weight))189			.saturating_add(RocksDbWeight::get().writes(5 as Weight))190	}191	// Storage: Nonfungible TokenData (r:1 w:0)192	// Storage: Nonfungible Allowance (r:1 w:1)193	fn approve() -> Weight {194		(17_616_000 as Weight)195			.saturating_add(RocksDbWeight::get().reads(2 as Weight))196			.saturating_add(RocksDbWeight::get().writes(1 as Weight))197	}198	// Storage: Nonfungible Allowance (r:1 w:1)199	// Storage: Nonfungible TokenData (r:1 w:1)200	// Storage: Nonfungible AccountBalance (r:2 w:2)201	// Storage: Nonfungible Owned (r:0 w:2)202	fn transfer_from() -> Weight {203		(32_196_000 as Weight)204			.saturating_add(RocksDbWeight::get().reads(4 as Weight))205			.saturating_add(RocksDbWeight::get().writes(6 as Weight))206	}207	// Storage: Nonfungible Allowance (r:1 w:1)208	// Storage: Nonfungible TokenData (r:1 w:1)209	// Storage: Nonfungible TokensBurnt (r:1 w:1)210	// Storage: Nonfungible AccountBalance (r:1 w:1)211	// Storage: Nonfungible Owned (r:0 w:1)212	fn burn_from() -> Weight {213		(27_580_000 as Weight)214			.saturating_add(RocksDbWeight::get().reads(4 as Weight))215			.saturating_add(RocksDbWeight::get().writes(5 as Weight))216	}217	// Storage: Nonfungible TokenData (r:1 w:1)218	fn set_variable_metadata(_b: u32, ) -> Weight {219		(7_700_000 as Weight)220			.saturating_add(RocksDbWeight::get().reads(1 as Weight))221			.saturating_add(RocksDbWeight::get().writes(1 as Weight))222	}223}