pallet_xcm_bridge_hub_router/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_xcm_bridge_hub_router
18//!
19//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
20//! DATE: 2023-08-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21//! WORST CASE MAP SIZE: `1000000`
22//! HOSTNAME: `covid`, CPU: `11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz`
23//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
24
25// Executed Command:
26// target/release/rip-bridge-node
27// benchmark
28// pallet
29// --chain=dev
30// --steps=50
31// --repeat=20
32// --pallet=pallet_xcm_bridge_hub_router
33// --extrinsic=*
34// --execution=wasm
35// --wasm-execution=Compiled
36// --heap-pages=4096
37// --output=./modules/xcm-bridge-hub-router/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_xcm_bridge_hub_router.
52pub trait WeightInfo {
53 fn on_initialize_when_non_congested() -> Weight;
54 fn on_initialize_when_congested() -> Weight;
55 fn report_bridge_status() -> Weight;
56}
57
58/// Weights for `pallet_xcm_bridge_hub_router` 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: `XcmBridgeHubRouter::DeliveryFeeFactor` (r:1 w:1)
64 ///
65 /// Proof: `XcmBridgeHubRouter::DeliveryFeeFactor` (`max_values`: Some(1), `max_size`: Some(16),
66 /// added: 511, mode: `MaxEncodedLen`)
67 fn on_initialize_when_non_congested() -> Weight {
68 // Proof Size summary in bytes:
69 // Measured: `52`
70 // Estimated: `3517`
71 // Minimum execution time: 11_141 nanoseconds.
72 Weight::from_parts(11_339_000, 3517)
73 .saturating_add(T::DbWeight::get().reads(2_u64))
74 .saturating_add(T::DbWeight::get().writes(1_u64))
75 }
76 /// Storage: UNKNOWN KEY `0x456d756c617465645369626c696e6758636d704368616e6e656c2e436f6e6765`
77 /// (r:1 w:0)
78 ///
79 /// Proof: UNKNOWN KEY `0x456d756c617465645369626c696e6758636d704368616e6e656c2e436f6e6765` (r:1
80 /// w:0)
81 fn on_initialize_when_congested() -> Weight {
82 // Proof Size summary in bytes:
83 // Measured: `82`
84 // Estimated: `3547`
85 // Minimum execution time: 4_239 nanoseconds.
86 Weight::from_parts(4_383_000, 3547).saturating_add(T::DbWeight::get().reads(1_u64))
87 }
88 /// Storage: `XcmBridgeHubRouter::Bridge` (r:1 w:1)
89 ///
90 /// Proof: `XcmBridgeHubRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added:
91 /// 512, mode: `MaxEncodedLen`)
92 fn report_bridge_status() -> Weight {
93 // Proof Size summary in bytes:
94 // Measured: `53`
95 // Estimated: `1502`
96 // Minimum execution time: 10_427 nanoseconds.
97 Weight::from_parts(10_682_000, 1502)
98 .saturating_add(T::DbWeight::get().reads(1_u64))
99 .saturating_add(T::DbWeight::get().writes(1_u64))
100 }
101}
102
103// For backwards compatibility and tests
104impl WeightInfo for () {
105 /// Storage: UNKNOWN KEY `0x456d756c617465645369626c696e6758636d704368616e6e656c2e436f6e6765`
106 /// (r:1 w:0)
107 ///
108 /// Proof: UNKNOWN KEY `0x456d756c617465645369626c696e6758636d704368616e6e656c2e436f6e6765` (r:1
109 /// w:0)
110 ///
111 /// Storage: `XcmBridgeHubRouter::DeliveryFeeFactor` (r:1 w:1)
112 ///
113 /// Proof: `XcmBridgeHubRouter::DeliveryFeeFactor` (`max_values`: Some(1), `max_size`: Some(16),
114 /// added: 511, mode: `MaxEncodedLen`)
115 fn on_initialize_when_non_congested() -> Weight {
116 // Proof Size summary in bytes:
117 // Measured: `52`
118 // Estimated: `3517`
119 // Minimum execution time: 11_141 nanoseconds.
120 Weight::from_parts(11_339_000, 3517)
121 .saturating_add(RocksDbWeight::get().reads(2_u64))
122 .saturating_add(RocksDbWeight::get().writes(1_u64))
123 }
124 /// Storage: UNKNOWN KEY `0x456d756c617465645369626c696e6758636d704368616e6e656c2e436f6e6765`
125 /// (r:1 w:0)
126 ///
127 /// Proof: UNKNOWN KEY `0x456d756c617465645369626c696e6758636d704368616e6e656c2e436f6e6765` (r:1
128 /// w:0)
129 fn on_initialize_when_congested() -> Weight {
130 // Proof Size summary in bytes:
131 // Measured: `82`
132 // Estimated: `3547`
133 // Minimum execution time: 4_239 nanoseconds.
134 Weight::from_parts(4_383_000, 3547).saturating_add(RocksDbWeight::get().reads(1_u64))
135 }
136 /// Storage: `XcmBridgeHubRouter::Bridge` (r:1 w:1)
137 ///
138 /// Proof: `XcmBridgeHubRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added:
139 /// 512, mode: `MaxEncodedLen`)
140 fn report_bridge_status() -> Weight {
141 // Proof Size summary in bytes:
142 // Measured: `53`
143 // Estimated: `1502`
144 // Minimum execution time: 10_427 nanoseconds.
145 Weight::from_parts(10_682_000, 1502)
146 .saturating_add(RocksDbWeight::get().reads(1_u64))
147 .saturating_add(RocksDbWeight::get().writes(1_u64))
148 }
149}