pallet_utility/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 `pallet_utility`
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=pallet_utility
51// --header=/__w/polkadot-sdk/polkadot-sdk/substrate/HEADER-APACHE2
52// --output=/__w/polkadot-sdk/polkadot-sdk/substrate/frame/utility/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 `pallet_utility`.
74pub trait WeightInfo {
75 fn batch(c: u32, ) -> Weight;
76 fn as_derivative() -> Weight;
77 fn batch_all(c: u32, ) -> Weight;
78 fn dispatch_as() -> Weight;
79 fn force_batch(c: u32, ) -> Weight;
80 fn dispatch_as_fallible() -> Weight;
81 fn if_else() -> Weight;
82}
83
84/// Weights for `pallet_utility` using the Substrate node and recommended hardware.
85pub struct SubstrateWeight<T>(PhantomData<T>);
86impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
87 /// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
88 /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
89 /// Storage: `TxPause::PausedCalls` (r:1 w:0)
90 /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
91 /// The range of component `c` is `[0, 1000]`.
92 fn batch(c: u32, ) -> Weight {
93 // Proof Size summary in bytes:
94 // Measured: `0`
95 // Estimated: `3997`
96 // Minimum execution time: 3_972_000 picoseconds.
97 Weight::from_parts(4_034_000, 3997)
98 // Standard Error: 2_323
99 .saturating_add(Weight::from_parts(4_914_560, 0).saturating_mul(c.into()))
100 .saturating_add(T::DbWeight::get().reads(2_u64))
101 }
102 /// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
103 /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
104 /// Storage: `TxPause::PausedCalls` (r:1 w:0)
105 /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
106 fn as_derivative() -> Weight {
107 // Proof Size summary in bytes:
108 // Measured: `0`
109 // Estimated: `3997`
110 // Minimum execution time: 5_866_000 picoseconds.
111 Weight::from_parts(6_097_000, 3997)
112 .saturating_add(T::DbWeight::get().reads(2_u64))
113 }
114 /// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
115 /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
116 /// Storage: `TxPause::PausedCalls` (r:1 w:0)
117 /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
118 /// The range of component `c` is `[0, 1000]`.
119 fn batch_all(c: u32, ) -> Weight {
120 // Proof Size summary in bytes:
121 // Measured: `0`
122 // Estimated: `3997`
123 // Minimum execution time: 3_983_000 picoseconds.
124 Weight::from_parts(4_075_000, 3997)
125 // Standard Error: 2_176
126 .saturating_add(Weight::from_parts(5_127_263, 0).saturating_mul(c.into()))
127 .saturating_add(T::DbWeight::get().reads(2_u64))
128 }
129 fn dispatch_as() -> Weight {
130 // Proof Size summary in bytes:
131 // Measured: `0`
132 // Estimated: `0`
133 // Minimum execution time: 5_530_000 picoseconds.
134 Weight::from_parts(5_720_000, 0)
135 }
136 /// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
137 /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
138 /// Storage: `TxPause::PausedCalls` (r:1 w:0)
139 /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
140 /// The range of component `c` is `[0, 1000]`.
141 fn force_batch(c: u32, ) -> Weight {
142 // Proof Size summary in bytes:
143 // Measured: `0`
144 // Estimated: `3997`
145 // Minimum execution time: 3_880_000 picoseconds.
146 Weight::from_parts(4_035_000, 3997)
147 // Standard Error: 1_682
148 .saturating_add(Weight::from_parts(4_902_729, 0).saturating_mul(c.into()))
149 .saturating_add(T::DbWeight::get().reads(2_u64))
150 }
151 fn dispatch_as_fallible() -> Weight {
152 // Proof Size summary in bytes:
153 // Measured: `0`
154 // Estimated: `0`
155 // Minimum execution time: 5_417_000 picoseconds.
156 Weight::from_parts(5_705_000, 0)
157 }
158 /// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
159 /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
160 /// Storage: `TxPause::PausedCalls` (r:2 w:0)
161 /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
162 fn if_else() -> Weight {
163 // Proof Size summary in bytes:
164 // Measured: `0`
165 // Estimated: `7004`
166 // Minimum execution time: 11_273_000 picoseconds.
167 Weight::from_parts(11_571_000, 7004)
168 .saturating_add(T::DbWeight::get().reads(3_u64))
169 }
170}
171
172// For backwards compatibility and tests.
173impl WeightInfo for () {
174 /// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
175 /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
176 /// Storage: `TxPause::PausedCalls` (r:1 w:0)
177 /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
178 /// The range of component `c` is `[0, 1000]`.
179 fn batch(c: u32, ) -> Weight {
180 // Proof Size summary in bytes:
181 // Measured: `0`
182 // Estimated: `3997`
183 // Minimum execution time: 3_972_000 picoseconds.
184 Weight::from_parts(4_034_000, 3997)
185 // Standard Error: 2_323
186 .saturating_add(Weight::from_parts(4_914_560, 0).saturating_mul(c.into()))
187 .saturating_add(RocksDbWeight::get().reads(2_u64))
188 }
189 /// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
190 /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
191 /// Storage: `TxPause::PausedCalls` (r:1 w:0)
192 /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
193 fn as_derivative() -> Weight {
194 // Proof Size summary in bytes:
195 // Measured: `0`
196 // Estimated: `3997`
197 // Minimum execution time: 5_866_000 picoseconds.
198 Weight::from_parts(6_097_000, 3997)
199 .saturating_add(RocksDbWeight::get().reads(2_u64))
200 }
201 /// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
202 /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
203 /// Storage: `TxPause::PausedCalls` (r:1 w:0)
204 /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
205 /// The range of component `c` is `[0, 1000]`.
206 fn batch_all(c: u32, ) -> Weight {
207 // Proof Size summary in bytes:
208 // Measured: `0`
209 // Estimated: `3997`
210 // Minimum execution time: 3_983_000 picoseconds.
211 Weight::from_parts(4_075_000, 3997)
212 // Standard Error: 2_176
213 .saturating_add(Weight::from_parts(5_127_263, 0).saturating_mul(c.into()))
214 .saturating_add(RocksDbWeight::get().reads(2_u64))
215 }
216 fn dispatch_as() -> Weight {
217 // Proof Size summary in bytes:
218 // Measured: `0`
219 // Estimated: `0`
220 // Minimum execution time: 5_530_000 picoseconds.
221 Weight::from_parts(5_720_000, 0)
222 }
223 /// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
224 /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
225 /// Storage: `TxPause::PausedCalls` (r:1 w:0)
226 /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
227 /// The range of component `c` is `[0, 1000]`.
228 fn force_batch(c: u32, ) -> Weight {
229 // Proof Size summary in bytes:
230 // Measured: `0`
231 // Estimated: `3997`
232 // Minimum execution time: 3_880_000 picoseconds.
233 Weight::from_parts(4_035_000, 3997)
234 // Standard Error: 1_682
235 .saturating_add(Weight::from_parts(4_902_729, 0).saturating_mul(c.into()))
236 .saturating_add(RocksDbWeight::get().reads(2_u64))
237 }
238 fn dispatch_as_fallible() -> Weight {
239 // Proof Size summary in bytes:
240 // Measured: `0`
241 // Estimated: `0`
242 // Minimum execution time: 5_417_000 picoseconds.
243 Weight::from_parts(5_705_000, 0)
244 }
245 /// Storage: `SafeMode::EnteredUntil` (r:1 w:0)
246 /// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
247 /// Storage: `TxPause::PausedCalls` (r:2 w:0)
248 /// Proof: `TxPause::PausedCalls` (`max_values`: None, `max_size`: Some(532), added: 3007, mode: `MaxEncodedLen`)
249 fn if_else() -> Weight {
250 // Proof Size summary in bytes:
251 // Measured: `0`
252 // Estimated: `7004`
253 // Minimum execution time: 11_273_000 picoseconds.
254 Weight::from_parts(11_571_000, 7004)
255 .saturating_add(RocksDbWeight::get().reads(3_u64))
256 }
257}