pallet_asset_tx_payment/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 `pallet_asset_tx_payment`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21//! DATE: 2024-03-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `runner-bn-ce5rx-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=pallet_asset_tx_payment
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/transaction-payment/asset-tx-payment/src/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 `pallet_asset_tx_payment`.
53pub trait WeightInfo {
54 fn charge_asset_tx_payment_zero() -> Weight;
55 fn charge_asset_tx_payment_native() -> Weight;
56 fn charge_asset_tx_payment_asset() -> Weight;
57}
58
59/// Weights for `pallet_asset_tx_payment` using the Substrate node and recommended hardware.
60pub struct SubstrateWeight<T>(PhantomData<T>);
61impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
62 fn charge_asset_tx_payment_zero() -> Weight {
63 // Proof Size summary in bytes:
64 // Measured: `0`
65 // Estimated: `0`
66 // Minimum execution time: 542_000 picoseconds.
67 Weight::from_parts(597_000, 0)
68 }
69 /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
70 /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
71 /// Storage: `Authorship::Author` (r:1 w:0)
72 /// Proof: `Authorship::Author` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
73 /// Storage: `System::Digest` (r:1 w:0)
74 /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
75 fn charge_asset_tx_payment_native() -> Weight {
76 // Proof Size summary in bytes:
77 // Measured: `248`
78 // Estimated: `1733`
79 // Minimum execution time: 33_162_000 picoseconds.
80 Weight::from_parts(34_716_000, 1733)
81 .saturating_add(T::DbWeight::get().reads(3_u64))
82 }
83 /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
84 /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
85 /// Storage: `Assets::Asset` (r:1 w:1)
86 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
87 /// Storage: `Assets::Account` (r:1 w:1)
88 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
89 /// Storage: `Authorship::Author` (r:1 w:0)
90 /// Proof: `Authorship::Author` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
91 /// Storage: `System::Digest` (r:1 w:0)
92 /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
93 fn charge_asset_tx_payment_asset() -> Weight {
94 // Proof Size summary in bytes:
95 // Measured: `747`
96 // Estimated: `3675`
97 // Minimum execution time: 44_230_000 picoseconds.
98 Weight::from_parts(45_297_000, 3675)
99 .saturating_add(T::DbWeight::get().reads(5_u64))
100 .saturating_add(T::DbWeight::get().writes(2_u64))
101 }
102}
103
104// For backwards compatibility and tests.
105impl WeightInfo for () {
106 fn charge_asset_tx_payment_zero() -> Weight {
107 // Proof Size summary in bytes:
108 // Measured: `0`
109 // Estimated: `0`
110 // Minimum execution time: 542_000 picoseconds.
111 Weight::from_parts(597_000, 0)
112 }
113 /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
114 /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
115 /// Storage: `Authorship::Author` (r:1 w:0)
116 /// Proof: `Authorship::Author` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
117 /// Storage: `System::Digest` (r:1 w:0)
118 /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
119 fn charge_asset_tx_payment_native() -> Weight {
120 // Proof Size summary in bytes:
121 // Measured: `248`
122 // Estimated: `1733`
123 // Minimum execution time: 33_162_000 picoseconds.
124 Weight::from_parts(34_716_000, 1733)
125 .saturating_add(RocksDbWeight::get().reads(3_u64))
126 }
127 /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
128 /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`)
129 /// Storage: `Assets::Asset` (r:1 w:1)
130 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
131 /// Storage: `Assets::Account` (r:1 w:1)
132 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
133 /// Storage: `Authorship::Author` (r:1 w:0)
134 /// Proof: `Authorship::Author` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`)
135 /// Storage: `System::Digest` (r:1 w:0)
136 /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
137 fn charge_asset_tx_payment_asset() -> Weight {
138 // Proof Size summary in bytes:
139 // Measured: `747`
140 // Estimated: `3675`
141 // Minimum execution time: 44_230_000 picoseconds.
142 Weight::from_parts(45_297_000, 3675)
143 .saturating_add(RocksDbWeight::get().reads(5_u64))
144 .saturating_add(RocksDbWeight::get().writes(2_u64))
145 }
146}