1
// Copyright 2025 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

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

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

            
43
#![cfg_attr(rustfmt, rustfmt_skip)]
44
#![allow(unused_parens)]
45
#![allow(unused_imports)]
46

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

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