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

difftreelog

source

pallets/unique/src/weights.rs9.3 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	fn force_repair_collection() -> Weight;49}5051/// Weights for pallet_unique using the Substrate node and recommended hardware.52pub struct SubstrateWeight<T>(PhantomData<T>);53impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {54	// Storage: Common CreatedCollectionCount (r:1 w:1)55	// Storage: Common DestroyedCollectionCount (r:1 w:0)56	// Storage: System Account (r:2 w:2)57	// Storage: Common CollectionPropertyPermissions (r:0 w:1)58	// Storage: Common CollectionProperties (r:0 w:1)59	// Storage: Common CollectionById (r:0 w:1)60	fn create_collection() -> Weight {61		Weight::from_ref_time(43_143_000)62			.saturating_add(T::DbWeight::get().reads(4 as u64))63			.saturating_add(T::DbWeight::get().writes(6 as u64))64	}65	// Storage: Common CollectionById (r:1 w:1)66	// Storage: Nonfungible TokenData (r:1 w:0)67	// Storage: Common DestroyedCollectionCount (r:1 w:1)68	// Storage: Nonfungible TokensMinted (r:0 w:1)69	// Storage: Nonfungible TokensBurnt (r:0 w:1)70	// Storage: Common AdminAmount (r:0 w:1)71	// Storage: Common CollectionProperties (r:0 w:1)72	fn destroy_collection() -> Weight {73		Weight::from_ref_time(50_188_000)74			.saturating_add(T::DbWeight::get().reads(3 as u64))75			.saturating_add(T::DbWeight::get().writes(6 as u64))76	}77	// Storage: Common CollectionById (r:1 w:0)78	// Storage: Common Allowlist (r:0 w:1)79	fn add_to_allow_list() -> Weight {80		Weight::from_ref_time(18_238_000)81			.saturating_add(T::DbWeight::get().reads(1 as u64))82			.saturating_add(T::DbWeight::get().writes(1 as u64))83	}84	// Storage: Common CollectionById (r:1 w:0)85	// Storage: Common Allowlist (r:0 w:1)86	fn remove_from_allow_list() -> Weight {87		Weight::from_ref_time(18_084_000)88			.saturating_add(T::DbWeight::get().reads(1 as u64))89			.saturating_add(T::DbWeight::get().writes(1 as u64))90	}91	// Storage: Common CollectionById (r:1 w:1)92	fn change_collection_owner() -> Weight {93		Weight::from_ref_time(18_265_000)94			.saturating_add(T::DbWeight::get().reads(1 as u64))95			.saturating_add(T::DbWeight::get().writes(1 as u64))96	}97	// Storage: Common CollectionById (r:1 w:0)98	// Storage: Common IsAdmin (r:1 w:1)99	// Storage: Common AdminAmount (r:1 w:1)100	fn add_collection_admin() -> Weight {101		Weight::from_ref_time(23_558_000)102			.saturating_add(T::DbWeight::get().reads(3 as u64))103			.saturating_add(T::DbWeight::get().writes(2 as u64))104	}105	// Storage: Common CollectionById (r:1 w:0)106	// Storage: Common IsAdmin (r:1 w:1)107	// Storage: Common AdminAmount (r:1 w:1)108	fn remove_collection_admin() -> Weight {109		Weight::from_ref_time(25_285_000)110			.saturating_add(T::DbWeight::get().reads(3 as u64))111			.saturating_add(T::DbWeight::get().writes(2 as u64))112	}113	// Storage: Common CollectionById (r:1 w:1)114	fn set_collection_sponsor() -> Weight {115		Weight::from_ref_time(17_885_000)116			.saturating_add(T::DbWeight::get().reads(1 as u64))117			.saturating_add(T::DbWeight::get().writes(1 as u64))118	}119	// Storage: Common CollectionById (r:1 w:1)120	fn confirm_sponsorship() -> Weight {121		Weight::from_ref_time(17_897_000)122			.saturating_add(T::DbWeight::get().reads(1 as u64))123			.saturating_add(T::DbWeight::get().writes(1 as u64))124	}125	// Storage: Common CollectionById (r:1 w:1)126	fn remove_collection_sponsor() -> Weight {127		Weight::from_ref_time(17_836_000)128			.saturating_add(T::DbWeight::get().reads(1 as u64))129			.saturating_add(T::DbWeight::get().writes(1 as u64))130	}131	// Storage: Common CollectionById (r:1 w:1)132	fn set_transfers_enabled_flag() -> Weight {133		Weight::from_ref_time(9_714_000)134			.saturating_add(T::DbWeight::get().reads(1 as u64))135			.saturating_add(T::DbWeight::get().writes(1 as u64))136	}137	// Storage: Common CollectionById (r:1 w:1)138	fn set_collection_limits() -> Weight {139		Weight::from_ref_time(18_166_000)140			.saturating_add(T::DbWeight::get().reads(1 as u64))141			.saturating_add(T::DbWeight::get().writes(1 as u64))142	}143	// Storage: Common CollectionProperties (r:1 w:1)144	fn force_repair_collection() -> Weight {145		Weight::from_ref_time(5_701_000 as u64)146			.saturating_add(T::DbWeight::get().reads(1 as u64))147			.saturating_add(T::DbWeight::get().writes(1 as u64))148	}149}150151// For backwards compatibility and tests152impl WeightInfo for () {153	// Storage: Common CreatedCollectionCount (r:1 w:1)154	// Storage: Common DestroyedCollectionCount (r:1 w:0)155	// Storage: System Account (r:2 w:2)156	// Storage: Common CollectionPropertyPermissions (r:0 w:1)157	// Storage: Common CollectionProperties (r:0 w:1)158	// Storage: Common CollectionById (r:0 w:1)159	fn create_collection() -> Weight {160		Weight::from_ref_time(43_143_000)161			.saturating_add(RocksDbWeight::get().reads(4 as u64))162			.saturating_add(RocksDbWeight::get().writes(6 as u64))163	}164	// Storage: Common CollectionById (r:1 w:1)165	// Storage: Nonfungible TokenData (r:1 w:0)166	// Storage: Common DestroyedCollectionCount (r:1 w:1)167	// Storage: Nonfungible TokensMinted (r:0 w:1)168	// Storage: Nonfungible TokensBurnt (r:0 w:1)169	// Storage: Common AdminAmount (r:0 w:1)170	// Storage: Common CollectionProperties (r:0 w:1)171	fn destroy_collection() -> Weight {172		Weight::from_ref_time(50_188_000)173			.saturating_add(RocksDbWeight::get().reads(3 as u64))174			.saturating_add(RocksDbWeight::get().writes(6 as u64))175	}176	// Storage: Common CollectionById (r:1 w:0)177	// Storage: Common Allowlist (r:0 w:1)178	fn add_to_allow_list() -> Weight {179		Weight::from_ref_time(18_238_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:0)184	// Storage: Common Allowlist (r:0 w:1)185	fn remove_from_allow_list() -> Weight {186		Weight::from_ref_time(18_084_000)187			.saturating_add(RocksDbWeight::get().reads(1 as u64))188			.saturating_add(RocksDbWeight::get().writes(1 as u64))189	}190	// Storage: Common CollectionById (r:1 w:1)191	fn change_collection_owner() -> Weight {192		Weight::from_ref_time(18_265_000)193			.saturating_add(RocksDbWeight::get().reads(1 as u64))194			.saturating_add(RocksDbWeight::get().writes(1 as u64))195	}196	// Storage: Common CollectionById (r:1 w:0)197	// Storage: Common IsAdmin (r:1 w:1)198	// Storage: Common AdminAmount (r:1 w:1)199	fn add_collection_admin() -> Weight {200		Weight::from_ref_time(23_558_000)201			.saturating_add(RocksDbWeight::get().reads(3 as u64))202			.saturating_add(RocksDbWeight::get().writes(2 as u64))203	}204	// Storage: Common CollectionById (r:1 w:0)205	// Storage: Common IsAdmin (r:1 w:1)206	// Storage: Common AdminAmount (r:1 w:1)207	fn remove_collection_admin() -> Weight {208		Weight::from_ref_time(25_285_000)209			.saturating_add(RocksDbWeight::get().reads(3 as u64))210			.saturating_add(RocksDbWeight::get().writes(2 as u64))211	}212	// Storage: Common CollectionById (r:1 w:1)213	fn set_collection_sponsor() -> Weight {214		Weight::from_ref_time(17_885_000)215			.saturating_add(RocksDbWeight::get().reads(1 as u64))216			.saturating_add(RocksDbWeight::get().writes(1 as u64))217	}218	// Storage: Common CollectionById (r:1 w:1)219	fn confirm_sponsorship() -> Weight {220		Weight::from_ref_time(17_897_000)221			.saturating_add(RocksDbWeight::get().reads(1 as u64))222			.saturating_add(RocksDbWeight::get().writes(1 as u64))223	}224	// Storage: Common CollectionById (r:1 w:1)225	fn remove_collection_sponsor() -> Weight {226		Weight::from_ref_time(17_836_000)227			.saturating_add(RocksDbWeight::get().reads(1 as u64))228			.saturating_add(RocksDbWeight::get().writes(1 as u64))229	}230	// Storage: Common CollectionById (r:1 w:1)231	fn set_transfers_enabled_flag() -> Weight {232		Weight::from_ref_time(9_714_000)233			.saturating_add(RocksDbWeight::get().reads(1 as u64))234			.saturating_add(RocksDbWeight::get().writes(1 as u64))235	}236	// Storage: Common CollectionById (r:1 w:1)237	fn set_collection_limits() -> Weight {238		Weight::from_ref_time(18_166_000)239			.saturating_add(RocksDbWeight::get().reads(1 as u64))240			.saturating_add(RocksDbWeight::get().writes(1 as u64))241	}242	// Storage: Common CollectionProperties (r:1 w:1)243	fn force_repair_collection() -> Weight {244		Weight::from_ref_time(5_701_000 as u64)245			.saturating_add(RocksDbWeight::get().reads(1 as u64))246			.saturating_add(RocksDbWeight::get().writes(1 as u64))247	}248}