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