Skip to content

Commit

Permalink
new weights
Browse files Browse the repository at this point in the history
  • Loading branch information
enthusiastmartin committed Oct 24, 2023
1 parent 7c8e50f commit 2981a3d
Showing 1 changed file with 86 additions and 44 deletions.
130 changes: 86 additions & 44 deletions runtime/hydradx/src/weights/omnipool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,25 @@
//! Autogenerated weights for pallet_omnipool
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-10-06, STEPS: 10, REPEAT: 30, LOW RANGE: [], HIGH RANGE: []
//! DATE: 2023-10-24, STEPS: 5, REPEAT: 20, LOW RANGE: [], HIGH RANGE: []
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024
// Executed Command:
// target/release/hydradx
// benchmark
// pallet
// --chain=dev
// --steps=10
// --repeat=30
// --pallet=pallet-omnipool
// --execution=wasm
// --wasm-execution=compiled
// --heap-pages=4096
// --template=.maintain/pallet-weight-template-no-back.hbs
// --pallet=pallet-omnipool
// --output=omnipool.rs
// --chain=dev
// --extrinsic=*
// --steps=5
// --repeat=20
// --output
// omnipool.rs
// --template
// .maintain/pallet-weight-template-no-back.hbs

#![allow(unused_parens)]
#![allow(unused_imports)]
Expand Down Expand Up @@ -73,8 +75,8 @@ impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
// Storage: Omnipool HubAssetTradability (r:0 w:1)
// Proof: Omnipool HubAssetTradability (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
fn initialize_pool() -> Weight {
// Minimum execution time: 149_531 nanoseconds.
Weight::from_ref_time(150_484_000 as u64)
// Minimum execution time: 142_482 nanoseconds.
Weight::from_ref_time(143_649_000 as u64)
.saturating_add(T::DbWeight::get().reads(11 as u64))
.saturating_add(T::DbWeight::get().writes(8 as u64))
}
Expand Down Expand Up @@ -105,8 +107,8 @@ impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
// Storage: Omnipool Positions (r:0 w:1)
// Proof: Omnipool Positions (max_values: None, max_size: Some(100), added: 2575, mode: MaxEncodedLen)
fn add_token() -> Weight {
// Minimum execution time: 148_641 nanoseconds.
Weight::from_ref_time(150_420_000 as u64)
// Minimum execution time: 150_622 nanoseconds.
Weight::from_ref_time(151_024_000 as u64)
.saturating_add(T::DbWeight::get().reads(15 as u64))
.saturating_add(T::DbWeight::get().writes(10 as u64))
}
Expand Down Expand Up @@ -149,8 +151,8 @@ impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
// Storage: Omnipool Positions (r:0 w:1)
// Proof: Omnipool Positions (max_values: None, max_size: Some(100), added: 2575, mode: MaxEncodedLen)
fn add_liquidity() -> Weight {
// Minimum execution time: 233_542 nanoseconds.
Weight::from_ref_time(235_489_000 as u64)
// Minimum execution time: 228_878 nanoseconds.
Weight::from_ref_time(235_865_000 as u64)
.saturating_add(T::DbWeight::get().reads(23 as u64))
.saturating_add(T::DbWeight::get().writes(14 as u64))
}
Expand Down Expand Up @@ -193,8 +195,8 @@ impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
// Storage: Uniques ItemPriceOf (r:0 w:1)
// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(113), added: 2588, mode: MaxEncodedLen)
fn remove_liquidity() -> Weight {
// Minimum execution time: 295_371 nanoseconds.
Weight::from_ref_time(297_465_000 as u64)
// Minimum execution time: 287_519 nanoseconds.
Weight::from_ref_time(288_641_000 as u64)
.saturating_add(T::DbWeight::get().reads(23 as u64))
.saturating_add(T::DbWeight::get().writes(16 as u64))
}
Expand Down Expand Up @@ -229,8 +231,8 @@ impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
// Storage: CircuitBreaker AllowedRemoveLiquidityAmountPerAsset (r:1 w:0)
// Proof: CircuitBreaker AllowedRemoveLiquidityAmountPerAsset (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
fn sell() -> Weight {
// Minimum execution time: 258_297 nanoseconds.
Weight::from_ref_time(260_217_000 as u64)
// Minimum execution time: 252_767 nanoseconds.
Weight::from_ref_time(254_421_000 as u64)
.saturating_add(T::DbWeight::get().reads(23 as u64))
.saturating_add(T::DbWeight::get().writes(14 as u64))
}
Expand Down Expand Up @@ -265,16 +267,16 @@ impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
// Storage: CircuitBreaker AllowedRemoveLiquidityAmountPerAsset (r:1 w:0)
// Proof: CircuitBreaker AllowedRemoveLiquidityAmountPerAsset (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
fn buy() -> Weight {
// Minimum execution time: 279_260 nanoseconds.
Weight::from_ref_time(280_777_000 as u64)
// Minimum execution time: 272_781 nanoseconds.
Weight::from_ref_time(274_844_000 as u64)
.saturating_add(T::DbWeight::get().reads(24 as u64))
.saturating_add(T::DbWeight::get().writes(15 as u64))
}
// Storage: Omnipool Assets (r:1 w:1)
// Proof: Omnipool Assets (max_values: None, max_size: Some(85), added: 2560, mode: MaxEncodedLen)
fn set_asset_tradable_state() -> Weight {
// Minimum execution time: 33_892 nanoseconds.
Weight::from_ref_time(34_292_000 as u64)
// Minimum execution time: 33_941 nanoseconds.
Weight::from_ref_time(34_430_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
Expand All @@ -291,8 +293,8 @@ impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
// Storage: MultiTransactionPayment AcceptedCurrencies (r:1 w:0)
// Proof: MultiTransactionPayment AcceptedCurrencies (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)
fn refund_refused_asset() -> Weight {
// Minimum execution time: 109_440 nanoseconds.
Weight::from_ref_time(110_207_000 as u64)
// Minimum execution time: 106_574 nanoseconds.
Weight::from_ref_time(107_433_000 as u64)
.saturating_add(T::DbWeight::get().reads(8 as u64))
.saturating_add(T::DbWeight::get().writes(5 as u64))
}
Expand All @@ -309,19 +311,65 @@ impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
// Storage: Uniques ItemPriceOf (r:0 w:1)
// Proof: Uniques ItemPriceOf (max_values: None, max_size: Some(113), added: 2588, mode: MaxEncodedLen)
fn sacrifice_position() -> Weight {
// Minimum execution time: 77_870 nanoseconds.
Weight::from_ref_time(78_533_000 as u64)
// Minimum execution time: 76_552 nanoseconds.
Weight::from_ref_time(77_448_000 as u64)
.saturating_add(T::DbWeight::get().reads(4 as u64))
.saturating_add(T::DbWeight::get().writes(6 as u64))
}
// Storage: Omnipool Assets (r:1 w:1)
// Proof: Omnipool Assets (max_values: None, max_size: Some(85), added: 2560, mode: MaxEncodedLen)
fn set_asset_weight_cap() -> Weight {
// Minimum execution time: 34_229 nanoseconds.
Weight::from_ref_time(34_689_000 as u64)
// Minimum execution time: 34_304 nanoseconds.
Weight::from_ref_time(34_615_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: Omnipool Assets (r:1 w:1)
// Proof: Omnipool Assets (max_values: None, max_size: Some(85), added: 2560, mode: MaxEncodedLen)
// Storage: Tokens Accounts (r:3 w:3)
// Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen)
// Storage: Omnipool HubAssetImbalance (r:1 w:1)
// Proof: Omnipool HubAssetImbalance (max_values: Some(1), max_size: Some(17), added: 512, mode: MaxEncodedLen)
// Storage: AssetRegistry Assets (r:2 w:0)
// Proof: AssetRegistry Assets (max_values: None, max_size: Some(87), added: 2562, mode: MaxEncodedLen)
// Storage: System Account (r:2 w:1)
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
// Storage: MultiTransactionPayment AccountCurrencyMap (r:1 w:0)
// Proof: MultiTransactionPayment AccountCurrencyMap (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
// Storage: MultiTransactionPayment AcceptedCurrencies (r:1 w:0)
// Proof: MultiTransactionPayment AcceptedCurrencies (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)
// Storage: Tokens TotalIssuance (r:1 w:1)
// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)
// Storage: EmaOracle Accumulator (r:1 w:1)
// Proof: EmaOracle Accumulator (max_values: Some(1), max_size: Some(5921), added: 6416, mode: MaxEncodedLen)
fn withdraw_protocol_liquidity() -> Weight {
// Minimum execution time: 160_117 nanoseconds.
Weight::from_ref_time(161_104_000 as u64)
.saturating_add(T::DbWeight::get().reads(13 as u64))
.saturating_add(T::DbWeight::get().writes(8 as u64))
}
// Storage: Omnipool Assets (r:1 w:1)
// Proof: Omnipool Assets (max_values: None, max_size: Some(85), added: 2560, mode: MaxEncodedLen)
// Storage: Tokens Accounts (r:4 w:3)
// Proof: Tokens Accounts (max_values: None, max_size: Some(108), added: 2583, mode: MaxEncodedLen)
// Storage: Omnipool HubAssetImbalance (r:1 w:1)
// Proof: Omnipool HubAssetImbalance (max_values: Some(1), max_size: Some(17), added: 512, mode: MaxEncodedLen)
// Storage: AssetRegistry Assets (r:2 w:0)
// Proof: AssetRegistry Assets (max_values: None, max_size: Some(87), added: 2562, mode: MaxEncodedLen)
// Storage: Tokens TotalIssuance (r:1 w:1)
// Proof: Tokens TotalIssuance (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)
// Storage: System Account (r:2 w:2)
// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
// Storage: MultiTransactionPayment AccountCurrencyMap (r:2 w:0)
// Proof: MultiTransactionPayment AccountCurrencyMap (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
// Storage: MultiTransactionPayment AcceptedCurrencies (r:1 w:0)
// Proof: MultiTransactionPayment AcceptedCurrencies (max_values: None, max_size: Some(28), added: 2503, mode: MaxEncodedLen)
fn remove_token() -> Weight {
// Minimum execution time: 158_937 nanoseconds.
Weight::from_ref_time(162_234_000 as u64)
.saturating_add(T::DbWeight::get().reads(14 as u64))
.saturating_add(T::DbWeight::get().writes(8 as u64))
}
// Storage: Omnipool Assets (r:3 w:3)
// Proof: Omnipool Assets (max_values: None, max_size: Some(85), added: 2560, mode: MaxEncodedLen)
// Storage: Tokens Accounts (r:4 w:4)
Expand Down Expand Up @@ -355,11 +403,11 @@ impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
/// The range of component `c` is `[0, 1]`.
/// The range of component `e` is `[0, 1]`.
fn router_execution_sell(c: u32, e: u32) -> Weight {
// Minimum execution time: 54_153 nanoseconds.
Weight::from_ref_time(40_444_373 as u64) // Standard Error: 79_703
.saturating_add(Weight::from_ref_time(14_755_626 as u64).saturating_mul(c as u64))
// Standard Error: 79_703
.saturating_add(Weight::from_ref_time(219_012_766 as u64).saturating_mul(e as u64))
// Minimum execution time: 53_821 nanoseconds.
Weight::from_ref_time(41_181_125 as u64) // Standard Error: 379_584
.saturating_add(Weight::from_ref_time(13_415_900 as u64).saturating_mul(c as u64))
// Standard Error: 379_584
.saturating_add(Weight::from_ref_time(214_332_825 as u64).saturating_mul(e as u64))
.saturating_add(T::DbWeight::get().reads(7 as u64))
.saturating_add(T::DbWeight::get().reads((16 as u64).saturating_mul(e as u64)))
.saturating_add(T::DbWeight::get().writes((14 as u64).saturating_mul(e as u64)))
Expand Down Expand Up @@ -396,19 +444,13 @@ impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
// Proof: CircuitBreaker AllowedRemoveLiquidityAmountPerAsset (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen)
/// The range of component `c` is `[1, 2]`.
/// The range of component `e` is `[0, 1]`.
fn router_execution_buy(c: u32, _e: u32) -> Weight {
// Minimum execution time: 277_855 nanoseconds.
Weight::from_ref_time(269_412_275 as u64) // Standard Error: 112_640
.saturating_add(Weight::from_ref_time(12_219_983 as u64).saturating_mul(c as u64))
fn router_execution_buy(c: u32, e: u32) -> Weight {
// Minimum execution time: 271_496 nanoseconds.
Weight::from_ref_time(266_903_925 as u64) // Standard Error: 491_298
.saturating_add(Weight::from_ref_time(9_205_000 as u64).saturating_mul(c as u64))
// Standard Error: 491_298
.saturating_add(Weight::from_ref_time(862_825 as u64).saturating_mul(e as u64))
.saturating_add(T::DbWeight::get().reads(24 as u64))
.saturating_add(T::DbWeight::get().writes(15 as u64))
}

fn remove_token() -> Weight {
Weight::zero()
}

fn withdraw_protocol_liquidity() -> Weight {
Weight::zero()
}
}

0 comments on commit 2981a3d

Please sign in to comment.