referrerpolicy=no-referrer-when-downgrade

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	///
64	/// Storage: `XcmBridgeHubRouter::DeliveryFeeFactor` (r:1 w:1)
65	///
66	/// Proof: `XcmBridgeHubRouter::DeliveryFeeFactor` (`max_values`: Some(1), `max_size`: Some(16),
67	/// added: 511, mode: `MaxEncodedLen`)
68	fn on_initialize_when_non_congested() -> Weight {
69		// Proof Size summary in bytes:
70		//  Measured:  `52`
71		//  Estimated: `3517`
72		// Minimum execution time: 11_141 nanoseconds.
73		Weight::from_parts(11_339_000, 3517)
74			.saturating_add(T::DbWeight::get().reads(2_u64))
75			.saturating_add(T::DbWeight::get().writes(1_u64))
76	}
77	/// Storage: UNKNOWN KEY `0x456d756c617465645369626c696e6758636d704368616e6e656c2e436f6e6765`
78	/// (r:1 w:0)
79	///
80	/// Proof: UNKNOWN KEY `0x456d756c617465645369626c696e6758636d704368616e6e656c2e436f6e6765` (r:1
81	/// w:0)
82	fn on_initialize_when_congested() -> Weight {
83		// Proof Size summary in bytes:
84		//  Measured:  `82`
85		//  Estimated: `3547`
86		// Minimum execution time: 4_239 nanoseconds.
87		Weight::from_parts(4_383_000, 3547).saturating_add(T::DbWeight::get().reads(1_u64))
88	}
89	/// Storage: `XcmBridgeHubRouter::Bridge` (r:1 w:1)
90	///
91	/// Proof: `XcmBridgeHubRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added:
92	/// 512, mode: `MaxEncodedLen`)
93	fn report_bridge_status() -> Weight {
94		// Proof Size summary in bytes:
95		//  Measured:  `53`
96		//  Estimated: `1502`
97		// Minimum execution time: 10_427 nanoseconds.
98		Weight::from_parts(10_682_000, 1502)
99			.saturating_add(T::DbWeight::get().reads(1_u64))
100			.saturating_add(T::DbWeight::get().writes(1_u64))
101	}
102}
103
104// For backwards compatibility and tests
105impl WeightInfo for () {
106	/// Storage: UNKNOWN KEY `0x456d756c617465645369626c696e6758636d704368616e6e656c2e436f6e6765`
107	/// (r:1 w:0)
108	///
109	/// Proof: UNKNOWN KEY `0x456d756c617465645369626c696e6758636d704368616e6e656c2e436f6e6765` (r:1
110	/// w:0)
111	///
112	/// Storage: `XcmBridgeHubRouter::DeliveryFeeFactor` (r:1 w:1)
113	///
114	/// Proof: `XcmBridgeHubRouter::DeliveryFeeFactor` (`max_values`: Some(1), `max_size`: Some(16),
115	/// added: 511, mode: `MaxEncodedLen`)
116	fn on_initialize_when_non_congested() -> Weight {
117		// Proof Size summary in bytes:
118		//  Measured:  `52`
119		//  Estimated: `3517`
120		// Minimum execution time: 11_141 nanoseconds.
121		Weight::from_parts(11_339_000, 3517)
122			.saturating_add(RocksDbWeight::get().reads(2_u64))
123			.saturating_add(RocksDbWeight::get().writes(1_u64))
124	}
125	/// Storage: UNKNOWN KEY `0x456d756c617465645369626c696e6758636d704368616e6e656c2e436f6e6765`
126	/// (r:1 w:0)
127	///
128	/// Proof: UNKNOWN KEY `0x456d756c617465645369626c696e6758636d704368616e6e656c2e436f6e6765` (r:1
129	/// w:0)
130	fn on_initialize_when_congested() -> Weight {
131		// Proof Size summary in bytes:
132		//  Measured:  `82`
133		//  Estimated: `3547`
134		// Minimum execution time: 4_239 nanoseconds.
135		Weight::from_parts(4_383_000, 3547).saturating_add(RocksDbWeight::get().reads(1_u64))
136	}
137	/// Storage: `XcmBridgeHubRouter::Bridge` (r:1 w:1)
138	///
139	/// Proof: `XcmBridgeHubRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added:
140	/// 512, mode: `MaxEncodedLen`)
141	fn report_bridge_status() -> Weight {
142		// Proof Size summary in bytes:
143		//  Measured:  `53`
144		//  Estimated: `1502`
145		// Minimum execution time: 10_427 nanoseconds.
146		Weight::from_parts(10_682_000, 1502)
147			.saturating_add(RocksDbWeight::get().reads(1_u64))
148			.saturating_add(RocksDbWeight::get().writes(1_u64))
149	}
150}