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 43.0.0
21
//! DATE: 2025-02-07, 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-simple-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/simple_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:  `32`
64
		//  Estimated: `67035`
65
		// Minimum execution time: 40_951_000 picoseconds.
66
		Weight::from_parts(40_951_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:  `3`
75
		//  Estimated: `67035`
76
		// Minimum execution time: 7_421_000 picoseconds.
77
		Weight::from_parts(7_421_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: 32_187_000 picoseconds.
89
		Weight::from_parts(32_187_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:  `86`
100
		//  Estimated: `3731`
101
		// Minimum execution time: 48_579_000 picoseconds.
102
		Weight::from_parts(48_579_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:  `32`
112
		//  Estimated: `3731`
113
		// Minimum execution time: 56_104_000 picoseconds.
114
		Weight::from_parts(56_104_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:  `32`
124
		//  Estimated: `3731`
125
		// Minimum execution time: 74_200_000 picoseconds.
126
		Weight::from_parts(74_200_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: `MultiBlockMigrations::Cursor` (r:0 w:1)
135
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
136
	fn exec_migration_fail() -> Weight {
137
		// Proof Size summary in bytes:
138
		//  Measured:  `32`
139
		//  Estimated: `3731`
140
		// Minimum execution time: 61_350_000 picoseconds.
141
		Weight::from_parts(61_350_000, 3731)
142
			.saturating_add(T::DbWeight::get().reads(2_u64))
143
			.saturating_add(T::DbWeight::get().writes(1_u64))
144
	}
145
	fn on_init_loop() -> Weight {
146
		// Proof Size summary in bytes:
147
		//  Measured:  `0`
148
		//  Estimated: `0`
149
		// Minimum execution time: 643_000 picoseconds.
150
		Weight::from_parts(643_000, 0)
151
	}
152
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
153
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
154
	fn force_set_cursor() -> Weight {
155
		// Proof Size summary in bytes:
156
		//  Measured:  `0`
157
		//  Estimated: `0`
158
		// Minimum execution time: 20_759_000 picoseconds.
159
		Weight::from_parts(20_759_000, 0)
160
			.saturating_add(T::DbWeight::get().writes(1_u64))
161
	}
162
	/// Storage: `MultiBlockMigrations::Cursor` (r:0 w:1)
163
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
164
	fn force_set_active_cursor() -> Weight {
165
		// Proof Size summary in bytes:
166
		//  Measured:  `0`
167
		//  Estimated: `0`
168
		// Minimum execution time: 22_296_000 picoseconds.
169
		Weight::from_parts(22_296_000, 0)
170
			.saturating_add(T::DbWeight::get().writes(1_u64))
171
	}
172
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
173
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
174
	/// Storage: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
175
	/// Proof: UNKNOWN KEY `0x583359fe0e84d953a9dd84e8addb08a5` (r:1 w:0)
176
	fn force_onboard_mbms() -> Weight {
177
		// Proof Size summary in bytes:
178
		//  Measured:  `46`
179
		//  Estimated: `67035`
180
		// Minimum execution time: 33_737_000 picoseconds.
181
		Weight::from_parts(33_737_000, 67035)
182
			.saturating_add(T::DbWeight::get().reads(2_u64))
183
	}
184
	/// Storage: `MultiBlockMigrations::Historic` (r:256 w:256)
185
	/// Proof: `MultiBlockMigrations::Historic` (`max_values`: None, `max_size`: Some(266), added: 2741, mode: `MaxEncodedLen`)
186
	/// The range of component `n` is `[0, 256]`.
187
	fn clear_historic(n: u32, ) -> Weight {
188
		// Proof Size summary in bytes:
189
		//  Measured:  `1069 + n * (270 ±0)`
190
		//  Estimated: `4016 + n * (2737 ±2)`
191
		// Minimum execution time: 86_874_000 picoseconds.
192
		Weight::from_parts(114_205_775, 4016)
193
			// Standard Error: 220_418
194
			.saturating_add(Weight::from_parts(1_883_840, 0).saturating_mul(n.into()))
195
			.saturating_add(T::DbWeight::get().reads(1_u64))
196
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
197
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into())))
198
			.saturating_add(Weight::from_parts(0, 2737).saturating_mul(n.into()))
199
	}
200
}