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

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: 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-nonfungible14// --wasm-execution15// compiled16// --extrinsic17// *18// --template19// .maintain/frame-weight-template.hbs20// --steps=5021// --repeat=2022// --output=./pallets/nonfungible/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_nonfungible.33pub trait WeightInfo {34	fn create_item() -> Weight;35	fn create_multiple_items(b: u32, ) -> Weight;36	fn create_multiple_items_ex(b: u32, ) -> Weight;37	fn burn_item() -> Weight;38	fn transfer() -> Weight;39	fn approve() -> Weight;40	fn transfer_from() -> Weight;41	fn burn_from() -> Weight;42	fn set_variable_metadata(b: u32, ) -> Weight;43}4445/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.46pub struct SubstrateWeight<T>(PhantomData<T>);47impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {48	// Storage: Nonfungible TokensMinted (r:1 w:1)49	// Storage: Nonfungible AccountBalance (r:1 w:1)50	// Storage: Nonfungible TokenData (r:0 w:1)51	// Storage: Nonfungible Owned (r:0 w:1)52	fn create_item() -> Weight {53		(18_709_000 as Weight)54			.saturating_add(T::DbWeight::get().reads(2 as Weight))55			.saturating_add(T::DbWeight::get().writes(4 as Weight))56	}57	// Storage: Nonfungible TokensMinted (r:1 w:1)58	// Storage: Nonfungible AccountBalance (r:1 w:1)59	// Storage: Nonfungible TokenData (r:0 w:4)60	// Storage: Nonfungible Owned (r:0 w:4)61	fn create_multiple_items(b: u32, ) -> Weight {62		(22_235_000 as Weight)63			// Standard Error: 8_00064			.saturating_add((4_515_000 as Weight).saturating_mul(b as Weight))65			.saturating_add(T::DbWeight::get().reads(2 as Weight))66			.saturating_add(T::DbWeight::get().writes(2 as Weight))67			.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))68	}69	// Storage: Nonfungible TokensMinted (r:1 w:1)70	// Storage: Nonfungible AccountBalance (r:4 w:4)71	// Storage: Nonfungible TokenData (r:0 w:4)72	// Storage: Nonfungible Owned (r:0 w:4)73	fn create_multiple_items_ex(b: u32, ) -> Weight {74		(14_436_000 as Weight)75			// Standard Error: 14_00076			.saturating_add((7_376_000 as Weight).saturating_mul(b as Weight))77			.saturating_add(T::DbWeight::get().reads(1 as Weight))78			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))79			.saturating_add(T::DbWeight::get().writes(1 as Weight))80			.saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))81	}82	// Storage: Nonfungible TokenData (r:1 w:1)83	// Storage: Nonfungible TokensBurnt (r:1 w:1)84	// Storage: Nonfungible AccountBalance (r:1 w:1)85	// Storage: Nonfungible Allowance (r:1 w:0)86	// Storage: Nonfungible Owned (r:0 w:1)87	fn burn_item() -> Weight {88		(24_609_000 as Weight)89			.saturating_add(T::DbWeight::get().reads(4 as Weight))90			.saturating_add(T::DbWeight::get().writes(4 as Weight))91	}92	// Storage: Nonfungible TokenData (r:1 w:1)93	// Storage: Nonfungible AccountBalance (r:2 w:2)94	// Storage: Nonfungible Allowance (r:1 w:0)95	// Storage: Nonfungible Owned (r:0 w:2)96	fn transfer() -> Weight {97		(28_283_000 as Weight)98			.saturating_add(T::DbWeight::get().reads(4 as Weight))99			.saturating_add(T::DbWeight::get().writes(5 as Weight))100	}101	// Storage: Nonfungible TokenData (r:1 w:0)102	// Storage: Nonfungible Allowance (r:1 w:1)103	fn approve() -> Weight {104		(17_514_000 as Weight)105			.saturating_add(T::DbWeight::get().reads(2 as Weight))106			.saturating_add(T::DbWeight::get().writes(1 as Weight))107	}108	// Storage: Nonfungible Allowance (r:1 w:1)109	// Storage: Nonfungible TokenData (r:1 w:1)110	// Storage: Nonfungible AccountBalance (r:2 w:2)111	// Storage: Nonfungible Owned (r:0 w:2)112	fn transfer_from() -> Weight {113		(32_523_000 as Weight)114			.saturating_add(T::DbWeight::get().reads(4 as Weight))115			.saturating_add(T::DbWeight::get().writes(6 as Weight))116	}117	// Storage: Nonfungible Allowance (r:1 w:1)118	// Storage: Nonfungible TokenData (r:1 w:1)119	// Storage: Nonfungible TokensBurnt (r:1 w:1)120	// Storage: Nonfungible AccountBalance (r:1 w:1)121	// Storage: Nonfungible Owned (r:0 w:1)122	fn burn_from() -> Weight {123		(28_459_000 as Weight)124			.saturating_add(T::DbWeight::get().reads(4 as Weight))125			.saturating_add(T::DbWeight::get().writes(5 as Weight))126	}127	// Storage: Nonfungible TokenData (r:1 w:1)128	fn set_variable_metadata(_b: u32, ) -> Weight {129		(8_212_000 as Weight)130			.saturating_add(T::DbWeight::get().reads(1 as Weight))131			.saturating_add(T::DbWeight::get().writes(1 as Weight))132	}133}134135// For backwards compatibility and tests136impl WeightInfo for () {137	// Storage: Nonfungible TokensMinted (r:1 w:1)138	// Storage: Nonfungible AccountBalance (r:1 w:1)139	// Storage: Nonfungible TokenData (r:0 w:1)140	// Storage: Nonfungible Owned (r:0 w:1)141	fn create_item() -> Weight {142		(18_709_000 as Weight)143			.saturating_add(RocksDbWeight::get().reads(2 as Weight))144			.saturating_add(RocksDbWeight::get().writes(4 as Weight))145	}146	// Storage: Nonfungible TokensMinted (r:1 w:1)147	// Storage: Nonfungible AccountBalance (r:1 w:1)148	// Storage: Nonfungible TokenData (r:0 w:4)149	// Storage: Nonfungible Owned (r:0 w:4)150	fn create_multiple_items(b: u32, ) -> Weight {151		(22_235_000 as Weight)152			// Standard Error: 8_000153			.saturating_add((4_515_000 as Weight).saturating_mul(b as Weight))154			.saturating_add(RocksDbWeight::get().reads(2 as Weight))155			.saturating_add(RocksDbWeight::get().writes(2 as Weight))156			.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))157	}158	// Storage: Nonfungible TokensMinted (r:1 w:1)159	// Storage: Nonfungible AccountBalance (r:4 w:4)160	// Storage: Nonfungible TokenData (r:0 w:4)161	// Storage: Nonfungible Owned (r:0 w:4)162	fn create_multiple_items_ex(b: u32, ) -> Weight {163		(14_436_000 as Weight)164			// Standard Error: 14_000165			.saturating_add((7_376_000 as Weight).saturating_mul(b as Weight))166			.saturating_add(RocksDbWeight::get().reads(1 as Weight))167			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))168			.saturating_add(RocksDbWeight::get().writes(1 as Weight))169			.saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(b as Weight)))170	}171	// Storage: Nonfungible TokenData (r:1 w:1)172	// Storage: Nonfungible TokensBurnt (r:1 w:1)173	// Storage: Nonfungible AccountBalance (r:1 w:1)174	// Storage: Nonfungible Allowance (r:1 w:0)175	// Storage: Nonfungible Owned (r:0 w:1)176	fn burn_item() -> Weight {177		(24_609_000 as Weight)178			.saturating_add(RocksDbWeight::get().reads(4 as Weight))179			.saturating_add(RocksDbWeight::get().writes(4 as Weight))180	}181	// Storage: Nonfungible TokenData (r:1 w:1)182	// Storage: Nonfungible AccountBalance (r:2 w:2)183	// Storage: Nonfungible Allowance (r:1 w:0)184	// Storage: Nonfungible Owned (r:0 w:2)185	fn transfer() -> Weight {186		(28_283_000 as Weight)187			.saturating_add(RocksDbWeight::get().reads(4 as Weight))188			.saturating_add(RocksDbWeight::get().writes(5 as Weight))189	}190	// Storage: Nonfungible TokenData (r:1 w:0)191	// Storage: Nonfungible Allowance (r:1 w:1)192	fn approve() -> Weight {193		(17_514_000 as Weight)194			.saturating_add(RocksDbWeight::get().reads(2 as Weight))195			.saturating_add(RocksDbWeight::get().writes(1 as Weight))196	}197	// Storage: Nonfungible Allowance (r:1 w:1)198	// Storage: Nonfungible TokenData (r:1 w:1)199	// Storage: Nonfungible AccountBalance (r:2 w:2)200	// Storage: Nonfungible Owned (r:0 w:2)201	fn transfer_from() -> Weight {202		(32_523_000 as Weight)203			.saturating_add(RocksDbWeight::get().reads(4 as Weight))204			.saturating_add(RocksDbWeight::get().writes(6 as Weight))205	}206	// Storage: Nonfungible Allowance (r:1 w:1)207	// Storage: Nonfungible TokenData (r:1 w:1)208	// Storage: Nonfungible TokensBurnt (r:1 w:1)209	// Storage: Nonfungible AccountBalance (r:1 w:1)210	// Storage: Nonfungible Owned (r:0 w:1)211	fn burn_from() -> Weight {212		(28_459_000 as Weight)213			.saturating_add(RocksDbWeight::get().reads(4 as Weight))214			.saturating_add(RocksDbWeight::get().writes(5 as Weight))215	}216	// Storage: Nonfungible TokenData (r:1 w:1)217	fn set_variable_metadata(_b: u32, ) -> Weight {218		(8_212_000 as Weight)219			.saturating_add(RocksDbWeight::get().reads(1 as Weight))220			.saturating_add(RocksDbWeight::get().writes(1 as Weight))221	}222}