git.delta.rocks / unique-network / refs/commits / 7025e37260da

difftreelog

source

pallets/unique/src/weights.rs8.8 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		Weight::from_ref_time(43_143_000)61			.saturating_add(T::DbWeight::get().reads(4 as u64))62			.saturating_add(T::DbWeight::get().writes(6 as u64))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		Weight::from_ref_time(50_188_000)73			.saturating_add(T::DbWeight::get().reads(3 as u64))74			.saturating_add(T::DbWeight::get().writes(6 as u64))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		Weight::from_ref_time(18_238_000)80			.saturating_add(T::DbWeight::get().reads(1 as u64))81			.saturating_add(T::DbWeight::get().writes(1 as u64))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		Weight::from_ref_time(18_084_000)87			.saturating_add(T::DbWeight::get().reads(1 as u64))88			.saturating_add(T::DbWeight::get().writes(1 as u64))89	}90	// Storage: Common CollectionById (r:1 w:1)91	fn change_collection_owner() -> Weight {92		Weight::from_ref_time(18_265_000)93			.saturating_add(T::DbWeight::get().reads(1 as u64))94			.saturating_add(T::DbWeight::get().writes(1 as u64))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		Weight::from_ref_time(23_558_000)101			.saturating_add(T::DbWeight::get().reads(3 as u64))102			.saturating_add(T::DbWeight::get().writes(2 as u64))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		Weight::from_ref_time(25_285_000)109			.saturating_add(T::DbWeight::get().reads(3 as u64))110			.saturating_add(T::DbWeight::get().writes(2 as u64))111	}112	// Storage: Common CollectionById (r:1 w:1)113	fn set_collection_sponsor() -> Weight {114		Weight::from_ref_time(17_885_000)115			.saturating_add(T::DbWeight::get().reads(1 as u64))116			.saturating_add(T::DbWeight::get().writes(1 as u64))117	}118	// Storage: Common CollectionById (r:1 w:1)119	fn confirm_sponsorship() -> Weight {120		Weight::from_ref_time(17_897_000)121			.saturating_add(T::DbWeight::get().reads(1 as u64))122			.saturating_add(T::DbWeight::get().writes(1 as u64))123	}124	// Storage: Common CollectionById (r:1 w:1)125	fn remove_collection_sponsor() -> Weight {126		Weight::from_ref_time(17_836_000)127			.saturating_add(T::DbWeight::get().reads(1 as u64))128			.saturating_add(T::DbWeight::get().writes(1 as u64))129	}130	// Storage: Common CollectionById (r:1 w:1)131	fn set_transfers_enabled_flag() -> Weight {132		Weight::from_ref_time(9_714_000)133			.saturating_add(T::DbWeight::get().reads(1 as u64))134			.saturating_add(T::DbWeight::get().writes(1 as u64))135	}136	// Storage: Common CollectionById (r:1 w:1)137	fn set_collection_limits() -> Weight {138		Weight::from_ref_time(18_166_000)139			.saturating_add(T::DbWeight::get().reads(1 as u64))140			.saturating_add(T::DbWeight::get().writes(1 as u64))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		Weight::from_ref_time(43_143_000)154			.saturating_add(RocksDbWeight::get().reads(4 as u64))155			.saturating_add(RocksDbWeight::get().writes(6 as u64))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		Weight::from_ref_time(50_188_000)166			.saturating_add(RocksDbWeight::get().reads(3 as u64))167			.saturating_add(RocksDbWeight::get().writes(6 as u64))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		Weight::from_ref_time(18_238_000)173			.saturating_add(RocksDbWeight::get().reads(1 as u64))174			.saturating_add(RocksDbWeight::get().writes(1 as u64))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		Weight::from_ref_time(18_084_000)180			.saturating_add(RocksDbWeight::get().reads(1 as u64))181			.saturating_add(RocksDbWeight::get().writes(1 as u64))182	}183	// Storage: Common CollectionById (r:1 w:1)184	fn change_collection_owner() -> Weight {185		Weight::from_ref_time(18_265_000)186			.saturating_add(RocksDbWeight::get().reads(1 as u64))187			.saturating_add(RocksDbWeight::get().writes(1 as u64))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		Weight::from_ref_time(23_558_000)194			.saturating_add(RocksDbWeight::get().reads(3 as u64))195			.saturating_add(RocksDbWeight::get().writes(2 as u64))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		Weight::from_ref_time(25_285_000)202			.saturating_add(RocksDbWeight::get().reads(3 as u64))203			.saturating_add(RocksDbWeight::get().writes(2 as u64))204	}205	// Storage: Common CollectionById (r:1 w:1)206	fn set_collection_sponsor() -> Weight {207		Weight::from_ref_time(17_885_000)208			.saturating_add(RocksDbWeight::get().reads(1 as u64))209			.saturating_add(RocksDbWeight::get().writes(1 as u64))210	}211	// Storage: Common CollectionById (r:1 w:1)212	fn confirm_sponsorship() -> Weight {213		Weight::from_ref_time(17_897_000)214			.saturating_add(RocksDbWeight::get().reads(1 as u64))215			.saturating_add(RocksDbWeight::get().writes(1 as u64))216	}217	// Storage: Common CollectionById (r:1 w:1)218	fn remove_collection_sponsor() -> Weight {219		Weight::from_ref_time(17_836_000)220			.saturating_add(RocksDbWeight::get().reads(1 as u64))221			.saturating_add(RocksDbWeight::get().writes(1 as u64))222	}223	// Storage: Common CollectionById (r:1 w:1)224	fn set_transfers_enabled_flag() -> Weight {225		Weight::from_ref_time(9_714_000)226			.saturating_add(RocksDbWeight::get().reads(1 as u64))227			.saturating_add(RocksDbWeight::get().writes(1 as u64))228	}229	// Storage: Common CollectionById (r:1 w:1)230	fn set_collection_limits() -> Weight {231		Weight::from_ref_time(18_166_000)232			.saturating_add(RocksDbWeight::get().reads(1 as u64))233			.saturating_add(RocksDbWeight::get().writes(1 as u64))234	}235}