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_migrations`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 51.0.0
21
//! DATE: 2026-02-09, 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/moonriver-runtime/moonriver_runtime.wasm
32
// --genesis-builder=runtime
33
// --genesis-builder-preset=development
34
// --steps=50
35
// --repeat=20
36
// --pallet=pallet_migrations
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --header=./file_header.txt
40
// --template=./benchmarking/frame-weight-template.hbs
41
// --disable-log-color
42
// --output=./runtime/moonriver/src/weights
43

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

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

            
51
/// Weights for `pallet_migrations`.
52
pub struct WeightInfo<T>(PhantomData<T>);
53
impl<T: frame_system::Config> pallet_migrations::WeightInfo for WeightInfo<T> {
54
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:1)
55
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
56
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
57
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
58
	fn onboard_new_mbms() -> Weight {
59
		// Proof Size summary in bytes:
60
		//  Measured:  `100`
61
		//  Estimated: `67035`
62
		// Minimum execution time: 7_895_000 picoseconds.
63
		Weight::from_parts(8_250_000, 67035)
64
			.saturating_add(T::DbWeight::get().reads(2_u64))
65
			.saturating_add(T::DbWeight::get().writes(1_u64))
66
	}
67
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
68
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
69
	fn progress_mbms_none() -> Weight {
70
		// Proof Size summary in bytes:
71
		//  Measured:  `4`
72
		//  Estimated: `67035`
73
		// Minimum execution time: 1_858_000 picoseconds.
74
		Weight::from_parts(2_010_000, 67035)
75
			.saturating_add(T::DbWeight::get().reads(1_u64))
76
	}
77
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
78
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
79
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
80
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
81
	fn exec_migration_completed() -> Weight {
82
		// Proof Size summary in bytes:
83
		//  Measured:  `96`
84
		//  Estimated: `3561`
85
		// Minimum execution time: 6_242_000 picoseconds.
86
		Weight::from_parts(6_561_000, 3561)
87
			.saturating_add(T::DbWeight::get().reads(1_u64))
88
			.saturating_add(T::DbWeight::get().writes(1_u64))
89
	}
90
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
91
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
92
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
93
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
94
	fn exec_migration_skipped_historic() -> Weight {
95
		// Proof Size summary in bytes:
96
		//  Measured:  `154`
97
		//  Estimated: `3731`
98
		// Minimum execution time: 11_125_000 picoseconds.
99
		Weight::from_parts(11_411_000, 3731)
100
			.saturating_add(T::DbWeight::get().reads(2_u64))
101
	}
102
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
103
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
104
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
105
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
106
	fn exec_migration_advance() -> Weight {
107
		// Proof Size summary in bytes:
108
		//  Measured:  `100`
109
		//  Estimated: `3731`
110
		// Minimum execution time: 10_629_000 picoseconds.
111
		Weight::from_parts(11_175_000, 3731)
112
			.saturating_add(T::DbWeight::get().reads(2_u64))
113
	}
114
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
115
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
116
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:1)
117
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
118
	fn exec_migration_complete() -> Weight {
119
		// Proof Size summary in bytes:
120
		//  Measured:  `100`
121
		//  Estimated: `3731`
122
		// Minimum execution time: 12_597_000 picoseconds.
123
		Weight::from_parts(12_890_000, 3731)
124
			.saturating_add(T::DbWeight::get().reads(2_u64))
125
			.saturating_add(T::DbWeight::get().writes(1_u64))
126
	}
127
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
128
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
129
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
130
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
131
	/// Storage: `XcmpQueue::QueueSuspended` (r:1 w:1)
132
	/// Proof: `XcmpQueue::QueueSuspended` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
133
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
134
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
135
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:0 w:1)
136
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
137
	fn exec_migration_fail() -> Weight {
138
		// Proof Size summary in bytes:
139
		//  Measured:  `242`
140
		//  Estimated: `3731`
141
		// Minimum execution time: 27_359_000 picoseconds.
142
		Weight::from_parts(29_068_000, 3731)
143
			.saturating_add(T::DbWeight::get().reads(3_u64))
144
			.saturating_add(T::DbWeight::get().writes(3_u64))
145
	}
146
	fn on_init_loop() -> Weight {
147
		// Proof Size summary in bytes:
148
		//  Measured:  `0`
149
		//  Estimated: `0`
150
		// Minimum execution time: 180_000 picoseconds.
151
		Weight::from_parts(200_000, 0)
152
	}
153
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
154
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
155
	fn force_set_cursor() -> Weight {
156
		// Proof Size summary in bytes:
157
		//  Measured:  `0`
158
		//  Estimated: `0`
159
		// Minimum execution time: 2_807_000 picoseconds.
160
		Weight::from_parts(3_053_000, 0)
161
			.saturating_add(T::DbWeight::get().writes(1_u64))
162
	}
163
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
164
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
165
	fn force_set_active_cursor() -> Weight {
166
		// Proof Size summary in bytes:
167
		//  Measured:  `0`
168
		//  Estimated: `0`
169
		// Minimum execution time: 3_352_000 picoseconds.
170
		Weight::from_parts(3_515_000, 0)
171
			.saturating_add(T::DbWeight::get().writes(1_u64))
172
	}
173
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
174
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
175
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
176
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
177
	fn force_onboard_mbms() -> Weight {
178
		// Proof Size summary in bytes:
179
		//  Measured:  `76`
180
		//  Estimated: `67035`
181
		// Minimum execution time: 5_581_000 picoseconds.
182
		Weight::from_parts(5_949_000, 67035)
183
			.saturating_add(T::DbWeight::get().reads(2_u64))
184
	}
185
	/// Storage: `MultiBlockMigrations::Historic` (r:256 w:256)
186
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
187
	/// The range of component `n` is `[0, 256]`.
188
	fn clear_historic(n: u32, ) -> Weight {
189
		// Proof Size summary in bytes:
190
		//  Measured:  `984 + n * (271 ±0)`
191
		//  Estimated: `3834 + n * (2740 ±0)`
192
		// Minimum execution time: 16_058_000 picoseconds.
193
		Weight::from_parts(15_791_251, 3834)
194
			// Standard Error: 3_625
195
			.saturating_add(Weight::from_parts(1_336_278, 0).saturating_mul(n.into()))
196
			.saturating_add(T::DbWeight::get().reads(1_u64))
197
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
198
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
199
			.saturating_add(Weight::from_parts(0, 2740).saturating_mul(n.into()))
200
	}
201
	/// Storage: `Skipped::Metadata` (r:0 w:0)
202
	/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
203
	/// The range of component `n` is `[0, 2048]`.
204
	fn reset_pallet_migration(n: u32, ) -> Weight {
205
		// Proof Size summary in bytes:
206
		//  Measured:  `1642 + n * (38 ±0)`
207
		//  Estimated: `720 + n * (39 ±0)`
208
		// Minimum execution time: 2_040_000 picoseconds.
209
		Weight::from_parts(14_867_861, 720)
210
			// Standard Error: 1_620
211
			.saturating_add(Weight::from_parts(780_142, 0).saturating_mul(n.into()))
212
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
213
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
214
			.saturating_add(Weight::from_parts(0, 39).saturating_mul(n.into()))
215
	}
216
}