pallet_xc_asset_config/weights.rs
1// This file is part of Astar.
2
3// Copyright (C) Stake Technologies Pte.Ltd.
4// SPDX-License-Identifier: GPL-3.0-or-later
5
6// Astar is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10
11// Astar is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16// You should have received a copy of the GNU General Public License
17// along with Astar. If not, see <http://www.gnu.org/licenses/>.
18
19//! Autogenerated weights for `pallet_xc_asset_config`
20//!
21//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
22//! DATE: 2025-09-23, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
23//! WORST CASE MAP SIZE: `1000000`
24//! HOSTNAME: `gh-runner-01-ovh`, CPU: `Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz`
25//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
26
27// Executed Command:
28// frame-omni-bencher
29// v1
30// benchmark
31// pallet
32// --runtime=./target/release/wbuild/astar-runtime/astar_runtime.compact.compressed.wasm
33// --steps=50
34// --repeat=20
35// --pallet=pallet_xc_asset_config
36// --extrinsic=*
37// --wasm-execution=compiled
38// --heap-pages=4096
39// --output=./benchmark-results/astar/pallet/xc_asset_config_weights.rs
40// --template=./scripts/templates/pallet-weight-template.hbs
41
42#![cfg_attr(rustfmt, rustfmt_skip)]
43#![allow(unused_parens)]
44#![allow(unused_imports)]
45#![allow(missing_docs)]
46#![allow(dead_code)]
47
48use core::marker::PhantomData;
49use frame_support::weights::constants::RocksDbWeight;
50use frame_support::{traits::Get, weights::Weight};
51
52/// Weight info trait.
53pub trait WeightInfo {
54 fn register_asset_location() -> Weight;
55 fn set_asset_units_per_second() -> Weight;
56 fn change_existing_asset_location() -> Weight;
57 fn remove_payment_asset() -> Weight;
58 fn remove_asset() -> Weight;
59}
60
61/// Weight functions for `pallet_xc_asset_config`.
62pub struct SubstrateWeight<T>(PhantomData<T>);
63impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
64 /// Storage: `XcAssetConfig::AssetIdToLocation` (r:1 w:1)
65 /// Proof: `XcAssetConfig::AssetIdToLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
66 /// Storage: `XcAssetConfig::AssetLocationToId` (r:0 w:1)
67 /// Proof: `XcAssetConfig::AssetLocationToId` (`max_values`: None, `max_size`: None, mode: `Measured`)
68 fn register_asset_location() -> Weight {
69 // Proof Size summary in bytes:
70 // Measured: `6`
71 // Estimated: `3471`
72 // Minimum execution time: 13_780_000 picoseconds.
73 Weight::from_parts(14_026_000, 0)
74 .saturating_add(Weight::from_parts(0, 3471))
75 .saturating_add(T::DbWeight::get().reads(1))
76 .saturating_add(T::DbWeight::get().writes(2))
77 }
78 /// Storage: `XcAssetConfig::AssetLocationToId` (r:1 w:0)
79 /// Proof: `XcAssetConfig::AssetLocationToId` (`max_values`: None, `max_size`: None, mode: `Measured`)
80 /// Storage: `XcAssetConfig::AssetLocationUnitsPerSecond` (r:0 w:1)
81 /// Proof: `XcAssetConfig::AssetLocationUnitsPerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
82 fn set_asset_units_per_second() -> Weight {
83 // Proof Size summary in bytes:
84 // Measured: `93`
85 // Estimated: `3558`
86 // Minimum execution time: 14_311_000 picoseconds.
87 Weight::from_parts(14_650_000, 0)
88 .saturating_add(Weight::from_parts(0, 3558))
89 .saturating_add(T::DbWeight::get().reads(1))
90 .saturating_add(T::DbWeight::get().writes(1))
91 }
92 /// Storage: `XcAssetConfig::AssetIdToLocation` (r:1 w:1)
93 /// Proof: `XcAssetConfig::AssetIdToLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
94 /// Storage: `XcAssetConfig::AssetLocationUnitsPerSecond` (r:1 w:2)
95 /// Proof: `XcAssetConfig::AssetLocationUnitsPerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
96 /// Storage: `XcAssetConfig::AssetLocationToId` (r:0 w:2)
97 /// Proof: `XcAssetConfig::AssetLocationToId` (`max_values`: None, `max_size`: None, mode: `Measured`)
98 fn change_existing_asset_location() -> Weight {
99 // Proof Size summary in bytes:
100 // Measured: `141`
101 // Estimated: `3606`
102 // Minimum execution time: 21_381_000 picoseconds.
103 Weight::from_parts(21_714_000, 0)
104 .saturating_add(Weight::from_parts(0, 3606))
105 .saturating_add(T::DbWeight::get().reads(2))
106 .saturating_add(T::DbWeight::get().writes(5))
107 }
108 /// Storage: `XcAssetConfig::AssetLocationUnitsPerSecond` (r:0 w:1)
109 /// Proof: `XcAssetConfig::AssetLocationUnitsPerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
110 fn remove_payment_asset() -> Weight {
111 // Proof Size summary in bytes:
112 // Measured: `0`
113 // Estimated: `0`
114 // Minimum execution time: 8_725_000 picoseconds.
115 Weight::from_parts(8_963_000, 0)
116 .saturating_add(Weight::from_parts(0, 0))
117 .saturating_add(T::DbWeight::get().writes(1))
118 }
119 /// Storage: `XcAssetConfig::AssetIdToLocation` (r:1 w:1)
120 /// Proof: `XcAssetConfig::AssetIdToLocation` (`max_values`: None, `max_size`: None, mode: `Measured`)
121 /// Storage: `XcAssetConfig::AssetLocationUnitsPerSecond` (r:0 w:1)
122 /// Proof: `XcAssetConfig::AssetLocationUnitsPerSecond` (`max_values`: None, `max_size`: None, mode: `Measured`)
123 /// Storage: `XcAssetConfig::AssetLocationToId` (r:0 w:1)
124 /// Proof: `XcAssetConfig::AssetLocationToId` (`max_values`: None, `max_size`: None, mode: `Measured`)
125 fn remove_asset() -> Weight {
126 // Proof Size summary in bytes:
127 // Measured: `128`
128 // Estimated: `3593`
129 // Minimum execution time: 16_355_000 picoseconds.
130 Weight::from_parts(16_674_000, 0)
131 .saturating_add(Weight::from_parts(0, 3593))
132 .saturating_add(T::DbWeight::get().reads(1))
133 .saturating_add(T::DbWeight::get().writes(3))
134 }
135}
136// For backwards compatibility and tests
137impl WeightInfo for () {
138 // Storage: XcAssetConfig AssetIdToLocation (r:1 w:1)
139 // Proof Skipped: XcAssetConfig AssetIdToLocation (max_values: None, max_size: None, mode: Measured)
140 // Storage: EVM AccountCodes (r:0 w:1)
141 // Proof Skipped: EVM AccountCodes (max_values: None, max_size: None, mode: Measured)
142 // Storage: XcAssetConfig AssetLocationToId (r:0 w:1)
143 // Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
144 fn register_asset_location() -> Weight {
145 // Minimum execution time: 14_026_000 picoseconds.
146 Weight::from_parts(14_026_000, 0)
147 .saturating_add(Weight::from_parts(0, 3471))
148 .saturating_add(RocksDbWeight::get().reads(1_u64))
149 .saturating_add(RocksDbWeight::get().writes(3_u64))
150 }
151 // Storage: XcAssetConfig AssetLocationToId (r:1 w:0)
152 // Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
153 // Storage: XcAssetConfig AssetLocationUnitsPerSecond (r:0 w:1)
154 // Proof Skipped: XcAssetConfig AssetLocationUnitsPerSecond (max_values: None, max_size: None, mode: Measured)
155 fn set_asset_units_per_second() -> Weight {
156 // Minimum execution time: 14_650_000 picoseconds.
157 Weight::from_parts(14_650_000, 0)
158 .saturating_add(Weight::from_parts(0, 3558))
159 .saturating_add(RocksDbWeight::get().reads(1_u64))
160 .saturating_add(RocksDbWeight::get().writes(1_u64))
161 }
162 // Storage: XcAssetConfig AssetIdToLocation (r:1 w:1)
163 // Proof Skipped: XcAssetConfig AssetIdToLocation (max_values: None, max_size: None, mode: Measured)
164 // Storage: XcAssetConfig AssetLocationUnitsPerSecond (r:1 w:2)
165 // Proof Skipped: XcAssetConfig AssetLocationUnitsPerSecond (max_values: None, max_size: None, mode: Measured)
166 // Storage: XcAssetConfig AssetLocationToId (r:0 w:2)
167 // Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
168 fn change_existing_asset_location() -> Weight {
169 // Minimum execution time: 21_714_000 picoseconds.
170 Weight::from_parts(21_714_000, 0)
171 .saturating_add(Weight::from_parts(0, 3606))
172 .saturating_add(RocksDbWeight::get().reads(2_u64))
173 .saturating_add(RocksDbWeight::get().writes(5_u64))
174 }
175 // Storage: XcAssetConfig AssetLocationUnitsPerSecond (r:0 w:1)
176 // Proof Skipped: XcAssetConfig AssetLocationUnitsPerSecond (max_values: None, max_size: None, mode: Measured)
177 fn remove_payment_asset() -> Weight {
178 // Minimum execution time: 8_963_000 picoseconds.
179 Weight::from_parts(8_963_000, 0)
180 .saturating_add(Weight::from_parts(0, 0))
181 .saturating_add(RocksDbWeight::get().writes(1_u64))
182 }
183 // Storage: XcAssetConfig AssetIdToLocation (r:1 w:1)
184 // Proof Skipped: XcAssetConfig AssetIdToLocation (max_values: None, max_size: None, mode: Measured)
185 // Storage: EVM AccountCodes (r:0 w:1)
186 // Proof Skipped: EVM AccountCodes (max_values: None, max_size: None, mode: Measured)
187 // Storage: XcAssetConfig AssetLocationUnitsPerSecond (r:0 w:1)
188 // Proof Skipped: XcAssetConfig AssetLocationUnitsPerSecond (max_values: None, max_size: None, mode: Measured)
189 // Storage: XcAssetConfig AssetLocationToId (r:0 w:1)
190 // Proof Skipped: XcAssetConfig AssetLocationToId (max_values: None, max_size: None, mode: Measured)
191 fn remove_asset() -> Weight {
192 // Minimum execution time: 16_674_000 picoseconds.
193 Weight::from_parts(16_674_000, 0)
194 .saturating_add(Weight::from_parts(0, 3593))
195 .saturating_add(RocksDbWeight::get().reads(1_u64))
196 .saturating_add(RocksDbWeight::get().writes(4_u64))
197 }
198}