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 42.0.0
20
//! DATE: 2024-10-10, 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: Some("moonbase-dev"), DB CACHE: 1024
24

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

            
39
#![cfg_attr(rustfmt, rustfmt_skip)]
40
#![allow(unused_parens)]
41
#![allow(unused_imports)]
42

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

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