From 2981a3d1c96112ead76d70c2f42275a702df9245 Mon Sep 17 00:00:00 2001 From: Martin Hloska Date: Tue, 24 Oct 2023 08:34:05 +0200 Subject: [PATCH] new weights --- runtime/hydradx/src/weights/omnipool.rs | 130 ++++++++++++++++-------- 1 file changed, 86 insertions(+), 44 deletions(-) diff --git a/runtime/hydradx/src/weights/omnipool.rs b/runtime/hydradx/src/weights/omnipool.rs index 3b0ed4991..cb121c187 100644 --- a/runtime/hydradx/src/weights/omnipool.rs +++ b/runtime/hydradx/src/weights/omnipool.rs @@ -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)] @@ -73,8 +75,8 @@ impl WeightInfo for HydraWeight { // 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)) } @@ -105,8 +107,8 @@ impl WeightInfo for HydraWeight { // 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)) } @@ -149,8 +151,8 @@ impl WeightInfo for HydraWeight { // 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)) } @@ -193,8 +195,8 @@ impl WeightInfo for HydraWeight { // 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)) } @@ -229,8 +231,8 @@ impl WeightInfo for HydraWeight { // 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)) } @@ -265,16 +267,16 @@ impl WeightInfo for HydraWeight { // 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)) } @@ -291,8 +293,8 @@ impl WeightInfo for HydraWeight { // 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)) } @@ -309,19 +311,65 @@ impl WeightInfo for HydraWeight { // 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) @@ -355,11 +403,11 @@ impl WeightInfo for HydraWeight { /// 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))) @@ -396,19 +444,13 @@ impl WeightInfo for HydraWeight { // 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() - } }