referrerpolicy=no-referrer-when-downgrade

pallet_ah_ops/
weights.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Cumulus.
3// SPDX-License-Identifier: Apache-2.0
4
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// 	http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16
17//! Autogenerated weights for `pallet_ah_ops`
18//!
19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
20//! DATE: 2025-04-28, STEPS: `50`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
23//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
24
25// Executed Command:
26// frame-omni-bencher
27// v1
28// benchmark
29// pallet
30// --runtime=target/production/wbuild/asset-hub-polkadot-runtime/asset_hub_polkadot_runtime.wasm
31// --pallet
32// pallet-ah-ops
33// --extrinsic
34// *
35// --output=./pallets/ah-ops/src/weights_1.rs
36// --template=./../../paritytech/polkadot-sdk/substrate/.maintain/frame-weight-template.hbs
37// --no-median-slopes
38// --no-min-squares
39// --repeat=2
40// --steps=50
41
42#![cfg_attr(rustfmt, rustfmt_skip)]
43#![allow(unused_parens)]
44#![allow(unused_imports)]
45#![allow(missing_docs)]
46#![allow(dead_code)]
47
48use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
49use core::marker::PhantomData;
50
51/// Weight functions needed for `pallet_ah_ops`.
52pub trait WeightInfo {
53	fn unreserve_lease_deposit() -> Weight;
54	fn withdraw_crowdloan_contribution() -> Weight;
55	fn unreserve_crowdloan_reserve() -> Weight;
56}
57
58/// Weights for `pallet_ah_ops` using the Substrate node and recommended hardware.
59pub struct SubstrateWeight<T>(PhantomData<T>);
60impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
61	/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
62	/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
63	/// Storage: `ParachainSystem::LastRelayChainBlockNumber` (r:1 w:0)
64	/// Proof: `ParachainSystem::LastRelayChainBlockNumber` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
65	/// Storage: `AhOps::RcLeaseReserve` (r:1 w:1)
66	/// Proof: `AhOps::RcLeaseReserve` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
67	/// Storage: `System::Account` (r:1 w:1)
68	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
69	fn unreserve_lease_deposit() -> Weight {
70		// Proof Size summary in bytes:
71		//  Measured:  `365`
72		//  Estimated: `3593`
73		// Minimum execution time: 30_000_000 picoseconds.
74		Weight::from_parts(33_000_000, 3593)
75			.saturating_add(T::DbWeight::get().reads(4_u64))
76			.saturating_add(T::DbWeight::get().writes(2_u64))
77	}
78	/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
79	/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
80	/// Storage: `ParachainSystem::LastRelayChainBlockNumber` (r:1 w:0)
81	/// Proof: `ParachainSystem::LastRelayChainBlockNumber` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
82	/// Storage: `AhOps::RcCrowdloanContribution` (r:1 w:1)
83	/// Proof: `AhOps::RcCrowdloanContribution` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
84	/// Storage: `AhOps::RcLeaseReserve` (r:1 w:1)
85	/// Proof: `AhOps::RcLeaseReserve` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
86	/// Storage: `System::Account` (r:2 w:2)
87	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
88	fn withdraw_crowdloan_contribution() -> Weight {
89		// Proof Size summary in bytes:
90		//  Measured:  `538`
91		//  Estimated: `6196`
92		// Minimum execution time: 64_000_000 picoseconds.
93		Weight::from_parts(65_000_000, 6196)
94			.saturating_add(T::DbWeight::get().reads(6_u64))
95			.saturating_add(T::DbWeight::get().writes(4_u64))
96	}
97	/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
98	/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
99	/// Storage: `ParachainSystem::LastRelayChainBlockNumber` (r:1 w:0)
100	/// Proof: `ParachainSystem::LastRelayChainBlockNumber` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
101	/// Storage: `AhOps::RcCrowdloanContribution` (r:1 w:0)
102	/// Proof: `AhOps::RcCrowdloanContribution` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
103	/// Storage: `AhOps::RcCrowdloanReserve` (r:1 w:1)
104	/// Proof: `AhOps::RcCrowdloanReserve` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
105	/// Storage: `System::Account` (r:1 w:1)
106	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
107	fn unreserve_crowdloan_reserve() -> Weight {
108		// Proof Size summary in bytes:
109		//  Measured:  `365`
110		//  Estimated: `3593`
111		// Minimum execution time: 32_000_000 picoseconds.
112		Weight::from_parts(62_000_000, 3593)
113			.saturating_add(T::DbWeight::get().reads(5_u64))
114			.saturating_add(T::DbWeight::get().writes(2_u64))
115	}
116}
117
118// For backwards compatibility and tests.
119impl WeightInfo for () {
120	/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
121	/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
122	/// Storage: `ParachainSystem::LastRelayChainBlockNumber` (r:1 w:0)
123	/// Proof: `ParachainSystem::LastRelayChainBlockNumber` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
124	/// Storage: `AhOps::RcLeaseReserve` (r:1 w:1)
125	/// Proof: `AhOps::RcLeaseReserve` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
126	/// Storage: `System::Account` (r:1 w:1)
127	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
128	fn unreserve_lease_deposit() -> Weight {
129		// Proof Size summary in bytes:
130		//  Measured:  `365`
131		//  Estimated: `3593`
132		// Minimum execution time: 30_000_000 picoseconds.
133		Weight::from_parts(33_000_000, 3593)
134			.saturating_add(RocksDbWeight::get().reads(4_u64))
135			.saturating_add(RocksDbWeight::get().writes(2_u64))
136	}
137	/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
138	/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
139	/// Storage: `ParachainSystem::LastRelayChainBlockNumber` (r:1 w:0)
140	/// Proof: `ParachainSystem::LastRelayChainBlockNumber` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
141	/// Storage: `AhOps::RcCrowdloanContribution` (r:1 w:1)
142	/// Proof: `AhOps::RcCrowdloanContribution` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
143	/// Storage: `AhOps::RcLeaseReserve` (r:1 w:1)
144	/// Proof: `AhOps::RcLeaseReserve` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
145	/// Storage: `System::Account` (r:2 w:2)
146	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
147	fn withdraw_crowdloan_contribution() -> Weight {
148		// Proof Size summary in bytes:
149		//  Measured:  `538`
150		//  Estimated: `6196`
151		// Minimum execution time: 64_000_000 picoseconds.
152		Weight::from_parts(65_000_000, 6196)
153			.saturating_add(RocksDbWeight::get().reads(6_u64))
154			.saturating_add(RocksDbWeight::get().writes(4_u64))
155	}
156	/// Storage: `ParachainSystem::ValidationData` (r:1 w:0)
157	/// Proof: `ParachainSystem::ValidationData` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
158	/// Storage: `ParachainSystem::LastRelayChainBlockNumber` (r:1 w:0)
159	/// Proof: `ParachainSystem::LastRelayChainBlockNumber` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
160	/// Storage: `AhOps::RcCrowdloanContribution` (r:1 w:0)
161	/// Proof: `AhOps::RcCrowdloanContribution` (`max_values`: None, `max_size`: Some(112), added: 2587, mode: `MaxEncodedLen`)
162	/// Storage: `AhOps::RcCrowdloanReserve` (r:1 w:1)
163	/// Proof: `AhOps::RcCrowdloanReserve` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`)
164	/// Storage: `System::Account` (r:1 w:1)
165	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
166	fn unreserve_crowdloan_reserve() -> Weight {
167		// Proof Size summary in bytes:
168		//  Measured:  `365`
169		//  Estimated: `3593`
170		// Minimum execution time: 32_000_000 picoseconds.
171		Weight::from_parts(62_000_000, 3593)
172			.saturating_add(RocksDbWeight::get().reads(5_u64))
173			.saturating_add(RocksDbWeight::get().writes(2_u64))
174	}
175}