1
// Copyright (C) Moondance Labs Ltd.
2
// This file is part of Tanssi.
3

            
4
// Tanssi 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
// Tanssi 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 Tanssi.  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 49.1.0
21
//! DATE: 2025-11-03, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `benchmark-1`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
24
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
25

            
26
// Executed Command:
27
// target/release/container-chain-simple-node
28
// benchmark
29
// pallet
30
// --wasm-execution=compiled
31
// --pallet
32
// pallet_multiblock_migrations
33
// --extrinsic
34
// *
35
// --chain=dev
36
// --steps
37
// 50
38
// --repeat
39
// 20
40
// --template=benchmarking/frame-weight-runtime-template.hbs
41
// --json-file
42
// raw.json
43
// --output
44
// tmp/simple_template_weights/pallet_multiblock_migrations.rs
45

            
46
#![cfg_attr(rustfmt, rustfmt_skip)]
47
#![allow(unused_parens)]
48
#![allow(unused_imports)]
49

            
50
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
51
use core::marker::PhantomData;
52

            
53
/// Weights for pallet_multiblock_migrations using the Substrate node and recommended hardware.
54
pub struct SubstrateWeight<T>(PhantomData<T>);
55
impl<T: frame_system::Config> pallet_multiblock_migrations::WeightInfo for SubstrateWeight<T> {
56
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:1)
57
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
58
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
59
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
60
	fn onboard_new_mbms() -> Weight {
61
		// Proof Size summary in bytes:
62
		//  Measured:  `32`
63
		//  Estimated: `67035`
64
		// Minimum execution time: 11_019_000 picoseconds.
65
		Weight::from_parts(11_216_000, 67035)
66
			.saturating_add(T::DbWeight::get().reads(2_u64))
67
			.saturating_add(T::DbWeight::get().writes(1_u64))
68
	}
69
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
70
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
71
	fn progress_mbms_none() -> Weight {
72
		// Proof Size summary in bytes:
73
		//  Measured:  `3`
74
		//  Estimated: `67035`
75
		// Minimum execution time: 3_493_000 picoseconds.
76
		Weight::from_parts(3_677_000, 67035)
77
			.saturating_add(T::DbWeight::get().reads(1_u64))
78
	}
79
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
80
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
81
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
82
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
83
	fn exec_migration_completed() -> Weight {
84
		// Proof Size summary in bytes:
85
		//  Measured:  `29`
86
		//  Estimated: `3494`
87
		// Minimum execution time: 9_004_000 picoseconds.
88
		Weight::from_parts(9_234_000, 3494)
89
			.saturating_add(T::DbWeight::get().reads(1_u64))
90
			.saturating_add(T::DbWeight::get().writes(1_u64))
91
	}
92
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
93
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
94
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
95
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
96
	fn exec_migration_skipped_historic() -> Weight {
97
		// Proof Size summary in bytes:
98
		//  Measured:  `86`
99
		//  Estimated: `3731`
100
		// Minimum execution time: 14_982_000 picoseconds.
101
		Weight::from_parts(15_262_000, 3731)
102
			.saturating_add(T::DbWeight::get().reads(2_u64))
103
	}
104
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
105
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
106
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
107
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
108
	fn exec_migration_advance() -> Weight {
109
		// Proof Size summary in bytes:
110
		//  Measured:  `32`
111
		//  Estimated: `3731`
112
		// Minimum execution time: 14_893_000 picoseconds.
113
		Weight::from_parts(15_088_000, 3731)
114
			.saturating_add(T::DbWeight::get().reads(2_u64))
115
	}
116
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
117
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
118
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:1)
119
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
120
	fn exec_migration_complete() -> Weight {
121
		// Proof Size summary in bytes:
122
		//  Measured:  `32`
123
		//  Estimated: `3731`
124
		// Minimum execution time: 17_081_000 picoseconds.
125
		Weight::from_parts(17_361_000, 3731)
126
			.saturating_add(T::DbWeight::get().reads(2_u64))
127
			.saturating_add(T::DbWeight::get().writes(1_u64))
128
	}
129
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
130
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
131
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
132
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
133
	/// Storage: `XcmpQueue::QueueSuspended` (r:1 w:1)
134
	/// Proof: `XcmpQueue::QueueSuspended` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
135
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
136
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
137
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:0 w:1)
138
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
139
	fn exec_migration_fail() -> Weight {
140
		// Proof Size summary in bytes:
141
		//  Measured:  `141`
142
		//  Estimated: `3731`
143
		// Minimum execution time: 35_115_000 picoseconds.
144
		Weight::from_parts(35_931_000, 3731)
145
			.saturating_add(T::DbWeight::get().reads(3_u64))
146
			.saturating_add(T::DbWeight::get().writes(3_u64))
147
	}
148
	fn on_init_loop() -> Weight {
149
		// Proof Size summary in bytes:
150
		//  Measured:  `0`
151
		//  Estimated: `0`
152
		// Minimum execution time: 228_000 picoseconds.
153
		Weight::from_parts(250_000, 0)
154
	}
155
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
156
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
157
	fn force_set_cursor() -> Weight {
158
		// Proof Size summary in bytes:
159
		//  Measured:  `0`
160
		//  Estimated: `0`
161
		// Minimum execution time: 3_896_000 picoseconds.
162
		Weight::from_parts(4_062_000, 0)
163
			.saturating_add(T::DbWeight::get().writes(1_u64))
164
	}
165
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
166
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
167
	fn force_set_active_cursor() -> Weight {
168
		// Proof Size summary in bytes:
169
		//  Measured:  `0`
170
		//  Estimated: `0`
171
		// Minimum execution time: 4_566_000 picoseconds.
172
		Weight::from_parts(4_731_000, 0)
173
			.saturating_add(T::DbWeight::get().writes(1_u64))
174
	}
175
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
176
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
177
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
178
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
179
	fn force_onboard_mbms() -> Weight {
180
		// Proof Size summary in bytes:
181
		//  Measured:  `46`
182
		//  Estimated: `67035`
183
		// Minimum execution time: 8_746_000 picoseconds.
184
		Weight::from_parts(9_128_000, 67035)
185
			.saturating_add(T::DbWeight::get().reads(2_u64))
186
	}
187
	/// Storage: `MultiBlockMigrations::Historic` (r:256 w:256)
188
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
189
	/// The range of component `n` is `[0, 256]`.
190
	fn clear_historic(n: u32, ) -> Weight {
191
		// Proof Size summary in bytes:
192
		//  Measured:  `983 + n * (271 ±0)`
193
		//  Estimated: `3834 + n * (2740 ±0)`
194
		// Minimum execution time: 20_726_000 picoseconds.
195
		Weight::from_parts(19_998_196, 3834)
196
			// Standard Error: 2_714
197
			.saturating_add(Weight::from_parts(1_429_279, 0).saturating_mul(n.into()))
198
			.saturating_add(T::DbWeight::get().reads(1_u64))
199
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
200
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
201
			.saturating_add(Weight::from_parts(0, 2740).saturating_mul(n.into()))
202
	}
203
	/// Storage: `Skipped::Metadata` (r:0 w:0)
204
	/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
205
	/// The range of component `n` is `[0, 2048]`.
206
	fn reset_pallet_migration(n: u32, ) -> Weight {
207
		// Proof Size summary in bytes:
208
		//  Measured:  `1642 + n * (38 ±0)`
209
		//  Estimated: `720 + n * (39 ±0)`
210
		// Minimum execution time: 2_869_000 picoseconds.
211
		Weight::from_parts(18_057_209, 720)
212
			// Standard Error: 1_853
213
			.saturating_add(Weight::from_parts(844_524, 0).saturating_mul(n.into()))
214
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
215
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
216
			.saturating_add(Weight::from_parts(0, 39).saturating_mul(n.into()))
217
	}
218
}