pallet_staking_async_parachain_runtime/weights/pallet_asset_rewards.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_rewards`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
21//! DATE: 2025-01-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `runner-ys-ssygq-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
24//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-next-westend-dev")`, DB CACHE: 1024
25
26// Executed Command:
27// target/production/polkadot-parachain
28// benchmark
29// pallet
30// --steps=50
31// --repeat=20
32// --extrinsic=*
33// --wasm-execution=compiled
34// --heap-pages=4096
35// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
36// --pallet=pallet_asset_rewards
37// --chain=asset-hub-next-westend-dev
38// --header=./cumulus/file_header.txt
39// --output=./cumulus/parachains/runtimes/assets/asset-hub-next-westend/src/weights/
40
41#![cfg_attr(rustfmt, rustfmt_skip)]
42#![allow(unused_parens)]
43#![allow(unused_imports)]
44#![allow(missing_docs)]
45
46use frame_support::{traits::Get, weights::Weight};
47use core::marker::PhantomData;
48
49/// Weight functions for `pallet_asset_rewards`.
50pub struct WeightInfo<T>(PhantomData<T>);
51impl<T: frame_system::Config> pallet_asset_rewards::WeightInfo for WeightInfo<T> {
52 /// Storage: `Assets::Asset` (r:2 w:0)
53 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
54 /// Storage: `AssetRewards::NextPoolId` (r:1 w:1)
55 /// Proof: `AssetRewards::NextPoolId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
56 /// Storage: `System::Account` (r:1 w:1)
57 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
58 /// Storage: `Balances::Holds` (r:1 w:1)
59 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)
60 /// Storage: `AssetRewards::PoolCost` (r:0 w:1)
61 /// Proof: `AssetRewards::PoolCost` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
62 /// Storage: `AssetRewards::Pools` (r:0 w:1)
63 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
64 fn create_pool() -> Weight {
65 // Proof Size summary in bytes:
66 // Measured: `392`
67 // Estimated: `6360`
68 // Minimum execution time: 60_734_000 picoseconds.
69 Weight::from_parts(61_828_000, 0)
70 .saturating_add(Weight::from_parts(0, 6360))
71 .saturating_add(T::DbWeight::get().reads(5))
72 .saturating_add(T::DbWeight::get().writes(5))
73 }
74 /// Storage: `AssetRewards::Pools` (r:1 w:1)
75 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
76 /// Storage: `AssetRewards::PoolStakers` (r:1 w:1)
77 /// Proof: `AssetRewards::PoolStakers` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
78 /// Storage: `AssetsFreezer::Freezes` (r:1 w:1)
79 /// Proof: `AssetsFreezer::Freezes` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`)
80 /// Storage: `Assets::Account` (r:1 w:0)
81 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
82 /// Storage: `AssetsFreezer::FrozenBalances` (r:1 w:1)
83 /// Proof: `AssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
84 fn stake() -> Weight {
85 // Proof Size summary in bytes:
86 // Measured: `906`
87 // Estimated: `4809`
88 // Minimum execution time: 56_014_000 picoseconds.
89 Weight::from_parts(58_487_000, 0)
90 .saturating_add(Weight::from_parts(0, 4809))
91 .saturating_add(T::DbWeight::get().reads(5))
92 .saturating_add(T::DbWeight::get().writes(4))
93 }
94 /// Storage: `AssetRewards::Pools` (r:1 w:1)
95 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
96 /// Storage: `AssetRewards::PoolStakers` (r:1 w:1)
97 /// Proof: `AssetRewards::PoolStakers` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
98 /// Storage: `AssetsFreezer::Freezes` (r:1 w:1)
99 /// Proof: `AssetsFreezer::Freezes` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`)
100 /// Storage: `Assets::Account` (r:1 w:0)
101 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
102 /// Storage: `AssetsFreezer::FrozenBalances` (r:1 w:1)
103 /// Proof: `AssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
104 fn unstake() -> Weight {
105 // Proof Size summary in bytes:
106 // Measured: `906`
107 // Estimated: `4809`
108 // Minimum execution time: 59_071_000 picoseconds.
109 Weight::from_parts(60_631_000, 0)
110 .saturating_add(Weight::from_parts(0, 4809))
111 .saturating_add(T::DbWeight::get().reads(5))
112 .saturating_add(T::DbWeight::get().writes(4))
113 }
114 /// Storage: `AssetRewards::Pools` (r:1 w:0)
115 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
116 /// Storage: `AssetRewards::PoolStakers` (r:1 w:1)
117 /// Proof: `AssetRewards::PoolStakers` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
118 /// Storage: `Assets::Asset` (r:1 w:1)
119 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
120 /// Storage: `Assets::Account` (r:2 w:2)
121 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
122 /// Storage: `AssetsFreezer::FrozenBalances` (r:1 w:0)
123 /// Proof: `AssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
124 fn harvest_rewards() -> Weight {
125 // Proof Size summary in bytes:
126 // Measured: `1106`
127 // Estimated: `6208`
128 // Minimum execution time: 80_585_000 picoseconds.
129 Weight::from_parts(82_186_000, 0)
130 .saturating_add(Weight::from_parts(0, 6208))
131 .saturating_add(T::DbWeight::get().reads(6))
132 .saturating_add(T::DbWeight::get().writes(4))
133 }
134 /// Storage: `AssetRewards::Pools` (r:1 w:1)
135 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
136 fn set_pool_reward_rate_per_block() -> Weight {
137 // Proof Size summary in bytes:
138 // Measured: `318`
139 // Estimated: `4809`
140 // Minimum execution time: 17_083_000 picoseconds.
141 Weight::from_parts(17_816_000, 0)
142 .saturating_add(Weight::from_parts(0, 4809))
143 .saturating_add(T::DbWeight::get().reads(1))
144 .saturating_add(T::DbWeight::get().writes(1))
145 }
146 /// Storage: `AssetRewards::Pools` (r:1 w:1)
147 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
148 fn set_pool_admin() -> Weight {
149 // Proof Size summary in bytes:
150 // Measured: `318`
151 // Estimated: `4809`
152 // Minimum execution time: 15_269_000 picoseconds.
153 Weight::from_parts(15_881_000, 0)
154 .saturating_add(Weight::from_parts(0, 4809))
155 .saturating_add(T::DbWeight::get().reads(1))
156 .saturating_add(T::DbWeight::get().writes(1))
157 }
158 /// Storage: `AssetRewards::Pools` (r:1 w:1)
159 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
160 fn set_pool_expiry_block() -> Weight {
161 // Proof Size summary in bytes:
162 // Measured: `318`
163 // Estimated: `4809`
164 // Minimum execution time: 17_482_000 picoseconds.
165 Weight::from_parts(18_124_000, 0)
166 .saturating_add(Weight::from_parts(0, 4809))
167 .saturating_add(T::DbWeight::get().reads(1))
168 .saturating_add(T::DbWeight::get().writes(1))
169 }
170 /// Storage: `AssetRewards::Pools` (r:1 w:0)
171 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
172 /// Storage: `Assets::Asset` (r:1 w:1)
173 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
174 /// Storage: `Assets::Account` (r:2 w:2)
175 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
176 /// Storage: `AssetsFreezer::FrozenBalances` (r:1 w:0)
177 /// Proof: `AssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
178 /// Storage: `System::Account` (r:1 w:1)
179 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
180 fn deposit_reward_tokens() -> Weight {
181 // Proof Size summary in bytes:
182 // Measured: `781`
183 // Estimated: `6208`
184 // Minimum execution time: 66_644_000 picoseconds.
185 Weight::from_parts(67_950_000, 0)
186 .saturating_add(Weight::from_parts(0, 6208))
187 .saturating_add(T::DbWeight::get().reads(6))
188 .saturating_add(T::DbWeight::get().writes(4))
189 }
190 /// Storage: `AssetRewards::Pools` (r:1 w:1)
191 /// Proof: `AssetRewards::Pools` (`max_values`: None, `max_size`: Some(1344), added: 3819, mode: `MaxEncodedLen`)
192 /// Storage: `AssetRewards::PoolStakers` (r:1 w:0)
193 /// Proof: `AssetRewards::PoolStakers` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`)
194 /// Storage: `Assets::Asset` (r:1 w:1)
195 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
196 /// Storage: `Assets::Account` (r:2 w:2)
197 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
198 /// Storage: `AssetsFreezer::FrozenBalances` (r:1 w:1)
199 /// Proof: `AssetsFreezer::FrozenBalances` (`max_values`: None, `max_size`: Some(84), added: 2559, mode: `MaxEncodedLen`)
200 /// Storage: `System::Account` (r:2 w:2)
201 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
202 /// Storage: `AssetRewards::PoolCost` (r:1 w:1)
203 /// Proof: `AssetRewards::PoolCost` (`max_values`: None, `max_size`: Some(68), added: 2543, mode: `MaxEncodedLen`)
204 /// Storage: `Balances::Holds` (r:1 w:1)
205 /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(157), added: 2632, mode: `MaxEncodedLen`)
206 /// Storage: `AssetsFreezer::Freezes` (r:0 w:1)
207 /// Proof: `AssetsFreezer::Freezes` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`)
208 fn cleanup_pool() -> Weight {
209 // Proof Size summary in bytes:
210 // Measured: `1139`
211 // Estimated: `6208`
212 // Minimum execution time: 124_136_000 picoseconds.
213 Weight::from_parts(128_642_000, 0)
214 .saturating_add(Weight::from_parts(0, 6208))
215 .saturating_add(T::DbWeight::get().reads(10))
216 .saturating_add(T::DbWeight::get().writes(10))
217 }
218}