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

difftreelog

source

pallets/unique/src/weights.rs8.7 KiBsourcehistory
1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_unique4//!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-unique15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=8023// --heap-pages=409624// --output=./pallets/unique/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_unique.35pub trait WeightInfo {36	fn create_collection() -> Weight;37	fn destroy_collection() -> Weight;38	fn add_to_allow_list() -> Weight;39	fn remove_from_allow_list() -> Weight;40	fn change_collection_owner() -> Weight;41	fn add_collection_admin() -> Weight;42	fn remove_collection_admin() -> Weight;43	fn set_collection_sponsor() -> Weight;44	fn confirm_sponsorship() -> Weight;45	fn remove_collection_sponsor() -> Weight;46	fn set_transfers_enabled_flag() -> Weight;47	fn set_collection_limits() -> Weight;48}4950/// Weights for pallet_unique using the Substrate node and recommended hardware.51pub struct SubstrateWeight<T>(PhantomData<T>);52impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {53	// Storage: Common CreatedCollectionCount (r:1 w:1)54	// Storage: Common DestroyedCollectionCount (r:1 w:0)55	// Storage: System Account (r:2 w:2)56	// Storage: Common CollectionPropertyPermissions (r:0 w:1)57	// Storage: Common CollectionProperties (r:0 w:1)58	// Storage: Common CollectionById (r:0 w:1)59	fn create_collection() -> Weight {60		(43_143_000 as Weight)61			.saturating_add(T::DbWeight::get().reads(4 as Weight))62			.saturating_add(T::DbWeight::get().writes(6 as Weight))63	}64	// Storage: Common CollectionById (r:1 w:1)65	// Storage: Nonfungible TokenData (r:1 w:0)66	// Storage: Common DestroyedCollectionCount (r:1 w:1)67	// Storage: Nonfungible TokensMinted (r:0 w:1)68	// Storage: Nonfungible TokensBurnt (r:0 w:1)69	// Storage: Common AdminAmount (r:0 w:1)70	// Storage: Common CollectionProperties (r:0 w:1)71	fn destroy_collection() -> Weight {72		(50_188_000 as Weight)73			.saturating_add(T::DbWeight::get().reads(3 as Weight))74			.saturating_add(T::DbWeight::get().writes(6 as Weight))75	}76	// Storage: Common CollectionById (r:1 w:0)77	// Storage: Common Allowlist (r:0 w:1)78	fn add_to_allow_list() -> Weight {79		(18_238_000 as Weight)80			.saturating_add(T::DbWeight::get().reads(1 as Weight))81			.saturating_add(T::DbWeight::get().writes(1 as Weight))82	}83	// Storage: Common CollectionById (r:1 w:0)84	// Storage: Common Allowlist (r:0 w:1)85	fn remove_from_allow_list() -> Weight {86		(18_084_000 as Weight)87			.saturating_add(T::DbWeight::get().reads(1 as Weight))88			.saturating_add(T::DbWeight::get().writes(1 as Weight))89	}90	// Storage: Common CollectionById (r:1 w:1)91	fn change_collection_owner() -> Weight {92		(18_265_000 as Weight)93			.saturating_add(T::DbWeight::get().reads(1 as Weight))94			.saturating_add(T::DbWeight::get().writes(1 as Weight))95	}96	// Storage: Common CollectionById (r:1 w:0)97	// Storage: Common IsAdmin (r:1 w:1)98	// Storage: Common AdminAmount (r:1 w:1)99	fn add_collection_admin() -> Weight {100		(23_558_000 as Weight)101			.saturating_add(T::DbWeight::get().reads(3 as Weight))102			.saturating_add(T::DbWeight::get().writes(2 as Weight))103	}104	// Storage: Common CollectionById (r:1 w:0)105	// Storage: Common IsAdmin (r:1 w:1)106	// Storage: Common AdminAmount (r:1 w:1)107	fn remove_collection_admin() -> Weight {108		(25_285_000 as Weight)109			.saturating_add(T::DbWeight::get().reads(3 as Weight))110			.saturating_add(T::DbWeight::get().writes(2 as Weight))111	}112	// Storage: Common CollectionById (r:1 w:1)113	fn set_collection_sponsor() -> Weight {114		(17_885_000 as Weight)115			.saturating_add(T::DbWeight::get().reads(1 as Weight))116			.saturating_add(T::DbWeight::get().writes(1 as Weight))117	}118	// Storage: Common CollectionById (r:1 w:1)119	fn confirm_sponsorship() -> Weight {120		(17_897_000 as Weight)121			.saturating_add(T::DbWeight::get().reads(1 as Weight))122			.saturating_add(T::DbWeight::get().writes(1 as Weight))123	}124	// Storage: Common CollectionById (r:1 w:1)125	fn remove_collection_sponsor() -> Weight {126		(17_836_000 as Weight)127			.saturating_add(T::DbWeight::get().reads(1 as Weight))128			.saturating_add(T::DbWeight::get().writes(1 as Weight))129	}130	// Storage: Common CollectionById (r:1 w:1)131	fn set_transfers_enabled_flag() -> Weight {132		(9_714_000 as Weight)133			.saturating_add(T::DbWeight::get().reads(1 as Weight))134			.saturating_add(T::DbWeight::get().writes(1 as Weight))135	}136	// Storage: Common CollectionById (r:1 w:1)137	fn set_collection_limits() -> Weight {138		(18_166_000 as Weight)139			.saturating_add(T::DbWeight::get().reads(1 as Weight))140			.saturating_add(T::DbWeight::get().writes(1 as Weight))141	}142}143144// For backwards compatibility and tests145impl WeightInfo for () {146	// Storage: Common CreatedCollectionCount (r:1 w:1)147	// Storage: Common DestroyedCollectionCount (r:1 w:0)148	// Storage: System Account (r:2 w:2)149	// Storage: Common CollectionPropertyPermissions (r:0 w:1)150	// Storage: Common CollectionProperties (r:0 w:1)151	// Storage: Common CollectionById (r:0 w:1)152	fn create_collection() -> Weight {153		(43_143_000 as Weight)154			.saturating_add(RocksDbWeight::get().reads(4 as Weight))155			.saturating_add(RocksDbWeight::get().writes(6 as Weight))156	}157	// Storage: Common CollectionById (r:1 w:1)158	// Storage: Nonfungible TokenData (r:1 w:0)159	// Storage: Common DestroyedCollectionCount (r:1 w:1)160	// Storage: Nonfungible TokensMinted (r:0 w:1)161	// Storage: Nonfungible TokensBurnt (r:0 w:1)162	// Storage: Common AdminAmount (r:0 w:1)163	// Storage: Common CollectionProperties (r:0 w:1)164	fn destroy_collection() -> Weight {165		(50_188_000 as Weight)166			.saturating_add(RocksDbWeight::get().reads(3 as Weight))167			.saturating_add(RocksDbWeight::get().writes(6 as Weight))168	}169	// Storage: Common CollectionById (r:1 w:0)170	// Storage: Common Allowlist (r:0 w:1)171	fn add_to_allow_list() -> Weight {172		(18_238_000 as Weight)173			.saturating_add(RocksDbWeight::get().reads(1 as Weight))174			.saturating_add(RocksDbWeight::get().writes(1 as Weight))175	}176	// Storage: Common CollectionById (r:1 w:0)177	// Storage: Common Allowlist (r:0 w:1)178	fn remove_from_allow_list() -> Weight {179		(18_084_000 as Weight)180			.saturating_add(RocksDbWeight::get().reads(1 as Weight))181			.saturating_add(RocksDbWeight::get().writes(1 as Weight))182	}183	// Storage: Common CollectionById (r:1 w:1)184	fn change_collection_owner() -> Weight {185		(18_265_000 as Weight)186			.saturating_add(RocksDbWeight::get().reads(1 as Weight))187			.saturating_add(RocksDbWeight::get().writes(1 as Weight))188	}189	// Storage: Common CollectionById (r:1 w:0)190	// Storage: Common IsAdmin (r:1 w:1)191	// Storage: Common AdminAmount (r:1 w:1)192	fn add_collection_admin() -> Weight {193		(23_558_000 as Weight)194			.saturating_add(RocksDbWeight::get().reads(3 as Weight))195			.saturating_add(RocksDbWeight::get().writes(2 as Weight))196	}197	// Storage: Common CollectionById (r:1 w:0)198	// Storage: Common IsAdmin (r:1 w:1)199	// Storage: Common AdminAmount (r:1 w:1)200	fn remove_collection_admin() -> Weight {201		(25_285_000 as Weight)202			.saturating_add(RocksDbWeight::get().reads(3 as Weight))203			.saturating_add(RocksDbWeight::get().writes(2 as Weight))204	}205	// Storage: Common CollectionById (r:1 w:1)206	fn set_collection_sponsor() -> Weight {207		(17_885_000 as Weight)208			.saturating_add(RocksDbWeight::get().reads(1 as Weight))209			.saturating_add(RocksDbWeight::get().writes(1 as Weight))210	}211	// Storage: Common CollectionById (r:1 w:1)212	fn confirm_sponsorship() -> Weight {213		(17_897_000 as Weight)214			.saturating_add(RocksDbWeight::get().reads(1 as Weight))215			.saturating_add(RocksDbWeight::get().writes(1 as Weight))216	}217	// Storage: Common CollectionById (r:1 w:1)218	fn remove_collection_sponsor() -> Weight {219		(17_836_000 as Weight)220			.saturating_add(RocksDbWeight::get().reads(1 as Weight))221			.saturating_add(RocksDbWeight::get().writes(1 as Weight))222	}223	// Storage: Common CollectionById (r:1 w:1)224	fn set_transfers_enabled_flag() -> Weight {225		(9_714_000 as Weight)226			.saturating_add(RocksDbWeight::get().reads(1 as Weight))227			.saturating_add(RocksDbWeight::get().writes(1 as Weight))228	}229	// Storage: Common CollectionById (r:1 w:1)230	fn set_collection_limits() -> Weight {231		(18_166_000 as Weight)232			.saturating_add(RocksDbWeight::get().reads(1 as Weight))233			.saturating_add(RocksDbWeight::get().writes(1 as Weight))234	}235}