common_runtime/weights/
pallet_balances.rs

1//! Autogenerated weights for pallet_balances
2//!
3//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 48.0.0
4//! DATE: 2025-09-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
5//! WORST CASE MAP SIZE: `1000000`
6//! HOSTNAME: `ip-10-173-5-194`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz`
7//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
8
9// Executed Command:
10// ./scripts/../target/release/frequency
11// benchmark
12// pallet
13// --pallet=pallet_balances
14// --extrinsic
15// *
16// --heap-pages=4096
17// --steps=50
18// --repeat=20
19// --output=./scripts/../runtime/common/src/weights
20// --template=./scripts/../.maintain/runtime-weight-template.hbs
21// --additional-trie-layers=3
22// --runtime=./scripts/../target/release/wbuild/frequency-runtime/frequency_runtime.wasm
23// --genesis-builder=runtime
24
25#![cfg_attr(rustfmt, rustfmt_skip)]
26#![allow(unused_parens)]
27#![allow(unused_imports)]
28#![allow(missing_docs)]
29
30use frame_support::{traits::Get, weights::Weight};
31use core::marker::PhantomData;
32
33/// Weights for `pallet_balances` using the Substrate node and recommended hardware.
34pub struct SubstrateWeight<T>(PhantomData<T>);
35impl<T: frame_system::Config> pallet_balances::WeightInfo for SubstrateWeight<T> {
36	/// Storage: `System::Account` (r:1 w:1)
37	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
38	fn transfer_allow_death() -> Weight {
39		// Proof Size summary in bytes:
40		//  Measured:  `0`
41		//  Estimated: `4088`
42		// Minimum execution time: 48_764_000 picoseconds.
43		Weight::from_parts(49_690_000, 4088)
44			.saturating_add(T::DbWeight::get().reads(1_u64))
45			.saturating_add(T::DbWeight::get().writes(1_u64))
46	}
47	/// Storage: `System::Account` (r:1 w:1)
48	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
49	fn transfer_keep_alive() -> Weight {
50		// Proof Size summary in bytes:
51		//  Measured:  `0`
52		//  Estimated: `4088`
53		// Minimum execution time: 38_776_000 picoseconds.
54		Weight::from_parts(39_927_000, 4088)
55			.saturating_add(T::DbWeight::get().reads(1_u64))
56			.saturating_add(T::DbWeight::get().writes(1_u64))
57	}
58	/// Storage: `System::Account` (r:1 w:1)
59	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
60	fn force_set_balance_creating() -> Weight {
61		// Proof Size summary in bytes:
62		//  Measured:  `39`
63		//  Estimated: `4088`
64		// Minimum execution time: 22_205_000 picoseconds.
65		Weight::from_parts(22_496_000, 4088)
66			.saturating_add(T::DbWeight::get().reads(1_u64))
67			.saturating_add(T::DbWeight::get().writes(1_u64))
68	}
69	/// Storage: `System::Account` (r:1 w:1)
70	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
71	fn force_set_balance_killing() -> Weight {
72		// Proof Size summary in bytes:
73		//  Measured:  `174`
74		//  Estimated: `4088`
75		// Minimum execution time: 22_283_000 picoseconds.
76		Weight::from_parts(22_672_000, 4088)
77			.saturating_add(T::DbWeight::get().reads(1_u64))
78			.saturating_add(T::DbWeight::get().writes(1_u64))
79	}
80	/// Storage: `System::Account` (r:2 w:2)
81	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
82	fn force_transfer() -> Weight {
83		// Proof Size summary in bytes:
84		//  Measured:  `103`
85		//  Estimated: `6691`
86		// Minimum execution time: 50_939_000 picoseconds.
87		Weight::from_parts(52_579_000, 6691)
88			.saturating_add(T::DbWeight::get().reads(2_u64))
89			.saturating_add(T::DbWeight::get().writes(2_u64))
90	}
91	/// Storage: `System::Account` (r:1 w:1)
92	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
93	fn transfer_all() -> Weight {
94		// Proof Size summary in bytes:
95		//  Measured:  `0`
96		//  Estimated: `4088`
97		// Minimum execution time: 48_565_000 picoseconds.
98		Weight::from_parts(49_746_000, 4088)
99			.saturating_add(T::DbWeight::get().reads(1_u64))
100			.saturating_add(T::DbWeight::get().writes(1_u64))
101	}
102	/// Storage: `System::Account` (r:1 w:1)
103	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
104	fn force_unreserve() -> Weight {
105		// Proof Size summary in bytes:
106		//  Measured:  `174`
107		//  Estimated: `4088`
108		// Minimum execution time: 18_081_000 picoseconds.
109		Weight::from_parts(18_737_000, 4088)
110			.saturating_add(T::DbWeight::get().reads(1_u64))
111			.saturating_add(T::DbWeight::get().writes(1_u64))
112	}
113	/// Storage: `System::Account` (r:999 w:999)
114	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
115	/// The range of component `u` is `[1, 1000]`.
116	fn upgrade_accounts(u: u32, ) -> Weight {
117		// Proof Size summary in bytes:
118		//  Measured:  `0 + u * (136 ±0)`
119		//  Estimated: `1485 + u * (2603 ±0)`
120		// Minimum execution time: 17_040_000 picoseconds.
121		Weight::from_parts(17_279_000, 1485)
122			// Standard Error: 9_600
123			.saturating_add(Weight::from_parts(14_453_415, 0).saturating_mul(u.into()))
124			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into())))
125			.saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into())))
126			.saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into()))
127	}
128	fn force_adjust_total_issuance() -> Weight {
129		// Proof Size summary in bytes:
130		//  Measured:  `0`
131		//  Estimated: `0`
132		// Minimum execution time: 6_183_000 picoseconds.
133		Weight::from_parts(6_459_000, 0)
134	}
135	fn burn_allow_death() -> Weight {
136		// Proof Size summary in bytes:
137		//  Measured:  `0`
138		//  Estimated: `0`
139		// Minimum execution time: 30_787_000 picoseconds.
140		Weight::from_parts(31_642_000, 0)
141	}
142	fn burn_keep_alive() -> Weight {
143		// Proof Size summary in bytes:
144		//  Measured:  `0`
145		//  Estimated: `0`
146		// Minimum execution time: 21_539_000 picoseconds.
147		Weight::from_parts(22_107_000, 0)
148	}
149}
150
151
152#[cfg(test)]
153mod tests {
154  use frame_support::{traits::Get, weights::Weight, dispatch::DispatchClass};
155  use crate::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
156  use crate::weights::extrinsic_weights::ExtrinsicBaseWeight;
157
158  #[allow(dead_code)]
159  struct BlockWeights;
160  impl Get<frame_system::limits::BlockWeights> for BlockWeights {
161  	fn get() -> frame_system::limits::BlockWeights {
162  		frame_system::limits::BlockWeights::builder()
163  			.base_block(Weight::zero())
164  			.for_class(DispatchClass::all(), |weights| {
165  				weights.base_extrinsic = ExtrinsicBaseWeight::get();
166  			})
167  			.for_class(DispatchClass::non_mandatory(), |weights| {
168  				weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);
169  			})
170  			.build_or_panic()
171  	}
172  }
173
174	#[test]
175	fn test_transfer_allow_death() {
176		assert!(
177			BlockWeights::get()
178				.per_class
179				.get(frame_support::dispatch::DispatchClass::Normal)
180				.max_extrinsic
181				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
182				.proof_size()
183				> 4088
184		);
185	}
186	#[test]
187	fn test_transfer_keep_alive() {
188		assert!(
189			BlockWeights::get()
190				.per_class
191				.get(frame_support::dispatch::DispatchClass::Normal)
192				.max_extrinsic
193				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
194				.proof_size()
195				> 4088
196		);
197	}
198	#[test]
199	fn test_force_set_balance_creating() {
200		assert!(
201			BlockWeights::get()
202				.per_class
203				.get(frame_support::dispatch::DispatchClass::Normal)
204				.max_extrinsic
205				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
206				.proof_size()
207				> 4088
208		);
209	}
210	#[test]
211	fn test_force_set_balance_killing() {
212		assert!(
213			BlockWeights::get()
214				.per_class
215				.get(frame_support::dispatch::DispatchClass::Normal)
216				.max_extrinsic
217				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
218				.proof_size()
219				> 4088
220		);
221	}
222	#[test]
223	fn test_force_transfer() {
224		assert!(
225			BlockWeights::get()
226				.per_class
227				.get(frame_support::dispatch::DispatchClass::Normal)
228				.max_extrinsic
229				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
230				.proof_size()
231				> 6691
232		);
233	}
234	#[test]
235	fn test_transfer_all() {
236		assert!(
237			BlockWeights::get()
238				.per_class
239				.get(frame_support::dispatch::DispatchClass::Normal)
240				.max_extrinsic
241				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
242				.proof_size()
243				> 4088
244		);
245	}
246	#[test]
247	fn test_force_unreserve() {
248		assert!(
249			BlockWeights::get()
250				.per_class
251				.get(frame_support::dispatch::DispatchClass::Normal)
252				.max_extrinsic
253				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
254				.proof_size()
255				> 4088
256		);
257	}
258	#[test]
259	fn test_upgrade_accounts() {
260		assert!(
261			BlockWeights::get()
262				.per_class
263				.get(frame_support::dispatch::DispatchClass::Normal)
264				.max_extrinsic
265				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
266				.proof_size()
267				> 1485
268		);
269	}
270}