asset_hub_westend_runtime/weights/pallet_asset_rewards.rs
1// Copyright (C) Parity Technologies (UK) Ltd.
2// SPDX-License-Identifier: Apache-2.0
3
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! Autogenerated weights for `pallet_asset_rewards`
17//!
18//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
19//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
20//! WORST CASE MAP SIZE: `1000000`
21//! HOSTNAME: `73b9817d6032`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
22//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024
23
24// Executed Command:
25// frame-omni-bencher
26// v1
27// benchmark
28// pallet
29// --extrinsic=*
30// --runtime=target/production/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.wasm
31// --pallet=pallet_asset_rewards
32// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt
33// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights
34// --wasm-execution=compiled
35// --steps=50
36// --repeat=20
37// --heap-pages=4096
38// --no-storage-info
39// --no-min-squares
40// --no-median-slopes
41
42#![cfg_attr(rustfmt, rustfmt_skip)]
43#![allow(unused_parens)]
44#![allow(unused_imports)]
45#![allow(missing_docs)]
46
47use frame_support::{traits::Get, weights::Weight};
48use core::marker::PhantomData;
49
50/// Weight functions for `pallet_asset_rewards`.
51pub struct WeightInfo<T>(PhantomData<T>);
52impl<T: frame_system::Config> pallet_asset_rewards::WeightInfo for WeightInfo<T> {
53 /// Storage: `Assets::Asset` (r:2 w:0)
54 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
55 /// Storage: `AssetRewards::NextPoolId` (r:1 w:1)
56 /// Proof: `AssetRewards::NextPoolId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
57 /// Storage: `System::Account` (r:1 w:1)
58 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
59 /// Storage: `Balances::Holds` (r:1 w:1)
60 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)
61 /// Storage: `AssetRewards::PoolCost` (r:0 w:1)
62 /// Proof: `AssetRewards::PoolCost` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
63 /// Storage: `AssetRewards::Pools` (r:0 w:1)
64 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
65 fn create_pool() -> Weight {
66 // Proof Size summary in bytes:
67 // Measured: `392`
68 // Estimated: `6360`
69 // Minimum execution time: 61_036_000 picoseconds.
70 Weight::from_parts(62_593_000, 0)
71 .saturating_add(Weight::from_parts(0, 6360))
72 .saturating_add(T::DbWeight::get().reads(5))
73 .saturating_add(T::DbWeight::get().writes(5))
74 }
75 /// Storage: `AssetRewards::Pools` (r:1 w:1)
76 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
77 /// Storage: `AssetRewards::PoolStakers` (r:1 w:1)
78 /// Proof: `AssetRewards::PoolStakers` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
79 /// Storage: `AssetsFreezer::Freezes` (r:1 w:1)
80 /// Proof: `AssetsFreezer::Freezes` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`)
81 /// Storage: `Assets::Account` (r:1 w:0)
82 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
83 /// Storage: `AssetsFreezer::FrozenBalances` (r:1 w:1)
84 /// Proof: `AssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
85 fn stake() -> Weight {
86 // Proof Size summary in bytes:
87 // Measured: `906`
88 // Estimated: `4809`
89 // Minimum execution time: 56_336_000 picoseconds.
90 Weight::from_parts(57_248_000, 0)
91 .saturating_add(Weight::from_parts(0, 4809))
92 .saturating_add(T::DbWeight::get().reads(5))
93 .saturating_add(T::DbWeight::get().writes(4))
94 }
95 /// Storage: `AssetRewards::Pools` (r:1 w:1)
96 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
97 /// Storage: `AssetRewards::PoolStakers` (r:1 w:1)
98 /// Proof: `AssetRewards::PoolStakers` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
99 /// Storage: `AssetsFreezer::Freezes` (r:1 w:1)
100 /// Proof: `AssetsFreezer::Freezes` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`)
101 /// Storage: `Assets::Account` (r:1 w:0)
102 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
103 /// Storage: `AssetsFreezer::FrozenBalances` (r:1 w:1)
104 /// Proof: `AssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
105 fn unstake() -> Weight {
106 // Proof Size summary in bytes:
107 // Measured: `906`
108 // Estimated: `4809`
109 // Minimum execution time: 58_008_000 picoseconds.
110 Weight::from_parts(59_221_000, 0)
111 .saturating_add(Weight::from_parts(0, 4809))
112 .saturating_add(T::DbWeight::get().reads(5))
113 .saturating_add(T::DbWeight::get().writes(4))
114 }
115 /// Storage: `AssetRewards::Pools` (r:1 w:0)
116 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
117 /// Storage: `AssetRewards::PoolStakers` (r:1 w:1)
118 /// Proof: `AssetRewards::PoolStakers` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
119 /// Storage: `Assets::Asset` (r:1 w:1)
120 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
121 /// Storage: `Assets::Account` (r:2 w:2)
122 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
123 /// Storage: `AssetsFreezer::FrozenBalances` (r:1 w:0)
124 /// Proof: `AssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
125 fn harvest_rewards() -> Weight {
126 // Proof Size summary in bytes:
127 // Measured: `1106`
128 // Estimated: `6208`
129 // Minimum execution time: 79_944_000 picoseconds.
130 Weight::from_parts(81_289_000, 0)
131 .saturating_add(Weight::from_parts(0, 6208))
132 .saturating_add(T::DbWeight::get().reads(6))
133 .saturating_add(T::DbWeight::get().writes(4))
134 }
135 /// Storage: `AssetRewards::Pools` (r:1 w:1)
136 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
137 fn set_pool_reward_rate_per_block() -> Weight {
138 // Proof Size summary in bytes:
139 // Measured: `318`
140 // Estimated: `4809`
141 // Minimum execution time: 17_191_000 picoseconds.
142 Weight::from_parts(17_489_000, 0)
143 .saturating_add(Weight::from_parts(0, 4809))
144 .saturating_add(T::DbWeight::get().reads(1))
145 .saturating_add(T::DbWeight::get().writes(1))
146 }
147 /// Storage: `AssetRewards::Pools` (r:1 w:1)
148 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
149 fn set_pool_admin() -> Weight {
150 // Proof Size summary in bytes:
151 // Measured: `318`
152 // Estimated: `4809`
153 // Minimum execution time: 15_385_000 picoseconds.
154 Weight::from_parts(15_887_000, 0)
155 .saturating_add(Weight::from_parts(0, 4809))
156 .saturating_add(T::DbWeight::get().reads(1))
157 .saturating_add(T::DbWeight::get().writes(1))
158 }
159 /// Storage: `AssetRewards::Pools` (r:1 w:1)
160 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
161 fn set_pool_expiry_block() -> Weight {
162 // Proof Size summary in bytes:
163 // Measured: `318`
164 // Estimated: `4809`
165 // Minimum execution time: 17_928_000 picoseconds.
166 Weight::from_parts(18_717_000, 0)
167 .saturating_add(Weight::from_parts(0, 4809))
168 .saturating_add(T::DbWeight::get().reads(1))
169 .saturating_add(T::DbWeight::get().writes(1))
170 }
171 /// Storage: `AssetRewards::Pools` (r:1 w:0)
172 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
173 /// Storage: `Assets::Asset` (r:1 w:1)
174 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
175 /// Storage: `Assets::Account` (r:2 w:2)
176 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
177 /// Storage: `AssetsFreezer::FrozenBalances` (r:1 w:0)
178 /// Proof: `AssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
179 /// Storage: `System::Account` (r:1 w:1)
180 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
181 fn deposit_reward_tokens() -> Weight {
182 // Proof Size summary in bytes:
183 // Measured: `781`
184 // Estimated: `6208`
185 // Minimum execution time: 66_890_000 picoseconds.
186 Weight::from_parts(68_676_000, 0)
187 .saturating_add(Weight::from_parts(0, 6208))
188 .saturating_add(T::DbWeight::get().reads(6))
189 .saturating_add(T::DbWeight::get().writes(4))
190 }
191 /// Storage: `AssetRewards::Pools` (r:1 w:1)
192 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
193 /// Storage: `AssetRewards::PoolStakers` (r:1 w:0)
194 /// Proof: `AssetRewards::PoolStakers` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
195 /// Storage: `Assets::Asset` (r:1 w:1)
196 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
197 /// Storage: `Assets::Account` (r:2 w:2)
198 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
199 /// Storage: `AssetsFreezer::FrozenBalances` (r:1 w:1)
200 /// Proof: `AssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
201 /// Storage: `System::Account` (r:2 w:2)
202 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
203 /// Storage: `AssetsFreezer::Freezes` (r:1 w:1)
204 /// Proof: `AssetsFreezer::Freezes` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`)
205 /// Storage: `AssetRewards::PoolCost` (r:1 w:1)
206 /// Proof: `AssetRewards::PoolCost` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
207 /// Storage: `Balances::Holds` (r:1 w:1)
208 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)
209 fn cleanup_pool() -> Weight {
210 // Proof Size summary in bytes:
211 // Measured: `1139`
212 // Estimated: `6208`
213 // Minimum execution time: 129_877_000 picoseconds.
214 Weight::from_parts(133_247_000, 0)
215 .saturating_add(Weight::from_parts(0, 6208))
216 .saturating_add(T::DbWeight::get().reads(11))
217 .saturating_add(T::DbWeight::get().writes(10))
218 }
219}