1
// Copyright 2024 Moonbeam foundation
2
// This file is part of Moonbeam.
3

            
4
// Moonbeam 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
// Moonbeam 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 Moonbeam.  If not, see <http://www.gnu.org/licenses/>.
16

            
17
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
18
//!
19
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
20
//! DATE: 2025-02-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
21
//! WORST CASE MAP SIZE: `1000000`
22
//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
23
//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
24

            
25
// Executed Command:
26
// ./target/production/moonbeam
27
// benchmark
28
// pallet
29
// --runtime=./target/production/wbuild/moonbeam-runtime/moonbeam_runtime.wasm
30
// --genesis-builder=runtime
31
// --genesis-builder-preset=development
32
// --steps=50
33
// --repeat=20
34
// --pallet=cumulus_pallet_xcmp_queue
35
// --extrinsic=*
36
// --wasm-execution=compiled
37
// --header=./file_header.txt
38
// --template=./benchmarking/frame-weight-template.hbs
39
// --output=./runtime/moonbeam/src/weights/
40

            
41
#![cfg_attr(rustfmt, rustfmt_skip)]
42
#![allow(unused_parens)]
43
#![allow(unused_imports)]
44

            
45
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
46
use sp_std::marker::PhantomData;
47

            
48
/// Weights for `cumulus_pallet_xcmp_queue`.
49
pub struct WeightInfo<T>(PhantomData<T>);
50
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
51
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:1)
52
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
53
	fn set_config_with_u32() -> Weight {
54
		// Proof Size summary in bytes:
55
		//  Measured:  `142`
56
		//  Estimated: `1497`
57
		// Minimum execution time: 5_088_000 picoseconds.
58
		Weight::from_parts(5_458_000, 1497)
59
			.saturating_add(T::DbWeight::get().reads(1_u64))
60
			.saturating_add(T::DbWeight::get().writes(1_u64))
61
	}
62
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
63
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
64
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
65
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
66
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
67
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
68
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
69
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
70
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
71
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
72
	fn enqueue_xcmp_message() -> Weight {
73
		// Proof Size summary in bytes:
74
		//  Measured:  `148`
75
		//  Estimated: `5487`
76
		// Minimum execution time: 12_877_000 picoseconds.
77
		Weight::from_parts(13_269_000, 5487)
78
			.saturating_add(T::DbWeight::get().reads(4_u64))
79
			.saturating_add(T::DbWeight::get().writes(3_u64))
80
	}
81
	/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
82
	/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
83
	fn suspend_channel() -> Weight {
84
		// Proof Size summary in bytes:
85
		//  Measured:  `142`
86
		//  Estimated: `2767`
87
		// Minimum execution time: 3_259_000 picoseconds.
88
		Weight::from_parts(3_493_000, 2767)
89
			.saturating_add(T::DbWeight::get().reads(1_u64))
90
			.saturating_add(T::DbWeight::get().writes(1_u64))
91
	}
92
	/// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1)
93
	/// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`)
94
	fn resume_channel() -> Weight {
95
		// Proof Size summary in bytes:
96
		//  Measured:  `177`
97
		//  Estimated: `2767`
98
		// Minimum execution time: 4_510_000 picoseconds.
99
		Weight::from_parts(4_890_000, 2767)
100
			.saturating_add(T::DbWeight::get().reads(1_u64))
101
			.saturating_add(T::DbWeight::get().writes(1_u64))
102
	}
103
	fn take_first_concatenated_xcm() -> Weight {
104
		// Proof Size summary in bytes:
105
		//  Measured:  `0`
106
		//  Estimated: `0`
107
		// Minimum execution time: 7_719_000 picoseconds.
108
		Weight::from_parts(7_963_000, 0)
109
	}
110
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
111
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
112
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
113
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
114
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
115
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
116
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
117
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
118
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
119
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
120
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
121
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
122
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
123
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
124
7
	fn on_idle_good_msg() -> Weight {
125
7
		// Proof Size summary in bytes:
126
7
		//  Measured:  `105713`
127
7
		//  Estimated: `109178`
128
7
		// Minimum execution time: 162_249_000 picoseconds.
129
7
		Weight::from_parts(164_548_000, 109178)
130
7
			.saturating_add(T::DbWeight::get().reads(6_u64))
131
7
			.saturating_add(T::DbWeight::get().writes(5_u64))
132
7
	}
133
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
134
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6b345d8e88afa015075c945637c07e8f20` (r:1 w:1)
135
	/// Storage: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
136
	/// Proof: UNKNOWN KEY `0x7b3237373ffdfeb1cab4222e3b520d6bedc49980ba3aa32b0a189290fd036649` (r:1 w:1)
137
	/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
138
	/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
139
	/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
140
	/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
141
	/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
142
	/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
143
	/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
144
	/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
145
	/// Storage: `MessageQueue::Pages` (r:0 w:1)
146
	/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
147
7
	fn on_idle_large_msg() -> Weight {
148
7
		// Proof Size summary in bytes:
149
7
		//  Measured:  `65782`
150
7
		//  Estimated: `69247`
151
7
		// Minimum execution time: 110_973_000 picoseconds.
152
7
		Weight::from_parts(112_212_000, 69247)
153
7
			.saturating_add(T::DbWeight::get().reads(6_u64))
154
7
			.saturating_add(T::DbWeight::get().writes(5_u64))
155
7
	}
156
}