pallet_bridge_parachains/weights.rs
1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Parity Bridges Common.
3
4// Parity Bridges Common is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Parity Bridges Common is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
16
17//! Autogenerated weights for pallet_bridge_parachains
18//!
19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
20//! DATE: 2023-06-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `serban-ROG-Zephyrus`, CPU: `12th Gen Intel(R) Core(TM) i7-12700H`
23//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
24
25// Executed Command:
26// target/release/unknown-bridge-node
27// benchmark
28// pallet
29// --chain=dev
30// --steps=50
31// --repeat=20
32// --pallet=pallet_bridge_parachains
33// --extrinsic=*
34// --execution=wasm
35// --wasm-execution=Compiled
36// --heap-pages=4096
37// --output=./modules/parachains/src/weights.rs
38// --template=./.maintain/bridge-weight-template.hbs
39
40#![allow(clippy::all)]
41#![allow(unused_parens)]
42#![allow(unused_imports)]
43#![allow(missing_docs)]
44
45use frame_support::{
46 traits::Get,
47 weights::{constants::RocksDbWeight, Weight},
48};
49use sp_std::marker::PhantomData;
50
51/// Weight functions needed for pallet_bridge_parachains.
52pub trait WeightInfo {
53 fn submit_parachain_heads_with_n_parachains(p: u32) -> Weight;
54 fn submit_parachain_heads_with_1kb_proof() -> Weight;
55 fn submit_parachain_heads_with_16kb_proof() -> Weight;
56}
57
58/// Weights for `pallet_bridge_parachains` that are generated using one of the Bridge testnets.
59///
60/// Those weights are test only and must never be used in production.
61pub struct BridgeWeight<T>(PhantomData<T>);
62impl<T: frame_system::Config> WeightInfo for BridgeWeight<T> {
63 /// Storage: BridgeUnknownParachains PalletOperatingMode (r:1 w:0)
64 ///
65 /// Proof: BridgeUnknownParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1),
66 /// added: 496, mode: MaxEncodedLen)
67 ///
68 /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0)
69 ///
70 /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68),
71 /// added: 2048, mode: MaxEncodedLen)
72 ///
73 /// Storage: BridgeUnknownParachains ParasInfo (r:1 w:1)
74 ///
75 /// Proof: BridgeUnknownParachains ParasInfo (max_values: Some(1), max_size: Some(60), added:
76 /// 555, mode: MaxEncodedLen)
77 ///
78 /// Storage: BridgeUnknownParachains ImportedParaHashes (r:1 w:1)
79 ///
80 /// Proof: BridgeUnknownParachains ImportedParaHashes (max_values: Some(1024), max_size:
81 /// Some(64), added: 1549, mode: MaxEncodedLen)
82 ///
83 /// Storage: BridgeUnknownParachains ImportedParaHeads (r:0 w:1)
84 ///
85 /// Proof: BridgeUnknownParachains ImportedParaHeads (max_values: Some(1024), max_size:
86 /// Some(196), added: 1681, mode: MaxEncodedLen)
87 ///
88 /// The range of component `p` is `[1, 2]`.
89 fn submit_parachain_heads_with_n_parachains(_p: u32) -> Weight {
90 // Proof Size summary in bytes:
91 // Measured: `302`
92 // Estimated: `3038`
93 // Minimum execution time: 30_211 nanoseconds.
94 Weight::from_parts(32_633_893, 3038)
95 .saturating_add(T::DbWeight::get().reads(4_u64))
96 .saturating_add(T::DbWeight::get().writes(3_u64))
97 }
98 /// Storage: BridgeUnknownParachains PalletOperatingMode (r:1 w:0)
99 ///
100 /// Proof: BridgeUnknownParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1),
101 /// added: 496, mode: MaxEncodedLen)
102 ///
103 /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0)
104 ///
105 /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68),
106 /// added: 2048, mode: MaxEncodedLen)
107 ///
108 /// Storage: BridgeUnknownParachains ParasInfo (r:1 w:1)
109 ///
110 /// Proof: BridgeUnknownParachains ParasInfo (max_values: Some(1), max_size: Some(60), added:
111 /// 555, mode: MaxEncodedLen)
112 ///
113 /// Storage: BridgeUnknownParachains ImportedParaHashes (r:1 w:1)
114 ///
115 /// Proof: BridgeUnknownParachains ImportedParaHashes (max_values: Some(1024), max_size:
116 /// Some(64), added: 1549, mode: MaxEncodedLen)
117 ///
118 /// Storage: BridgeUnknownParachains ImportedParaHeads (r:0 w:1)
119 ///
120 /// Proof: BridgeUnknownParachains ImportedParaHeads (max_values: Some(1024), max_size:
121 /// Some(196), added: 1681, mode: MaxEncodedLen)
122 fn submit_parachain_heads_with_1kb_proof() -> Weight {
123 // Proof Size summary in bytes:
124 // Measured: `302`
125 // Estimated: `3038`
126 // Minimum execution time: 30_830 nanoseconds.
127 Weight::from_parts(31_801_000, 3038)
128 .saturating_add(T::DbWeight::get().reads(4_u64))
129 .saturating_add(T::DbWeight::get().writes(3_u64))
130 }
131 /// Storage: BridgeUnknownParachains PalletOperatingMode (r:1 w:0)
132 ///
133 /// Proof: BridgeUnknownParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1),
134 /// added: 496, mode: MaxEncodedLen)
135 ///
136 /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0)
137 ///
138 /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68),
139 /// added: 2048, mode: MaxEncodedLen)
140 ///
141 /// Storage: BridgeUnknownParachains ParasInfo (r:1 w:1)
142 ///
143 /// Proof: BridgeUnknownParachains ParasInfo (max_values: Some(1), max_size: Some(60), added:
144 /// 555, mode: MaxEncodedLen)
145 ///
146 /// Storage: BridgeUnknownParachains ImportedParaHashes (r:1 w:1)
147 ///
148 /// Proof: BridgeUnknownParachains ImportedParaHashes (max_values: Some(1024), max_size:
149 /// Some(64), added: 1549, mode: MaxEncodedLen)
150 ///
151 /// Storage: BridgeUnknownParachains ImportedParaHeads (r:0 w:1)
152 ///
153 /// Proof: BridgeUnknownParachains ImportedParaHeads (max_values: Some(1024), max_size:
154 /// Some(196), added: 1681, mode: MaxEncodedLen)
155 fn submit_parachain_heads_with_16kb_proof() -> Weight {
156 // Proof Size summary in bytes:
157 // Measured: `302`
158 // Estimated: `3038`
159 // Minimum execution time: 44_736 nanoseconds.
160 Weight::from_parts(45_296_000, 3038)
161 .saturating_add(T::DbWeight::get().reads(4_u64))
162 .saturating_add(T::DbWeight::get().writes(3_u64))
163 }
164}
165
166// For backwards compatibility and tests
167impl WeightInfo for () {
168 /// Storage: BridgeUnknownParachains PalletOperatingMode (r:1 w:0)
169 ///
170 /// Proof: BridgeUnknownParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1),
171 /// added: 496, mode: MaxEncodedLen)
172 ///
173 /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0)
174 ///
175 /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68),
176 /// added: 2048, mode: MaxEncodedLen)
177 ///
178 /// Storage: BridgeUnknownParachains ParasInfo (r:1 w:1)
179 ///
180 /// Proof: BridgeUnknownParachains ParasInfo (max_values: Some(1), max_size: Some(60), added:
181 /// 555, mode: MaxEncodedLen)
182 ///
183 /// Storage: BridgeUnknownParachains ImportedParaHashes (r:1 w:1)
184 ///
185 /// Proof: BridgeUnknownParachains ImportedParaHashes (max_values: Some(1024), max_size:
186 /// Some(64), added: 1549, mode: MaxEncodedLen)
187 ///
188 /// Storage: BridgeUnknownParachains ImportedParaHeads (r:0 w:1)
189 ///
190 /// Proof: BridgeUnknownParachains ImportedParaHeads (max_values: Some(1024), max_size:
191 /// Some(196), added: 1681, mode: MaxEncodedLen)
192 ///
193 /// The range of component `p` is `[1, 2]`.
194 fn submit_parachain_heads_with_n_parachains(_p: u32) -> Weight {
195 // Proof Size summary in bytes:
196 // Measured: `302`
197 // Estimated: `3038`
198 // Minimum execution time: 30_211 nanoseconds.
199 Weight::from_parts(32_633_893, 3038)
200 .saturating_add(RocksDbWeight::get().reads(4_u64))
201 .saturating_add(RocksDbWeight::get().writes(3_u64))
202 }
203 /// Storage: BridgeUnknownParachains PalletOperatingMode (r:1 w:0)
204 ///
205 /// Proof: BridgeUnknownParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1),
206 /// added: 496, mode: MaxEncodedLen)
207 ///
208 /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0)
209 ///
210 /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68),
211 /// added: 2048, mode: MaxEncodedLen)
212 ///
213 /// Storage: BridgeUnknownParachains ParasInfo (r:1 w:1)
214 ///
215 /// Proof: BridgeUnknownParachains ParasInfo (max_values: Some(1), max_size: Some(60), added:
216 /// 555, mode: MaxEncodedLen)
217 ///
218 /// Storage: BridgeUnknownParachains ImportedParaHashes (r:1 w:1)
219 ///
220 /// Proof: BridgeUnknownParachains ImportedParaHashes (max_values: Some(1024), max_size:
221 /// Some(64), added: 1549, mode: MaxEncodedLen)
222 ///
223 /// Storage: BridgeUnknownParachains ImportedParaHeads (r:0 w:1)
224 ///
225 /// Proof: BridgeUnknownParachains ImportedParaHeads (max_values: Some(1024), max_size:
226 /// Some(196), added: 1681, mode: MaxEncodedLen)
227 fn submit_parachain_heads_with_1kb_proof() -> Weight {
228 // Proof Size summary in bytes:
229 // Measured: `302`
230 // Estimated: `3038`
231 // Minimum execution time: 30_830 nanoseconds.
232 Weight::from_parts(31_801_000, 3038)
233 .saturating_add(RocksDbWeight::get().reads(4_u64))
234 .saturating_add(RocksDbWeight::get().writes(3_u64))
235 }
236 /// Storage: BridgeUnknownParachains PalletOperatingMode (r:1 w:0)
237 ///
238 /// Proof: BridgeUnknownParachains PalletOperatingMode (max_values: Some(1), max_size: Some(1),
239 /// added: 496, mode: MaxEncodedLen)
240 ///
241 /// Storage: BridgeUnknownGrandpa ImportedHeaders (r:1 w:0)
242 ///
243 /// Proof: BridgeUnknownGrandpa ImportedHeaders (max_values: Some(14400), max_size: Some(68),
244 /// added: 2048, mode: MaxEncodedLen)
245 ///
246 /// Storage: BridgeUnknownParachains ParasInfo (r:1 w:1)
247 ///
248 /// Proof: BridgeUnknownParachains ParasInfo (max_values: Some(1), max_size: Some(60), added:
249 /// 555, mode: MaxEncodedLen)
250 ///
251 /// Storage: BridgeUnknownParachains ImportedParaHashes (r:1 w:1)
252 ///
253 /// Proof: BridgeUnknownParachains ImportedParaHashes (max_values: Some(1024), max_size:
254 /// Some(64), added: 1549, mode: MaxEncodedLen)
255 ///
256 /// Storage: BridgeUnknownParachains ImportedParaHeads (r:0 w:1)
257 ///
258 /// Proof: BridgeUnknownParachains ImportedParaHeads (max_values: Some(1024), max_size:
259 /// Some(196), added: 1681, mode: MaxEncodedLen)
260 fn submit_parachain_heads_with_16kb_proof() -> Weight {
261 // Proof Size summary in bytes:
262 // Measured: `302`
263 // Estimated: `3038`
264 // Minimum execution time: 44_736 nanoseconds.
265 Weight::from_parts(45_296_000, 3038)
266 .saturating_add(RocksDbWeight::get().reads(4_u64))
267 .saturating_add(RocksDbWeight::get().writes(3_u64))
268 }
269}