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 32.0.0
21
//! DATE: 2025-05-28, STEPS: `16`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `tomasz-XPS-15-9520`, CPU: `12th Gen Intel(R) Core(TM) i7-12700H`
24
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
25

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

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

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

            
54
/// Weights for pallet_multiblock_migrations using the Substrate node and recommended hardware.
55
pub struct SubstrateWeight<T>(PhantomData<T>);
56
impl<T: frame_system::Config> pallet_multiblock_migrations::WeightInfo for SubstrateWeight<T> {
57
	fn reset_pallet_migration(_: u32) -> cumulus_primitives_core::Weight {
58
		Default::default()
59
	}
60
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:1)
61
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
62
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
63
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
64
	fn onboard_new_mbms() -> Weight {
65
		// Proof Size summary in bytes:
66
		//  Measured:  `33`
67
		//  Estimated: `67035`
68
		// Minimum execution time: 21_232_000 picoseconds.
69
		Weight::from_parts(21_232_000, 67035)
70
			.saturating_add(T::DbWeight::get().reads(2_u64))
71
			.saturating_add(T::DbWeight::get().writes(1_u64))
72
	}
73
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
74
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
75
	fn progress_mbms_none() -> Weight {
76
		// Proof Size summary in bytes:
77
		//  Measured:  `4`
78
		//  Estimated: `67035`
79
		// Minimum execution time: 3_939_000 picoseconds.
80
		Weight::from_parts(3_939_000, 67035)
81
			.saturating_add(T::DbWeight::get().reads(1_u64))
82
	}
83
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
84
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
85
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
86
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
87
	fn exec_migration_completed() -> Weight {
88
		// Proof Size summary in bytes:
89
		//  Measured:  `29`
90
		//  Estimated: `3494`
91
		// Minimum execution time: 17_123_000 picoseconds.
92
		Weight::from_parts(17_123_000, 3494)
93
			.saturating_add(T::DbWeight::get().reads(1_u64))
94
			.saturating_add(T::DbWeight::get().writes(1_u64))
95
	}
96
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
97
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
98
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
99
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
100
	fn exec_migration_skipped_historic() -> Weight {
101
		// Proof Size summary in bytes:
102
		//  Measured:  `87`
103
		//  Estimated: `3731`
104
		// Minimum execution time: 25_944_000 picoseconds.
105
		Weight::from_parts(25_944_000, 3731)
106
			.saturating_add(T::DbWeight::get().reads(2_u64))
107
	}
108
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
109
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
110
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
111
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
112
	fn exec_migration_advance() -> Weight {
113
		// Proof Size summary in bytes:
114
		//  Measured:  `33`
115
		//  Estimated: `3731`
116
		// Minimum execution time: 26_964_000 picoseconds.
117
		Weight::from_parts(26_964_000, 3731)
118
			.saturating_add(T::DbWeight::get().reads(2_u64))
119
	}
120
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
121
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
122
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:1)
123
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
124
	fn exec_migration_complete() -> Weight {
125
		// Proof Size summary in bytes:
126
		//  Measured:  `33`
127
		//  Estimated: `3731`
128
		// Minimum execution time: 30_046_000 picoseconds.
129
		Weight::from_parts(30_046_000, 3731)
130
			.saturating_add(T::DbWeight::get().reads(2_u64))
131
			.saturating_add(T::DbWeight::get().writes(1_u64))
132
	}
133
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
134
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
135
	/// Storage: `MultiBlockMigrations::Historic` (r:1 w:0)
136
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
137
	/// Storage: `XcmpQueue::QueueSuspended` (r:1 w:1)
138
	/// Proof: `XcmpQueue::QueueSuspended` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
139
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
140
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
141
	/// Storage: `MaintenanceMode::MaintenanceMode` (r:0 w:1)
142
	/// Proof: `MaintenanceMode::MaintenanceMode` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
143
	fn exec_migration_fail() -> Weight {
144
		// Proof Size summary in bytes:
145
		//  Measured:  `142`
146
		//  Estimated: `3731`
147
		// Minimum execution time: 57_606_000 picoseconds.
148
		Weight::from_parts(57_606_000, 3731)
149
			.saturating_add(T::DbWeight::get().reads(3_u64))
150
			.saturating_add(T::DbWeight::get().writes(3_u64))
151
	}
152
	fn on_init_loop() -> Weight {
153
		// Proof Size summary in bytes:
154
		//  Measured:  `0`
155
		//  Estimated: `0`
156
		// Minimum execution time: 345_000 picoseconds.
157
		Weight::from_parts(345_000, 0)
158
	}
159
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
160
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
161
	fn force_set_cursor() -> Weight {
162
		// Proof Size summary in bytes:
163
		//  Measured:  `0`
164
		//  Estimated: `0`
165
		// Minimum execution time: 10_005_000 picoseconds.
166
		Weight::from_parts(10_005_000, 0)
167
			.saturating_add(T::DbWeight::get().writes(1_u64))
168
	}
169
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
170
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
171
	fn force_set_active_cursor() -> Weight {
172
		// Proof Size summary in bytes:
173
		//  Measured:  `0`
174
		//  Estimated: `0`
175
		// Minimum execution time: 10_599_000 picoseconds.
176
		Weight::from_parts(10_599_000, 0)
177
			.saturating_add(T::DbWeight::get().writes(1_u64))
178
	}
179
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
180
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
181
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
182
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
183
	fn force_onboard_mbms() -> Weight {
184
		// Proof Size summary in bytes:
185
		//  Measured:  `47`
186
		//  Estimated: `67035`
187
		// Minimum execution time: 16_033_000 picoseconds.
188
		Weight::from_parts(16_033_000, 67035)
189
			.saturating_add(T::DbWeight::get().reads(2_u64))
190
	}
191
	/// Storage: `MultiBlockMigrations::Historic` (r:256 w:256)
192
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
193
	/// The range of component `n` is `[0, 256]`.
194
	fn clear_historic(n: u32, ) -> Weight {
195
		// Proof Size summary in bytes:
196
		//  Measured:  `1070 + n * (270 ±0)`
197
		//  Estimated: `4016 + n * (2737 ±2)`
198
		// Minimum execution time: 44_696_000 picoseconds.
199
		Weight::from_parts(45_745_727, 4016)
200
			// Standard Error: 38_707
201
			.saturating_add(Weight::from_parts(1_951_646, 0).saturating_mul(n.into()))
202
			.saturating_add(T::DbWeight::get().reads(1_u64))
203
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
204
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
205
			.saturating_add(Weight::from_parts(0, 2737).saturating_mul(n.into()))
206
	}
207
}