1
// This file is part of Substrate.
2

            
3
// Copyright (C) Parity Technologies (UK) Ltd.
4
// SPDX-License-Identifier: Apache-2.0
5

            
6
// Licensed under the Apache License, Version 2.0 (the "License");
7
// you may not use this file except in compliance with the License.
8
// You may obtain a copy of the License at
9
//
10
// 	http://www.apache.org/licenses/LICENSE-2.0
11
//
12
// Unless required by applicable law or agreed to in writing, software
13
// distributed under the License is distributed on an "AS IS" BASIS,
14
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
// See the License for the specific language governing permissions and
16
// limitations under the License.
17

            
18
//! Autogenerated weights for `frame_system`
19
//!
20
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21
//! DATE: 2024-04-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22
//! WORST CASE MAP SIZE: `1000000`
23
//! HOSTNAME: `runner-anb7yjbi-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
24
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
25

            
26
// Executed Command:
27
// ./target/production/substrate-node
28
// benchmark
29
// pallet
30
// --chain=dev
31
// --steps=50
32
// --repeat=20
33
// --pallet=frame_system
34
// --no-storage-info
35
// --no-median-slopes
36
// --no-min-squares
37
// --extrinsic=*
38
// --wasm-execution=compiled
39
// --heap-pages=4096
40
// --output=./substrate/frame/system/src/weights.rs
41
// --header=./substrate/HEADER-APACHE2
42
// --template=./substrate/.maintain/frame-weight-template.hbs
43

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

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

            
52
/// Weight functions needed for `frame_system`.
53
pub trait WeightInfo {
54
	fn remark(b: u32, ) -> Weight;
55
	fn remark_with_event(b: u32, ) -> Weight;
56
	fn set_heap_pages() -> Weight;
57
	fn set_code() -> Weight;
58
	fn set_storage(i: u32, ) -> Weight;
59
	fn kill_storage(i: u32, ) -> Weight;
60
	fn kill_prefix(p: u32, ) -> Weight;
61
	fn authorize_upgrade() -> Weight;
62
	fn apply_authorized_upgrade() -> Weight;
63
}
64

            
65
/// Weights for `frame_system` using the Substrate node and recommended hardware.
66
pub struct SubstrateWeight<T>(PhantomData<T>);
67
impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
68
	/// The range of component `b` is `[0, 3932160]`.
69
	fn remark(b: u32, ) -> Weight {
70
		// Proof Size summary in bytes:
71
		//  Measured:  `0`
72
		//  Estimated: `0`
73
		// Minimum execution time: 2_078_000 picoseconds.
74
		Weight::from_parts(1_137_744, 0)
75
			// Standard Error: 0
76
			.saturating_add(Weight::from_parts(387, 0).saturating_mul(b.into()))
77
	}
78
	/// The range of component `b` is `[0, 3932160]`.
79
	fn remark_with_event(b: u32, ) -> Weight {
80
		// Proof Size summary in bytes:
81
		//  Measured:  `0`
82
		//  Estimated: `0`
83
		// Minimum execution time: 5_980_000 picoseconds.
84
		Weight::from_parts(2_562_415, 0)
85
			// Standard Error: 1
86
			.saturating_add(Weight::from_parts(1_391, 0).saturating_mul(b.into()))
87
	}
88
	/// Storage: `System::Digest` (r:1 w:1)
89
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
90
	/// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
91
	/// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
92
	fn set_heap_pages() -> Weight {
93
		// Proof Size summary in bytes:
94
		//  Measured:  `0`
95
		//  Estimated: `1485`
96
		// Minimum execution time: 3_834_000 picoseconds.
97
		Weight::from_parts(4_109_000, 1485)
98
			.saturating_add(T::DbWeight::get().reads(1_u64))
99
			.saturating_add(T::DbWeight::get().writes(2_u64))
100
	}
101
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
102
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
103
	/// Storage: `System::Digest` (r:1 w:1)
104
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
105
	/// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
106
	/// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
107
	fn set_code() -> Weight {
108
		// Proof Size summary in bytes:
109
		//  Measured:  `142`
110
		//  Estimated: `67035`
111
		// Minimum execution time: 81_326_496_000 picoseconds.
112
		Weight::from_parts(81_880_651_000, 67035)
113
			.saturating_add(T::DbWeight::get().reads(2_u64))
114
			.saturating_add(T::DbWeight::get().writes(2_u64))
115
	}
116
	/// Storage: `Skipped::Metadata` (r:0 w:0)
117
	/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
118
	/// The range of component `i` is `[0, 1000]`.
119
	fn set_storage(i: u32, ) -> Weight {
120
		// Proof Size summary in bytes:
121
		//  Measured:  `0`
122
		//  Estimated: `0`
123
		// Minimum execution time: 2_059_000 picoseconds.
124
		Weight::from_parts(2_192_000, 0)
125
			// Standard Error: 720
126
			.saturating_add(Weight::from_parts(742_610, 0).saturating_mul(i.into()))
127
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
128
	}
129
	/// Storage: `Skipped::Metadata` (r:0 w:0)
130
	/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
131
	/// The range of component `i` is `[0, 1000]`.
132
	fn kill_storage(i: u32, ) -> Weight {
133
		// Proof Size summary in bytes:
134
		//  Measured:  `0`
135
		//  Estimated: `0`
136
		// Minimum execution time: 2_038_000 picoseconds.
137
		Weight::from_parts(2_159_000, 0)
138
			// Standard Error: 774
139
			.saturating_add(Weight::from_parts(569_424, 0).saturating_mul(i.into()))
140
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
141
	}
142
	/// Storage: `Skipped::Metadata` (r:0 w:0)
143
	/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
144
	/// The range of component `p` is `[0, 1000]`.
145
	fn kill_prefix(p: u32, ) -> Weight {
146
		// Proof Size summary in bytes:
147
		//  Measured:  `127 + p * (69 ±0)`
148
		//  Estimated: `134 + p * (70 ±0)`
149
		// Minimum execution time: 3_990_000 picoseconds.
150
		Weight::from_parts(4_172_000, 134)
151
			// Standard Error: 1_485
152
			.saturating_add(Weight::from_parts(1_227_281, 0).saturating_mul(p.into()))
153
			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
154
			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
155
			.saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
156
	}
157
	/// Storage: `System::AuthorizedUpgrade` (r:0 w:1)
158
	/// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
159
	fn authorize_upgrade() -> Weight {
160
		// Proof Size summary in bytes:
161
		//  Measured:  `0`
162
		//  Estimated: `0`
163
		// Minimum execution time: 8_851_000 picoseconds.
164
		Weight::from_parts(9_643_000, 0)
165
			.saturating_add(T::DbWeight::get().writes(1_u64))
166
	}
167
	/// Storage: `System::AuthorizedUpgrade` (r:1 w:1)
168
	/// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
169
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
170
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
171
	/// Storage: `System::Digest` (r:1 w:1)
172
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
173
	/// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
174
	/// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
175
	fn apply_authorized_upgrade() -> Weight {
176
		// Proof Size summary in bytes:
177
		//  Measured:  `164`
178
		//  Estimated: `67035`
179
		// Minimum execution time: 86_295_879_000 picoseconds.
180
		Weight::from_parts(87_636_595_000, 67035)
181
			.saturating_add(T::DbWeight::get().reads(3_u64))
182
			.saturating_add(T::DbWeight::get().writes(3_u64))
183
	}
184
}
185

            
186
// For backwards compatibility and tests.
187
impl WeightInfo for () {
188
	/// The range of component `b` is `[0, 3932160]`.
189
	fn remark(b: u32, ) -> Weight {
190
		// Proof Size summary in bytes:
191
		//  Measured:  `0`
192
		//  Estimated: `0`
193
		// Minimum execution time: 2_078_000 picoseconds.
194
		Weight::from_parts(1_137_744, 0)
195
			// Standard Error: 0
196
			.saturating_add(Weight::from_parts(387, 0).saturating_mul(b.into()))
197
	}
198
	/// The range of component `b` is `[0, 3932160]`.
199
	fn remark_with_event(b: u32, ) -> Weight {
200
		// Proof Size summary in bytes:
201
		//  Measured:  `0`
202
		//  Estimated: `0`
203
		// Minimum execution time: 5_980_000 picoseconds.
204
		Weight::from_parts(2_562_415, 0)
205
			// Standard Error: 1
206
			.saturating_add(Weight::from_parts(1_391, 0).saturating_mul(b.into()))
207
	}
208
	/// Storage: `System::Digest` (r:1 w:1)
209
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
210
	/// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
211
	/// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
212
	fn set_heap_pages() -> Weight {
213
		// Proof Size summary in bytes:
214
		//  Measured:  `0`
215
		//  Estimated: `1485`
216
		// Minimum execution time: 3_834_000 picoseconds.
217
		Weight::from_parts(4_109_000, 1485)
218
			.saturating_add(RocksDbWeight::get().reads(1_u64))
219
			.saturating_add(RocksDbWeight::get().writes(2_u64))
220
	}
221
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
222
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
223
	/// Storage: `System::Digest` (r:1 w:1)
224
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
225
	/// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
226
	/// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
227
	fn set_code() -> Weight {
228
		// Proof Size summary in bytes:
229
		//  Measured:  `142`
230
		//  Estimated: `67035`
231
		// Minimum execution time: 81_326_496_000 picoseconds.
232
		Weight::from_parts(81_880_651_000, 67035)
233
			.saturating_add(RocksDbWeight::get().reads(2_u64))
234
			.saturating_add(RocksDbWeight::get().writes(2_u64))
235
	}
236
	/// Storage: `Skipped::Metadata` (r:0 w:0)
237
	/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
238
	/// The range of component `i` is `[0, 1000]`.
239
	fn set_storage(i: u32, ) -> Weight {
240
		// Proof Size summary in bytes:
241
		//  Measured:  `0`
242
		//  Estimated: `0`
243
		// Minimum execution time: 2_059_000 picoseconds.
244
		Weight::from_parts(2_192_000, 0)
245
			// Standard Error: 720
246
			.saturating_add(Weight::from_parts(742_610, 0).saturating_mul(i.into()))
247
			.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into())))
248
	}
249
	/// Storage: `Skipped::Metadata` (r:0 w:0)
250
	/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
251
	/// The range of component `i` is `[0, 1000]`.
252
	fn kill_storage(i: u32, ) -> Weight {
253
		// Proof Size summary in bytes:
254
		//  Measured:  `0`
255
		//  Estimated: `0`
256
		// Minimum execution time: 2_038_000 picoseconds.
257
		Weight::from_parts(2_159_000, 0)
258
			// Standard Error: 774
259
			.saturating_add(Weight::from_parts(569_424, 0).saturating_mul(i.into()))
260
			.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into())))
261
	}
262
	/// Storage: `Skipped::Metadata` (r:0 w:0)
263
	/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
264
	/// The range of component `p` is `[0, 1000]`.
265
	fn kill_prefix(p: u32, ) -> Weight {
266
		// Proof Size summary in bytes:
267
		//  Measured:  `127 + p * (69 ±0)`
268
		//  Estimated: `134 + p * (70 ±0)`
269
		// Minimum execution time: 3_990_000 picoseconds.
270
		Weight::from_parts(4_172_000, 134)
271
			// Standard Error: 1_485
272
			.saturating_add(Weight::from_parts(1_227_281, 0).saturating_mul(p.into()))
273
			.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(p.into())))
274
			.saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into())))
275
			.saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
276
	}
277
	/// Storage: `System::AuthorizedUpgrade` (r:0 w:1)
278
	/// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
279
	fn authorize_upgrade() -> Weight {
280
		// Proof Size summary in bytes:
281
		//  Measured:  `0`
282
		//  Estimated: `0`
283
		// Minimum execution time: 8_851_000 picoseconds.
284
		Weight::from_parts(9_643_000, 0)
285
			.saturating_add(RocksDbWeight::get().writes(1_u64))
286
	}
287
	/// Storage: `System::AuthorizedUpgrade` (r:1 w:1)
288
	/// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
289
	/// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
290
	/// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
291
	/// Storage: `System::Digest` (r:1 w:1)
292
	/// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
293
	/// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
294
	/// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
295
	fn apply_authorized_upgrade() -> Weight {
296
		// Proof Size summary in bytes:
297
		//  Measured:  `164`
298
		//  Estimated: `67035`
299
		// Minimum execution time: 86_295_879_000 picoseconds.
300
		Weight::from_parts(87_636_595_000, 67035)
301
			.saturating_add(RocksDbWeight::get().reads(3_u64))
302
			.saturating_add(RocksDbWeight::get().writes(3_u64))
303
	}
304
}