common_runtime/weights/
pallet_transaction_payment.rs

1//! Autogenerated weights for pallet_transaction_payment
2//!
3//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0
4//! DATE: 2025-08-20, 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_transaction_payment
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_transaction_payment` using the Substrate node and recommended hardware.
34pub struct SubstrateWeight<T>(PhantomData<T>);
35impl<T: frame_system::Config> pallet_transaction_payment::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 charge_transaction_payment() -> Weight {
39		// Proof Size summary in bytes:
40		//  Measured:  `101`
41		//  Estimated: `4088`
42		// Minimum execution time: 29_965_000 picoseconds.
43		Weight::from_parts(30_716_000, 4088)
44			.saturating_add(T::DbWeight::get().reads(1_u64))
45			.saturating_add(T::DbWeight::get().writes(1_u64))
46	}
47}
48
49
50#[cfg(test)]
51mod tests {
52  use frame_support::{traits::Get, weights::Weight, dispatch::DispatchClass};
53  use crate::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO};
54  use crate::weights::extrinsic_weights::ExtrinsicBaseWeight;
55
56  #[allow(dead_code)]
57  struct BlockWeights;
58  impl Get<frame_system::limits::BlockWeights> for BlockWeights {
59  	fn get() -> frame_system::limits::BlockWeights {
60  		frame_system::limits::BlockWeights::builder()
61  			.base_block(Weight::zero())
62  			.for_class(DispatchClass::all(), |weights| {
63  				weights.base_extrinsic = ExtrinsicBaseWeight::get();
64  			})
65  			.for_class(DispatchClass::non_mandatory(), |weights| {
66  				weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);
67  			})
68  			.build_or_panic()
69  	}
70  }
71
72	#[test]
73	fn test_charge_transaction_payment() {
74		assert!(
75			BlockWeights::get()
76				.per_class
77				.get(frame_support::dispatch::DispatchClass::Normal)
78				.max_extrinsic
79				.unwrap_or_else(<Weight as sp_runtime::traits::Bounded>::max_value)
80				.proof_size()
81				> 4088
82		);
83	}
84}