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 `pallet_multiblock_migrations`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21
//! DATE: 2025-05-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `ip-10-0-0-198`, 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/moonbase-runtime/moonbase_runtime.wasm
32
// --genesis-builder=runtime
33
// --genesis-builder-preset=development
34
// --steps=50
35
// --repeat=20
36
// --pallet=pallet_multiblock_migrations
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --header=./file_header.txt
40
// --template=./benchmarking/frame-weight-template.hbs
41
// --output=./runtime/moonbase/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 `pallet_multiblock_migrations`.
51
pub struct WeightInfo<T>(PhantomData<T>);
52
impl<T: frame_system::Config> pallet_multiblock_migrations::WeightInfo for WeightInfo<T> {
53
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:1)
54
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
55
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
56
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
57
	fn onboard_new_mbms() -> Weight {
58
		// Proof Size summary in bytes:
59
		//  Measured:  `133`
60
		//  Estimated: `67035`
61
		// Minimum execution time: 7_591_000 picoseconds.
62
		Weight::from_parts(7_920_000, 67035)
63
			.saturating_add(T::DbWeight::get().reads(2_u64))
64
			.saturating_add(T::DbWeight::get().writes(1_u64))
65
	}
66
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
67
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
68
	fn progress_mbms_none() -> Weight {
69
		// Proof Size summary in bytes:
70
		//  Measured:  `4`
71
		//  Estimated: `67035`
72
		// Minimum execution time: 1_987_000 picoseconds.
73
		Weight::from_parts(2_135_000, 67035)
74
			.saturating_add(T::DbWeight::get().reads(1_u64))
75
	}
76
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
77
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
78
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
79
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
80
	fn exec_migration_completed() -> Weight {
81
		// Proof Size summary in bytes:
82
		//  Measured:  `129`
83
		//  Estimated: `3594`
84
		// Minimum execution time: 6_006_000 picoseconds.
85
		Weight::from_parts(6_244_000, 3594)
86
			.saturating_add(T::DbWeight::get().reads(1_u64))
87
			.saturating_add(T::DbWeight::get().writes(1_u64))
88
	}
89
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
90
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
91
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
92
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
93
	fn exec_migration_skipped_historic() -> Weight {
94
		// Proof Size summary in bytes:
95
		//  Measured:  `187`
96
		//  Estimated: `3731`
97
		// Minimum execution time: 10_985_000 picoseconds.
98
		Weight::from_parts(11_403_000, 3731)
99
			.saturating_add(T::DbWeight::get().reads(2_u64))
100
	}
101
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
102
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
103
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
104
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
105
	fn exec_migration_advance() -> Weight {
106
		// Proof Size summary in bytes:
107
		//  Measured:  `133`
108
		//  Estimated: `3731`
109
		// Minimum execution time: 10_379_000 picoseconds.
110
		Weight::from_parts(10_633_000, 3731)
111
			.saturating_add(T::DbWeight::get().reads(2_u64))
112
	}
113
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
114
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
115
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:1)
116
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
117
	fn exec_migration_complete() -> Weight {
118
		// Proof Size summary in bytes:
119
		//  Measured:  `133`
120
		//  Estimated: `3731`
121
		// Minimum execution time: 11_989_000 picoseconds.
122
		Weight::from_parts(12_414_000, 3731)
123
			.saturating_add(T::DbWeight::get().reads(2_u64))
124
			.saturating_add(T::DbWeight::get().writes(1_u64))
125
	}
126
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
127
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
128
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
129
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
130
	/// Storage: `XcmpQueue::QueueSuspended` (r:1 w:1)
131
	/// Proof: `XcmpQueue::QueueSuspended` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
132
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:0 w:1)
133
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
134
	fn exec_migration_fail() -> Weight {
135
		// Proof Size summary in bytes:
136
		//  Measured:  `275`
137
		//  Estimated: `3740`
138
		// Minimum execution time: 27_346_000 picoseconds.
139
		Weight::from_parts(28_803_000, 3740)
140
			.saturating_add(T::DbWeight::get().reads(3_u64))
141
			.saturating_add(T::DbWeight::get().writes(2_u64))
142
	}
143
	fn on_init_loop() -> Weight {
144
		// Proof Size summary in bytes:
145
		//  Measured:  `0`
146
		//  Estimated: `0`
147
		// Minimum execution time: 191_000 picoseconds.
148
		Weight::from_parts(231_000, 0)
149
	}
150
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
151
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
152
	fn force_set_cursor() -> Weight {
153
		// Proof Size summary in bytes:
154
		//  Measured:  `0`
155
		//  Estimated: `0`
156
		// Minimum execution time: 2_326_000 picoseconds.
157
		Weight::from_parts(2_577_000, 0)
158
			.saturating_add(T::DbWeight::get().writes(1_u64))
159
	}
160
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
161
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
162
	fn force_set_active_cursor() -> Weight {
163
		// Proof Size summary in bytes:
164
		//  Measured:  `0`
165
		//  Estimated: `0`
166
		// Minimum execution time: 2_922_000 picoseconds.
167
		Weight::from_parts(3_113_000, 0)
168
			.saturating_add(T::DbWeight::get().writes(1_u64))
169
	}
170
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
171
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
172
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
173
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
174
	fn force_onboard_mbms() -> Weight {
175
		// Proof Size summary in bytes:
176
		//  Measured:  `109`
177
		//  Estimated: `67035`
178
		// Minimum execution time: 5_613_000 picoseconds.
179
		Weight::from_parts(5_900_000, 67035)
180
			.saturating_add(T::DbWeight::get().reads(2_u64))
181
	}
182
	/// Storage: `MultiBlockMigrations::Historic` (r:256 w:256)
183
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
184
	/// The range of component `n` is `[0, 256]`.
185
	fn clear_historic(n: u32, ) -> Weight {
186
		// Proof Size summary in bytes:
187
		//  Measured:  `984 + n * (271 ±0)`
188
		//  Estimated: `3834 + n * (2740 ±0)`
189
		// Minimum execution time: 18_901_000 picoseconds.
190
		Weight::from_parts(24_483_649, 3834)
191
			// Standard Error: 3_542
192
			.saturating_add(Weight::from_parts(1_370_757, 0).saturating_mul(n.into()))
193
			.saturating_add(T::DbWeight::get().reads(1_u64))
194
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
195
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
196
			.saturating_add(Weight::from_parts(0, 2740).saturating_mul(n.into()))
197
	}
198
}