frame_system/extensions/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//! Autogenerated weights for `frame_system_extensions`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21//! DATE: 2024-11-08, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `runner-wiukf8gn-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_extensions
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/extensions/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
49use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
50use core::marker::PhantomData;
51
52/// Weight functions needed for `frame_system_extensions`.
53pub trait WeightInfo {
54 fn check_genesis() -> Weight;
55 fn check_mortality_mortal_transaction() -> Weight;
56 fn check_mortality_immortal_transaction() -> Weight;
57 fn check_non_zero_sender() -> Weight;
58 fn check_nonce() -> Weight;
59 fn check_spec_version() -> Weight;
60 fn check_tx_version() -> Weight;
61 fn check_weight() -> Weight;
62 fn weight_reclaim() -> Weight;
63}
64
65/// Weights for `frame_system_extensions` using the Substrate node and recommended hardware.
66pub struct SubstrateWeight<T>(PhantomData<T>);
67impl<T: crate::Config> WeightInfo for SubstrateWeight<T> {
68 /// Storage: `System::BlockHash` (r:1 w:0)
69 /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
70 fn check_genesis() -> Weight {
71 // Proof Size summary in bytes:
72 // Measured: `30`
73 // Estimated: `3509`
74 // Minimum execution time: 3_388_000 picoseconds.
75 Weight::from_parts(3_577_000, 3509)
76 .saturating_add(T::DbWeight::get().reads(1_u64))
77 }
78 /// Storage: `System::BlockHash` (r:1 w:0)
79 /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
80 fn check_mortality_mortal_transaction() -> Weight {
81 // Proof Size summary in bytes:
82 // Measured: `68`
83 // Estimated: `3509`
84 // Minimum execution time: 6_442_000 picoseconds.
85 Weight::from_parts(6_703_000, 3509)
86 .saturating_add(T::DbWeight::get().reads(1_u64))
87 }
88 /// Storage: `System::BlockHash` (r:1 w:0)
89 /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
90 fn check_mortality_immortal_transaction() -> Weight {
91 // Proof Size summary in bytes:
92 // Measured: `68`
93 // Estimated: `3509`
94 // Minimum execution time: 6_357_000 picoseconds.
95 Weight::from_parts(6_605_000, 3509)
96 .saturating_add(T::DbWeight::get().reads(1_u64))
97 }
98 fn check_non_zero_sender() -> Weight {
99 // Proof Size summary in bytes:
100 // Measured: `0`
101 // Estimated: `0`
102 // Minimum execution time: 457_000 picoseconds.
103 Weight::from_parts(570_000, 0)
104 }
105 /// Storage: `System::Account` (r:1 w:1)
106 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
107 fn check_nonce() -> Weight {
108 // Proof Size summary in bytes:
109 // Measured: `101`
110 // Estimated: `3593`
111 // Minimum execution time: 6_936_000 picoseconds.
112 Weight::from_parts(7_261_000, 3593)
113 .saturating_add(T::DbWeight::get().reads(1_u64))
114 .saturating_add(T::DbWeight::get().writes(1_u64))
115 }
116 fn check_spec_version() -> Weight {
117 // Proof Size summary in bytes:
118 // Measured: `0`
119 // Estimated: `0`
120 // Minimum execution time: 336_000 picoseconds.
121 Weight::from_parts(430_000, 0)
122 }
123 fn check_tx_version() -> Weight {
124 // Proof Size summary in bytes:
125 // Measured: `0`
126 // Estimated: `0`
127 // Minimum execution time: 348_000 picoseconds.
128 Weight::from_parts(455_000, 0)
129 }
130 fn check_weight() -> Weight {
131 // Proof Size summary in bytes:
132 // Measured: `0`
133 // Estimated: `0`
134 // Minimum execution time: 2_887_000 picoseconds.
135 Weight::from_parts(3_006_000, 0)
136 }
137 /// Storage: `System::AllExtrinsicsLen` (r:1 w:1)
138 /// Proof: `System::AllExtrinsicsLen` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
139 fn weight_reclaim() -> Weight {
140 // Proof Size summary in bytes:
141 // Measured: `24`
142 // Estimated: `1489`
143 // Minimum execution time: 4_375_000 picoseconds.
144 Weight::from_parts(4_747_000, 1489)
145 .saturating_add(T::DbWeight::get().reads(1_u64))
146 .saturating_add(T::DbWeight::get().writes(1_u64))
147 }
148}
149
150// For backwards compatibility and tests.
151impl WeightInfo for () {
152 /// Storage: `System::BlockHash` (r:1 w:0)
153 /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
154 fn check_genesis() -> Weight {
155 // Proof Size summary in bytes:
156 // Measured: `30`
157 // Estimated: `3509`
158 // Minimum execution time: 3_388_000 picoseconds.
159 Weight::from_parts(3_577_000, 3509)
160 .saturating_add(RocksDbWeight::get().reads(1_u64))
161 }
162 /// Storage: `System::BlockHash` (r:1 w:0)
163 /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
164 fn check_mortality_mortal_transaction() -> Weight {
165 // Proof Size summary in bytes:
166 // Measured: `68`
167 // Estimated: `3509`
168 // Minimum execution time: 6_442_000 picoseconds.
169 Weight::from_parts(6_703_000, 3509)
170 .saturating_add(RocksDbWeight::get().reads(1_u64))
171 }
172 /// Storage: `System::BlockHash` (r:1 w:0)
173 /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`)
174 fn check_mortality_immortal_transaction() -> Weight {
175 // Proof Size summary in bytes:
176 // Measured: `68`
177 // Estimated: `3509`
178 // Minimum execution time: 6_357_000 picoseconds.
179 Weight::from_parts(6_605_000, 3509)
180 .saturating_add(RocksDbWeight::get().reads(1_u64))
181 }
182 fn check_non_zero_sender() -> Weight {
183 // Proof Size summary in bytes:
184 // Measured: `0`
185 // Estimated: `0`
186 // Minimum execution time: 457_000 picoseconds.
187 Weight::from_parts(570_000, 0)
188 }
189 /// Storage: `System::Account` (r:1 w:1)
190 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
191 fn check_nonce() -> Weight {
192 // Proof Size summary in bytes:
193 // Measured: `101`
194 // Estimated: `3593`
195 // Minimum execution time: 6_936_000 picoseconds.
196 Weight::from_parts(7_261_000, 3593)
197 .saturating_add(RocksDbWeight::get().reads(1_u64))
198 .saturating_add(RocksDbWeight::get().writes(1_u64))
199 }
200 fn check_spec_version() -> Weight {
201 // Proof Size summary in bytes:
202 // Measured: `0`
203 // Estimated: `0`
204 // Minimum execution time: 336_000 picoseconds.
205 Weight::from_parts(430_000, 0)
206 }
207 fn check_tx_version() -> Weight {
208 // Proof Size summary in bytes:
209 // Measured: `0`
210 // Estimated: `0`
211 // Minimum execution time: 348_000 picoseconds.
212 Weight::from_parts(455_000, 0)
213 }
214 fn check_weight() -> Weight {
215 // Proof Size summary in bytes:
216 // Measured: `0`
217 // Estimated: `0`
218 // Minimum execution time: 2_887_000 picoseconds.
219 Weight::from_parts(3_006_000, 0)
220 }
221 /// Storage: `System::AllExtrinsicsLen` (r:1 w:1)
222 /// Proof: `System::AllExtrinsicsLen` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
223 fn weight_reclaim() -> Weight {
224 // Proof Size summary in bytes:
225 // Measured: `24`
226 // Estimated: `1489`
227 // Minimum execution time: 4_375_000 picoseconds.
228 Weight::from_parts(4_747_000, 1489)
229 .saturating_add(RocksDbWeight::get().reads(1_u64))
230 .saturating_add(RocksDbWeight::get().writes(1_u64))
231 }
232}