pallet_registrar_para/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_registrar_para`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2026-08-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `unknown`, CPU: `<UNKNOWN>`
41//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
42
43// Executed Command:
44// ./target/release/frame-omni-bencher
45// v1
46// benchmark
47// pallet
48// --extrinsic=*
49// --runtime=target/release/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
50// --pallet=pallet_registrar_para
51// --header=substrate/HEADER-APACHE2
52// --output=substrate/frame/registrar/para/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// --genesis-builder-policy=none
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_registrar_para`.
73pub trait WeightInfo {
74 fn reserve() -> Weight;
75 fn register(h: u32, ) -> Weight;
76 fn cancel_registration() -> Weight;
77 fn receive() -> Weight;
78}
79
80/// Weights for `pallet_registrar_para` using the Substrate node and recommended hardware.
81pub struct SubstrateWeight<T>(PhantomData<T>);
82impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
83 /// Storage: `RegistrarPara::NextFreeParaId` (r:1 w:1)
84 /// Proof: `RegistrarPara::NextFreeParaId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
85 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
86 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
87 /// Storage: `System::Account` (r:1 w:1)
88 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
89 /// Storage: `Balances::Holds` (r:1 w:1)
90 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(607), added: 3082, mode: `MaxEncodedLen`)
91 fn reserve() -> Weight {
92 // Proof Size summary in bytes:
93 // Measured: `52`
94 // Estimated: `4072`
95 // Minimum execution time: 32_000_000 picoseconds.
96 Weight::from_parts(37_000_000, 4072)
97 .saturating_add(T::DbWeight::get().reads(4_u64))
98 .saturating_add(T::DbWeight::get().writes(4_u64))
99 }
100 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
101 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
102 /// Storage: `System::Account` (r:1 w:1)
103 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
104 /// Storage: `Balances::Holds` (r:1 w:1)
105 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(607), added: 3082, mode: `MaxEncodedLen`)
106 /// Storage: `RegistrarPara::NextMessageId` (r:1 w:1)
107 /// Proof: `RegistrarPara::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
108 /// The range of component `h` is `[0, 1048576]`.
109 fn register(h: u32, ) -> Weight {
110 // Proof Size summary in bytes:
111 // Measured: `211`
112 // Estimated: `4072`
113 // Minimum execution time: 36_000_000 picoseconds.
114 Weight::from_parts(45_949_151, 4072)
115 // Standard Error: 0
116 .saturating_add(Weight::from_parts(160, 0).saturating_mul(h.into()))
117 .saturating_add(T::DbWeight::get().reads(4_u64))
118 .saturating_add(T::DbWeight::get().writes(4_u64))
119 }
120 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
121 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
122 /// Storage: `RegistrarPara::NextMessageId` (r:1 w:1)
123 /// Proof: `RegistrarPara::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
124 fn cancel_registration() -> Weight {
125 // Proof Size summary in bytes:
126 // Measured: `152`
127 // Estimated: `3554`
128 // Minimum execution time: 8_000_000 picoseconds.
129 Weight::from_parts(9_000_000, 3554)
130 .saturating_add(T::DbWeight::get().reads(2_u64))
131 .saturating_add(T::DbWeight::get().writes(2_u64))
132 }
133 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
134 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
135 /// Storage: `System::Account` (r:1 w:1)
136 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
137 /// Storage: `Balances::Holds` (r:1 w:1)
138 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(607), added: 3082, mode: `MaxEncodedLen`)
139 fn receive() -> Weight {
140 // Proof Size summary in bytes:
141 // Measured: `280`
142 // Estimated: `4072`
143 // Minimum execution time: 30_000_000 picoseconds.
144 Weight::from_parts(31_000_000, 4072)
145 .saturating_add(T::DbWeight::get().reads(3_u64))
146 .saturating_add(T::DbWeight::get().writes(3_u64))
147 }
148}
149
150// For backwards compatibility and tests.
151impl WeightInfo for () {
152 /// Storage: `RegistrarPara::NextFreeParaId` (r:1 w:1)
153 /// Proof: `RegistrarPara::NextFreeParaId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
154 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
155 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
156 /// Storage: `System::Account` (r:1 w:1)
157 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
158 /// Storage: `Balances::Holds` (r:1 w:1)
159 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(607), added: 3082, mode: `MaxEncodedLen`)
160 fn reserve() -> Weight {
161 // Proof Size summary in bytes:
162 // Measured: `52`
163 // Estimated: `4072`
164 // Minimum execution time: 32_000_000 picoseconds.
165 Weight::from_parts(37_000_000, 4072)
166 .saturating_add(RocksDbWeight::get().reads(4_u64))
167 .saturating_add(RocksDbWeight::get().writes(4_u64))
168 }
169 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
170 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
171 /// Storage: `System::Account` (r:1 w:1)
172 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
173 /// Storage: `Balances::Holds` (r:1 w:1)
174 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(607), added: 3082, mode: `MaxEncodedLen`)
175 /// Storage: `RegistrarPara::NextMessageId` (r:1 w:1)
176 /// Proof: `RegistrarPara::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
177 /// The range of component `h` is `[0, 1048576]`.
178 fn register(h: u32, ) -> Weight {
179 // Proof Size summary in bytes:
180 // Measured: `211`
181 // Estimated: `4072`
182 // Minimum execution time: 36_000_000 picoseconds.
183 Weight::from_parts(45_949_151, 4072)
184 // Standard Error: 0
185 .saturating_add(Weight::from_parts(160, 0).saturating_mul(h.into()))
186 .saturating_add(RocksDbWeight::get().reads(4_u64))
187 .saturating_add(RocksDbWeight::get().writes(4_u64))
188 }
189 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
190 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
191 /// Storage: `RegistrarPara::NextMessageId` (r:1 w:1)
192 /// Proof: `RegistrarPara::NextMessageId` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`)
193 fn cancel_registration() -> Weight {
194 // Proof Size summary in bytes:
195 // Measured: `152`
196 // Estimated: `3554`
197 // Minimum execution time: 8_000_000 picoseconds.
198 Weight::from_parts(9_000_000, 3554)
199 .saturating_add(RocksDbWeight::get().reads(2_u64))
200 .saturating_add(RocksDbWeight::get().writes(2_u64))
201 }
202 /// Storage: `RegistrarPara::Paras` (r:1 w:1)
203 /// Proof: `RegistrarPara::Paras` (`max_values`: None, `max_size`: Some(89), added: 2564, mode: `MaxEncodedLen`)
204 /// Storage: `System::Account` (r:1 w:1)
205 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
206 /// Storage: `Balances::Holds` (r:1 w:1)
207 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(607), added: 3082, mode: `MaxEncodedLen`)
208 fn receive() -> Weight {
209 // Proof Size summary in bytes:
210 // Measured: `280`
211 // Estimated: `4072`
212 // Minimum execution time: 30_000_000 picoseconds.
213 Weight::from_parts(31_000_000, 4072)
214 .saturating_add(RocksDbWeight::get().reads(3_u64))
215 .saturating_add(RocksDbWeight::get().writes(3_u64))
216 }
217}