frame_system/weights.rs
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// This file is part of Substrate.
19
20// Copyright (C) Parity Technologies (UK) Ltd.
21// SPDX-License-Identifier: Apache-2.0
22
23// Licensed under the Apache License, Version 2.0 (the "License");
24// you may not use this file except in compliance with the License.
25// You may obtain a copy of the License at
26//
27// http://www.apache.org/licenses/LICENSE-2.0
28//
29// Unless required by applicable law or agreed to in writing, software
30// distributed under the License is distributed on an "AS IS" BASIS,
31// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32// See the License for the specific language governing permissions and
33// limitations under the License.
34
35//! Autogenerated weights for `frame_system`
36//!
37//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
38//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
39//! WORST CASE MAP SIZE: `1000000`
40//! HOSTNAME: `4563561839a5`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
41//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`
42
43// Executed Command:
44// frame-omni-bencher
45// v1
46// benchmark
47// pallet
48// --extrinsic=*
49// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
50// --pallet=frame_system
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/system/src/weights.rs
53// --wasm-execution=compiled
54// --steps=50
55// --repeat=20
56// --heap-pages=4096
57// --template=substrate/.maintain/frame-weight-template.hbs
58// --no-storage-info
59// --no-min-squares
60// --no-median-slopes
61// --genesis-builder-policy=none
62// --exclude-pallets=pallet_xcm,pallet_xcm_benchmarks::fungible,pallet_xcm_benchmarks::generic,pallet_nomination_pools,pallet_remark,pallet_transaction_storage,pallet_election_provider_multi_block,pallet_election_provider_multi_block::signed,pallet_election_provider_multi_block::unsigned,pallet_election_provider_multi_block::verifier
63
64#![cfg_attr(rustfmt, rustfmt_skip)]
65#![allow(unused_parens)]
66#![allow(unused_imports)]
67#![allow(missing_docs)]
68#![allow(dead_code)]
69
70use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
71use core::marker::PhantomData;
72
73/// Weight functions needed for `frame_system`.
74pub trait WeightInfo {
75 fn remark(b: u32, ) -> Weight;
76 fn remark_with_event(b: u32, ) -> Weight;
77 fn set_heap_pages() -> Weight;
78 fn set_code() -> Weight;
79 fn set_storage(i: u32, ) -> Weight;
80 fn kill_storage(i: u32, ) -> Weight;
81 fn kill_prefix(p: u32, ) -> Weight;
82 fn authorize_upgrade() -> Weight;
83 fn apply_authorized_upgrade() -> Weight;
84}
85
86/// Weights for `frame_system` using the Substrate node and recommended hardware.
87pub struct SubstrateWeight<T>(PhantomData<T>);
88impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
89 /// The range of component `b` is `[0, 3932160]`.
90 fn remark(b: u32, ) -> Weight {
91 // Proof Size summary in bytes:
92 // Measured: `0`
93 // Estimated: `0`
94 // Minimum execution time: 1_518_000 picoseconds.
95 Weight::from_parts(1_586_000, 0)
96 // Standard Error: 122
97 .saturating_add(Weight::from_parts(10_920, 0).saturating_mul(b.into()))
98 }
99 /// The range of component `b` is `[0, 3932160]`.
100 fn remark_with_event(b: u32, ) -> Weight {
101 // Proof Size summary in bytes:
102 // Measured: `0`
103 // Estimated: `0`
104 // Minimum execution time: 4_558_000 picoseconds.
105 Weight::from_parts(4_725_000, 0)
106 // Standard Error: 120
107 .saturating_add(Weight::from_parts(12_386, 0).saturating_mul(b.into()))
108 }
109 /// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
110 /// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
111 fn set_heap_pages() -> Weight {
112 // Proof Size summary in bytes:
113 // Measured: `0`
114 // Estimated: `0`
115 // Minimum execution time: 2_639_000 picoseconds.
116 Weight::from_parts(2_836_000, 0)
117 .saturating_add(T::DbWeight::get().writes(1_u64))
118 }
119 /// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
120 /// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
121 /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
122 /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
123 fn set_code() -> Weight {
124 // Proof Size summary in bytes:
125 // Measured: `0`
126 // Estimated: `67035`
127 // Minimum execution time: 161_314_402_000 picoseconds.
128 Weight::from_parts(164_247_810_000, 67035)
129 .saturating_add(T::DbWeight::get().reads(1_u64))
130 .saturating_add(T::DbWeight::get().writes(1_u64))
131 }
132 /// Storage: `Skipped::Metadata` (r:0 w:0)
133 /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
134 /// The range of component `i` is `[0, 1000]`.
135 fn set_storage(i: u32, ) -> Weight {
136 // Proof Size summary in bytes:
137 // Measured: `0`
138 // Estimated: `0`
139 // Minimum execution time: 1_518_000 picoseconds.
140 Weight::from_parts(1_565_000, 0)
141 // Standard Error: 2_255
142 .saturating_add(Weight::from_parts(733_648, 0).saturating_mul(i.into()))
143 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
144 }
145 /// Storage: `Skipped::Metadata` (r:0 w:0)
146 /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
147 /// The range of component `i` is `[0, 1000]`.
148 fn kill_storage(i: u32, ) -> Weight {
149 // Proof Size summary in bytes:
150 // Measured: `0`
151 // Estimated: `0`
152 // Minimum execution time: 1_583_000 picoseconds.
153 Weight::from_parts(1_624_000, 0)
154 // Standard Error: 1_360
155 .saturating_add(Weight::from_parts(566_903, 0).saturating_mul(i.into()))
156 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into())))
157 }
158 /// Storage: `Skipped::Metadata` (r:0 w:0)
159 /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
160 /// The range of component `p` is `[0, 1000]`.
161 fn kill_prefix(p: u32, ) -> Weight {
162 // Proof Size summary in bytes:
163 // Measured: `12 + p * (69 ±0)`
164 // Estimated: `0 + p * (70 ±0)`
165 // Minimum execution time: 2_884_000 picoseconds.
166 Weight::from_parts(2_964_000, 0)
167 // Standard Error: 1_896
168 .saturating_add(Weight::from_parts(1_340_742, 0).saturating_mul(p.into()))
169 .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into())))
170 .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into())))
171 .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
172 }
173 /// Storage: `System::AuthorizedUpgrade` (r:0 w:1)
174 /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
175 fn authorize_upgrade() -> Weight {
176 // Proof Size summary in bytes:
177 // Measured: `0`
178 // Estimated: `0`
179 // Minimum execution time: 12_466_000 picoseconds.
180 Weight::from_parts(15_570_000, 0)
181 .saturating_add(T::DbWeight::get().writes(1_u64))
182 }
183 /// Storage: `System::AuthorizedUpgrade` (r:1 w:1)
184 /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
185 /// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
186 /// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
187 /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
188 /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
189 fn apply_authorized_upgrade() -> Weight {
190 // Proof Size summary in bytes:
191 // Measured: `21`
192 // Estimated: `67035`
193 // Minimum execution time: 163_673_542_000 picoseconds.
194 Weight::from_parts(166_858_158_000, 67035)
195 .saturating_add(T::DbWeight::get().reads(2_u64))
196 .saturating_add(T::DbWeight::get().writes(2_u64))
197 }
198}
199
200// For backwards compatibility and tests.
201impl WeightInfo for () {
202 /// The range of component `b` is `[0, 3932160]`.
203 fn remark(b: u32, ) -> Weight {
204 // Proof Size summary in bytes:
205 // Measured: `0`
206 // Estimated: `0`
207 // Minimum execution time: 1_518_000 picoseconds.
208 Weight::from_parts(1_586_000, 0)
209 // Standard Error: 122
210 .saturating_add(Weight::from_parts(10_920, 0).saturating_mul(b.into()))
211 }
212 /// The range of component `b` is `[0, 3932160]`.
213 fn remark_with_event(b: u32, ) -> Weight {
214 // Proof Size summary in bytes:
215 // Measured: `0`
216 // Estimated: `0`
217 // Minimum execution time: 4_558_000 picoseconds.
218 Weight::from_parts(4_725_000, 0)
219 // Standard Error: 120
220 .saturating_add(Weight::from_parts(12_386, 0).saturating_mul(b.into()))
221 }
222 /// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
223 /// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1)
224 fn set_heap_pages() -> Weight {
225 // Proof Size summary in bytes:
226 // Measured: `0`
227 // Estimated: `0`
228 // Minimum execution time: 2_639_000 picoseconds.
229 Weight::from_parts(2_836_000, 0)
230 .saturating_add(RocksDbWeight::get().writes(1_u64))
231 }
232 /// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
233 /// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
234 /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
235 /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
236 fn set_code() -> Weight {
237 // Proof Size summary in bytes:
238 // Measured: `0`
239 // Estimated: `67035`
240 // Minimum execution time: 161_314_402_000 picoseconds.
241 Weight::from_parts(164_247_810_000, 67035)
242 .saturating_add(RocksDbWeight::get().reads(1_u64))
243 .saturating_add(RocksDbWeight::get().writes(1_u64))
244 }
245 /// Storage: `Skipped::Metadata` (r:0 w:0)
246 /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
247 /// The range of component `i` is `[0, 1000]`.
248 fn set_storage(i: u32, ) -> Weight {
249 // Proof Size summary in bytes:
250 // Measured: `0`
251 // Estimated: `0`
252 // Minimum execution time: 1_518_000 picoseconds.
253 Weight::from_parts(1_565_000, 0)
254 // Standard Error: 2_255
255 .saturating_add(Weight::from_parts(733_648, 0).saturating_mul(i.into()))
256 .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into())))
257 }
258 /// Storage: `Skipped::Metadata` (r:0 w:0)
259 /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
260 /// The range of component `i` is `[0, 1000]`.
261 fn kill_storage(i: u32, ) -> Weight {
262 // Proof Size summary in bytes:
263 // Measured: `0`
264 // Estimated: `0`
265 // Minimum execution time: 1_583_000 picoseconds.
266 Weight::from_parts(1_624_000, 0)
267 // Standard Error: 1_360
268 .saturating_add(Weight::from_parts(566_903, 0).saturating_mul(i.into()))
269 .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into())))
270 }
271 /// Storage: `Skipped::Metadata` (r:0 w:0)
272 /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
273 /// The range of component `p` is `[0, 1000]`.
274 fn kill_prefix(p: u32, ) -> Weight {
275 // Proof Size summary in bytes:
276 // Measured: `12 + p * (69 ±0)`
277 // Estimated: `0 + p * (70 ±0)`
278 // Minimum execution time: 2_884_000 picoseconds.
279 Weight::from_parts(2_964_000, 0)
280 // Standard Error: 1_896
281 .saturating_add(Weight::from_parts(1_340_742, 0).saturating_mul(p.into()))
282 .saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(p.into())))
283 .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(p.into())))
284 .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into()))
285 }
286 /// Storage: `System::AuthorizedUpgrade` (r:0 w:1)
287 /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
288 fn authorize_upgrade() -> Weight {
289 // Proof Size summary in bytes:
290 // Measured: `0`
291 // Estimated: `0`
292 // Minimum execution time: 12_466_000 picoseconds.
293 Weight::from_parts(15_570_000, 0)
294 .saturating_add(RocksDbWeight::get().writes(1_u64))
295 }
296 /// Storage: `System::AuthorizedUpgrade` (r:1 w:1)
297 /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`)
298 /// Storage: `MultiBlockMigrations::Cursor` (r:1 w:0)
299 /// Proof: `MultiBlockMigrations::Cursor` (`max_values`: Some(1), `max_size`: Some(65550), added: 66045, mode: `MaxEncodedLen`)
300 /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
301 /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1)
302 fn apply_authorized_upgrade() -> Weight {
303 // Proof Size summary in bytes:
304 // Measured: `21`
305 // Estimated: `67035`
306 // Minimum execution time: 163_673_542_000 picoseconds.
307 Weight::from_parts(166_858_158_000, 67035)
308 .saturating_add(RocksDbWeight::get().reads(2_u64))
309 .saturating_add(RocksDbWeight::get().writes(2_u64))
310 }
311}