pallet_staking_async_parachain_runtime/weights/pallet_asset_conversion.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_conversion`
19//!
20//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21//! DATE: 2023-10-30, STEPS: `20`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22//! WORST CASE MAP SIZE: `1000000`
23//! HOSTNAME: `cob`, CPU: `<UNKNOWN>`
24//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("asset-hub-next-westend-dev")`, DB CACHE: 1024
25
26// Executed Command:
27// ./target/debug/polkadot-parachain
28// benchmark
29// pallet
30// --chain=asset-hub-next-westend-dev
31// --steps=20
32// --repeat=2
33// --pallet=pallet-asset-conversion
34// --extrinsic=*
35// --wasm-execution=compiled
36// --heap-pages=4096
37// --output=./cumulus/parachains/runtimes/assets/asset-hub-next-westend/src/weights/pallet_asset_conversion.rs
38
39#![cfg_attr(rustfmt, rustfmt_skip)]
40#![allow(unused_parens)]
41#![allow(unused_imports)]
42#![allow(missing_docs)]
43
44use frame_support::{traits::Get, weights::Weight};
45use core::marker::PhantomData;
46
47/// Weight functions for `pallet_asset_conversion`.
48pub struct WeightInfo<T>(PhantomData<T>);
49impl<T: frame_system::Config> pallet_asset_conversion::WeightInfo for WeightInfo<T> {
50 /// Storage: `AssetConversion::Pools` (r:1 w:1)
51 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`)
52 /// Storage: `System::Account` (r:1 w:1)
53 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
54 /// Storage: `ForeignAssets::Account` (r:1 w:1)
55 /// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
56 /// Storage: `ForeignAssets::Asset` (r:1 w:1)
57 /// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
58 /// Storage: `AssetConversion::NextPoolAssetId` (r:1 w:1)
59 /// Proof: `AssetConversion::NextPoolAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
60 /// Storage: `PoolAssets::Asset` (r:1 w:1)
61 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
62 /// Storage: `PoolAssets::Account` (r:1 w:1)
63 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
64 fn create_pool() -> Weight {
65 // Proof Size summary in bytes:
66 // Measured: `408`
67 // Estimated: `4689`
68 // Minimum execution time: 922_000_000 picoseconds.
69 Weight::from_parts(1_102_000_000, 0)
70 .saturating_add(Weight::from_parts(0, 4689))
71 .saturating_add(T::DbWeight::get().reads(7))
72 .saturating_add(T::DbWeight::get().writes(7))
73 }
74 /// Storage: `AssetConversion::Pools` (r:1 w:0)
75 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`)
76 /// Storage: `ForeignAssets::Asset` (r:1 w:1)
77 /// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
78 /// Storage: `ForeignAssets::Account` (r:2 w:2)
79 /// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
80 /// Storage: `System::Account` (r:1 w:1)
81 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
82 /// Storage: `PoolAssets::Asset` (r:1 w:1)
83 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
84 /// Storage: `PoolAssets::Account` (r:2 w:2)
85 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
86 fn add_liquidity() -> Weight {
87 // Proof Size summary in bytes:
88 // Measured: `1117`
89 // Estimated: `7404`
90 // Minimum execution time: 1_597_000_000 picoseconds.
91 Weight::from_parts(1_655_000_000, 0)
92 .saturating_add(Weight::from_parts(0, 7404))
93 .saturating_add(T::DbWeight::get().reads(8))
94 .saturating_add(T::DbWeight::get().writes(7))
95 }
96 /// Storage: `AssetConversion::Pools` (r:1 w:0)
97 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`)
98 /// Storage: `ForeignAssets::Asset` (r:1 w:1)
99 /// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
100 /// Storage: `ForeignAssets::Account` (r:2 w:2)
101 /// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
102 /// Storage: `System::Account` (r:1 w:1)
103 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
104 /// Storage: `PoolAssets::Asset` (r:1 w:1)
105 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
106 /// Storage: `PoolAssets::Account` (r:1 w:1)
107 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
108 fn remove_liquidity() -> Weight {
109 // Proof Size summary in bytes:
110 // Measured: `1106`
111 // Estimated: `7404`
112 // Minimum execution time: 1_500_000_000 picoseconds.
113 Weight::from_parts(1_633_000_000, 0)
114 .saturating_add(Weight::from_parts(0, 7404))
115 .saturating_add(T::DbWeight::get().reads(7))
116 .saturating_add(T::DbWeight::get().writes(6))
117 }
118 /// Storage: `ForeignAssets::Asset` (r:2 w:2)
119 /// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
120 /// Storage: `ForeignAssets::Account` (r:4 w:4)
121 /// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
122 /// Storage: `System::Account` (r:2 w:2)
123 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
124 /// The range of component `n` is `[2, 3]`.
125 fn swap_exact_tokens_for_tokens(n: u32, ) -> Weight {
126 // Proof Size summary in bytes:
127 // Measured: `0 + n * (557 ±0)`
128 // Estimated: `7404 + n * (393 ±92)`
129 // Minimum execution time: 930_000_000 picoseconds.
130 Weight::from_parts(960_000_000, 0)
131 .saturating_add(Weight::from_parts(0, 7404))
132 // Standard Error: 17_993_720
133 .saturating_add(Weight::from_parts(41_959_183, 0).saturating_mul(n.into()))
134 .saturating_add(T::DbWeight::get().reads(4))
135 .saturating_add(T::DbWeight::get().writes(4))
136 .saturating_add(Weight::from_parts(0, 393).saturating_mul(n.into()))
137 }
138 /// Storage: `System::Account` (r:2 w:2)
139 /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
140 /// Storage: `ForeignAssets::Asset` (r:2 w:2)
141 /// Proof: `ForeignAssets::Asset` (`max_values`: None, `max_size`: Some(808), added: 3283, mode: `MaxEncodedLen`)
142 /// Storage: `ForeignAssets::Account` (r:4 w:4)
143 /// Proof: `ForeignAssets::Account` (`max_values`: None, `max_size`: Some(732), added: 3207, mode: `MaxEncodedLen`)
144 /// The range of component `n` is `[2, 3]`.
145 fn swap_tokens_for_exact_tokens(n: u32, ) -> Weight {
146 // Proof Size summary in bytes:
147 // Measured: `0 + n * (557 ±0)`
148 // Estimated: `7404 + n * (393 ±92)`
149 // Minimum execution time: 940_000_000 picoseconds.
150 Weight::from_parts(956_000_000, 0)
151 .saturating_add(Weight::from_parts(0, 7404))
152 // Standard Error: 15_746_647
153 .saturating_add(Weight::from_parts(39_193_877, 0).saturating_mul(n.into()))
154 .saturating_add(T::DbWeight::get().reads(4))
155 .saturating_add(T::DbWeight::get().writes(4))
156 .saturating_add(Weight::from_parts(0, 393).saturating_mul(n.into()))
157 }
158 /// Storage: `AssetConversion::Pools` (r:1 w:0)
159 /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`)
160 /// Storage: `Assets::Asset` (r:2 w:2)
161 /// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
162 /// Storage: `Assets::Account` (r:2 w:2)
163 /// Proof: `Assets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
164 /// Storage: `PoolAssets::Asset` (r:1 w:1)
165 /// Proof: `PoolAssets::Asset` (`max_values`: None, `max_size`: Some(210), added: 2685, mode: `MaxEncodedLen`)
166 /// Storage: `PoolAssets::Account` (r:1 w:1)
167 /// Proof: `PoolAssets::Account` (`max_values`: None, `max_size`: Some(134), added: 2609, mode: `MaxEncodedLen`)
168 /// The range of component `n` is `[0, 3]`.
169 fn touch(n: u32, ) -> Weight {
170 // Proof Size summary in bytes:
171 // Measured: `1571`
172 // Estimated: `6360`
173 // Minimum execution time: 381_000_000 picoseconds.
174 Weight::from_parts(398_540_909, 6360)
175 // Standard Error: 1_330_283
176 .saturating_add(Weight::from_parts(209_463_636, 0).saturating_mul(n.into()))
177 .saturating_add(T::DbWeight::get().reads(7_u64))
178 .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into())))
179 }
180}