pallet_hrmp_relay/weights.rs
1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18// This file is part of Substrate.
19
20// Copyright (C) Parity Technologies (UK) Ltd.
21// SPDX-License-Identifier: Apache-2.0
22
23// Licensed under the Apache License, Version 2.0 (the "License");
24// you may not use this file except in compliance with the License.
25// You may obtain a copy of the License at
26//
27// http://www.apache.org/licenses/LICENSE-2.0
28//
29// Unless required by applicable law or agreed to in writing, software
30// distributed under the License is distributed on an "AS IS" BASIS,
31// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32// See the License for the specific language governing permissions and
33// limitations under the License.
34
35//! Autogenerated weights for `pallet_hrmp_relay`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2026-11-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `68142ecb015e`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
41//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
42
43// Executed Command:
44// frame-omni-bencher
45// v1
46// benchmark
47// pallet
48// --extrinsic=*
49// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
50// --pallet=pallet_hrmp_relay
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/hrmp/relay/src/weights.rs
53// --wasm-execution=compiled
54// --steps=50
55// --repeat=20
56// --heap-pages=4096
57// --template=substrate/.maintain/frame-weight-template.hbs
58// --no-storage-info
59// --no-min-squares
60// --no-median-slopes
61// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic,pallet_nomination_pools,pallet_remark,pallet_transaction_storage
62
63#![cfg_attr(rustfmt, rustfmt_skip)]
64#![allow(unused_parens)]
65#![allow(unused_imports)]
66#![allow(missing_docs)]
67#![allow(dead_code)]
68
69use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
70use core::marker::PhantomData;
71
72/// Weight functions needed for `pallet_hrmp_relay`.
73pub trait WeightInfo {
74 fn receive() -> Weight;
75 fn try_set_deposit_both_sides() -> Weight;
76 fn try_set_deposit_release() -> Weight;
77 fn retry_failed_releases(n: u32, ) -> Weight;
78}
79
80/// Weights for `pallet_hrmp_relay` using the Substrate node and recommended hardware.
81pub struct SubstrateWeight<T>(PhantomData<T>);
82impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
83 /// Storage: `HrmpRelay::PendingRequests` (r:1 w:1)
84 /// Proof: `HrmpRelay::PendingRequests` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
85 /// Storage: `HrmpRelay::PendingSides` (r:0 w:2)
86 /// Proof: `HrmpRelay::PendingSides` (`max_values`: None, `max_size`: Some(25), added: 2500, mode: `MaxEncodedLen`)
87 fn receive() -> Weight {
88 // Proof Size summary in bytes:
89 // Measured: `445`
90 // Estimated: `3568`
91 // Minimum execution time: 16_823_000 picoseconds.
92 Weight::from_parts(18_224_000, 3568)
93 .saturating_add(T::DbWeight::get().reads(1_u64))
94 .saturating_add(T::DbWeight::get().writes(3_u64))
95 }
96 /// Storage: `HrmpRelay::PendingSides` (r:2 w:2)
97 /// Proof: `HrmpRelay::PendingSides` (`max_values`: None, `max_size`: Some(25), added: 2500, mode: `MaxEncodedLen`)
98 /// Storage: `HrmpRelay::FailedReleases` (r:1 w:0)
99 /// Proof: `HrmpRelay::FailedReleases` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`)
100 /// Storage: `HrmpRelay::NextRequestId` (r:1 w:1)
101 /// Proof: `HrmpRelay::NextRequestId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
102 /// Storage: `HrmpRelay::PendingRequests` (r:0 w:1)
103 /// Proof: `HrmpRelay::PendingRequests` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
104 fn try_set_deposit_both_sides() -> Weight {
105 // Proof Size summary in bytes:
106 // Measured: `280`
107 // Estimated: `5990`
108 // Minimum execution time: 14_119_000 picoseconds.
109 Weight::from_parts(15_333_000, 5990)
110 .saturating_add(T::DbWeight::get().reads(4_u64))
111 .saturating_add(T::DbWeight::get().writes(4_u64))
112 }
113 /// Storage: `HrmpRelay::FailedReleases` (r:1 w:1)
114 /// Proof: `HrmpRelay::FailedReleases` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`)
115 fn try_set_deposit_release() -> Weight {
116 // Proof Size summary in bytes:
117 // Measured: `457`
118 // Estimated: `1646`
119 // Minimum execution time: 8_271_000 picoseconds.
120 Weight::from_parts(9_096_000, 1646)
121 .saturating_add(T::DbWeight::get().reads(1_u64))
122 .saturating_add(T::DbWeight::get().writes(1_u64))
123 }
124 /// Storage: `HrmpRelay::FailedReleases` (r:1 w:1)
125 /// Proof: `HrmpRelay::FailedReleases` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`)
126 /// The range of component `n` is `[0, 16]`.
127 fn retry_failed_releases(n: u32, ) -> Weight {
128 // Proof Size summary in bytes:
129 // Measured: `304 + n * (10 ±0)`
130 // Estimated: `1646`
131 // Minimum execution time: 4_520_000 picoseconds.
132 Weight::from_parts(7_906_619, 1646)
133 // Standard Error: 1_818
134 .saturating_add(Weight::from_parts(1_821_931, 0).saturating_mul(n.into()))
135 .saturating_add(T::DbWeight::get().reads(1_u64))
136 .saturating_add(T::DbWeight::get().writes(1_u64))
137 }
138}
139
140// For backwards compatibility and tests.
141impl WeightInfo for () {
142 /// Storage: `HrmpRelay::PendingRequests` (r:1 w:1)
143 /// Proof: `HrmpRelay::PendingRequests` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
144 /// Storage: `HrmpRelay::PendingSides` (r:0 w:2)
145 /// Proof: `HrmpRelay::PendingSides` (`max_values`: None, `max_size`: Some(25), added: 2500, mode: `MaxEncodedLen`)
146 fn receive() -> Weight {
147 // Proof Size summary in bytes:
148 // Measured: `445`
149 // Estimated: `3568`
150 // Minimum execution time: 16_823_000 picoseconds.
151 Weight::from_parts(18_224_000, 3568)
152 .saturating_add(RocksDbWeight::get().reads(1_u64))
153 .saturating_add(RocksDbWeight::get().writes(3_u64))
154 }
155 /// Storage: `HrmpRelay::PendingSides` (r:2 w:2)
156 /// Proof: `HrmpRelay::PendingSides` (`max_values`: None, `max_size`: Some(25), added: 2500, mode: `MaxEncodedLen`)
157 /// Storage: `HrmpRelay::FailedReleases` (r:1 w:0)
158 /// Proof: `HrmpRelay::FailedReleases` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`)
159 /// Storage: `HrmpRelay::NextRequestId` (r:1 w:1)
160 /// Proof: `HrmpRelay::NextRequestId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
161 /// Storage: `HrmpRelay::PendingRequests` (r:0 w:1)
162 /// Proof: `HrmpRelay::PendingRequests` (`max_values`: None, `max_size`: Some(103), added: 2578, mode: `MaxEncodedLen`)
163 fn try_set_deposit_both_sides() -> Weight {
164 // Proof Size summary in bytes:
165 // Measured: `280`
166 // Estimated: `5990`
167 // Minimum execution time: 14_119_000 picoseconds.
168 Weight::from_parts(15_333_000, 5990)
169 .saturating_add(RocksDbWeight::get().reads(4_u64))
170 .saturating_add(RocksDbWeight::get().writes(4_u64))
171 }
172 /// Storage: `HrmpRelay::FailedReleases` (r:1 w:1)
173 /// Proof: `HrmpRelay::FailedReleases` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`)
174 fn try_set_deposit_release() -> Weight {
175 // Proof Size summary in bytes:
176 // Measured: `457`
177 // Estimated: `1646`
178 // Minimum execution time: 8_271_000 picoseconds.
179 Weight::from_parts(9_096_000, 1646)
180 .saturating_add(RocksDbWeight::get().reads(1_u64))
181 .saturating_add(RocksDbWeight::get().writes(1_u64))
182 }
183 /// Storage: `HrmpRelay::FailedReleases` (r:1 w:1)
184 /// Proof: `HrmpRelay::FailedReleases` (`max_values`: Some(1), `max_size`: Some(161), added: 656, mode: `MaxEncodedLen`)
185 /// The range of component `n` is `[0, 16]`.
186 fn retry_failed_releases(n: u32, ) -> Weight {
187 // Proof Size summary in bytes:
188 // Measured: `304 + n * (10 ±0)`
189 // Estimated: `1646`
190 // Minimum execution time: 4_520_000 picoseconds.
191 Weight::from_parts(7_906_619, 1646)
192 // Standard Error: 1_818
193 .saturating_add(Weight::from_parts(1_821_931, 0).saturating_mul(n.into()))
194 .saturating_add(RocksDbWeight::get().reads(1_u64))
195 .saturating_add(RocksDbWeight::get().writes(1_u64))
196 }
197}