From 2607b918475af2d040a5941b9d01b0bebad3bdd6 Mon Sep 17 00:00:00 2001 From: hydra-bench-bot Date: Mon, 18 Jan 2021 11:38:43 +0000 Subject: [PATCH 1/5] Weights update for transaction_multi_payment pallet --- pallets/transaction-multi-payment/src/weights.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pallets/transaction-multi-payment/src/weights.rs b/pallets/transaction-multi-payment/src/weights.rs index d64ce7f20..83d90c28f 100644 --- a/pallets/transaction-multi-payment/src/weights.rs +++ b/pallets/transaction-multi-payment/src/weights.rs @@ -35,14 +35,12 @@ // --output=weights.rs // --template=.maintain/pallet-weight-template.hbs + #![allow(unused_parens)] #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{ - traits::Get, - weights::{constants::RocksDbWeight, Weight}, -}; +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use sp_std::marker::PhantomData; /// Weight functions needed for transaction_multi_payment. From a18c8a46ff6e93067eb9f134f4f9bc00be5822a0 Mon Sep 17 00:00:00 2001 From: hydra-bench-bot Date: Thu, 18 Mar 2021 07:40:33 +0000 Subject: [PATCH 2/5] Weights update for amm pallet --- pallets/amm/src/weights.rs | 119 +++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 59 deletions(-) diff --git a/pallets/amm/src/weights.rs b/pallets/amm/src/weights.rs index bf6aaf3c8..d064f3fa9 100644 --- a/pallets/amm/src/weights.rs +++ b/pallets/amm/src/weights.rs @@ -17,8 +17,8 @@ //! Autogenerated weights for amm //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0 -//! DATE: 2021-03-03, STEPS: [5, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 +//! DATE: 2021-03-18, STEPS: [5, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 // Executed Command: @@ -40,75 +40,76 @@ #![allow(clippy::unnecessary_cast)] use frame_support::{ - traits::Get, - weights::{constants::RocksDbWeight, Weight}, + traits::Get, + weights::{constants::RocksDbWeight, Weight}, }; use sp_std::marker::PhantomData; /// Weight functions needed for amm. pub trait WeightInfo { - fn create_pool() -> Weight; - fn add_liquidity() -> Weight; - fn remove_liquidity() -> Weight; - fn sell() -> Weight; - fn buy() -> Weight; + fn create_pool() -> Weight; + fn add_liquidity() -> Weight; + fn remove_liquidity() -> Weight; + fn sell() -> Weight; + fn buy() -> Weight; } /// Weights for amm using the hydraDX node and recommended hardware. pub struct HydraWeight(PhantomData); + impl WeightInfo for HydraWeight { - fn create_pool() -> Weight { - (250_200_000 as Weight) - .saturating_add(T::DbWeight::get().reads(11 as Weight)) - .saturating_add(T::DbWeight::get().writes(13 as Weight)) - } - fn add_liquidity() -> Weight { - (239_134_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) - } - fn remove_liquidity() -> Weight { - (240_260_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) - } - fn sell() -> Weight { - (169_053_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn buy() -> Weight { - (168_649_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } + fn create_pool() -> Weight { + (189_645_000 as Weight) + .saturating_add(T::DbWeight::get().reads(11 as Weight)) + .saturating_add(T::DbWeight::get().writes(13 as Weight)) + } + fn add_liquidity() -> Weight { + (171_602_000 as Weight) + .saturating_add(T::DbWeight::get().reads(9 as Weight)) + .saturating_add(T::DbWeight::get().writes(8 as Weight)) + } + fn remove_liquidity() -> Weight { + (170_846_000 as Weight) + .saturating_add(T::DbWeight::get().reads(8 as Weight)) + .saturating_add(T::DbWeight::get().writes(7 as Weight)) + } + fn sell() -> Weight { + (122_125_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn buy() -> Weight { + (121_289_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn create_pool() -> Weight { - (250_200_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(11 as Weight)) - .saturating_add(RocksDbWeight::get().writes(13 as Weight)) - } - fn add_liquidity() -> Weight { - (239_134_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(9 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) - } - fn remove_liquidity() -> Weight { - (240_260_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) - } - fn sell() -> Weight { - (169_053_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - fn buy() -> Weight { - (168_649_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } + fn create_pool() -> Weight { + (189_645_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(11 as Weight)) + .saturating_add(RocksDbWeight::get().writes(13 as Weight)) + } + fn add_liquidity() -> Weight { + (171_602_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(9 as Weight)) + .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + } + fn remove_liquidity() -> Weight { + (170_846_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(8 as Weight)) + .saturating_add(RocksDbWeight::get().writes(7 as Weight)) + } + fn sell() -> Weight { + (122_125_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(5 as Weight)) + .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + } + fn buy() -> Weight { + (121_289_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(5 as Weight)) + .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + } } From 5d310dd59062de4407866439d9b95fac32d9c5d7 Mon Sep 17 00:00:00 2001 From: hydra-bench-bot Date: Thu, 18 Mar 2021 07:46:43 +0000 Subject: [PATCH 3/5] Weights update for exchange pallet --- pallets/exchange/src/weights.rs | 271 ++++++++++++++++---------------- 1 file changed, 137 insertions(+), 134 deletions(-) diff --git a/pallets/exchange/src/weights.rs b/pallets/exchange/src/weights.rs index fcc8f5491..18c769f4e 100644 --- a/pallets/exchange/src/weights.rs +++ b/pallets/exchange/src/weights.rs @@ -17,8 +17,8 @@ //! Autogenerated weights for exchange //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0 -//! DATE: 2021-03-03, STEPS: [5, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 +//! DATE: 2021-03-18, STEPS: [5, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 // Executed Command: @@ -40,150 +40,153 @@ #![allow(clippy::unnecessary_cast)] use frame_support::{ - traits::Get, - weights::{constants::RocksDbWeight, Weight}, + traits::Get, + weights::{constants::RocksDbWeight, Weight}, }; use sp_std::marker::PhantomData; /// Weight functions needed for exchange. pub trait WeightInfo { - fn known_overhead_for_on_finalize() -> Weight; - fn sell_intention() -> Weight; - fn buy_intention() -> Weight; - fn on_finalize(t: u32) -> Weight; - fn on_finalize_buys_no_matches(t: u32) -> Weight; - fn on_finalize_sells_no_matches(t: u32) -> Weight; - fn sell_extrinsic() -> Weight; - fn on_finalize_for_one_sell_extrinsic() -> Weight; - fn buy_extrinsic() -> Weight; - fn on_finalize_for_one_buy_extrinsic() -> Weight; + fn known_overhead_for_on_finalize() -> Weight; + fn sell_intention() -> Weight; + fn buy_intention() -> Weight; + fn on_finalize(t: u32, ) -> Weight; + fn on_finalize_buys_no_matches(t: u32, ) -> Weight; + fn on_finalize_sells_no_matches(t: u32, ) -> Weight; + fn sell_extrinsic() -> Weight; + fn on_finalize_for_one_sell_extrinsic() -> Weight; + fn buy_extrinsic() -> Weight; + fn on_finalize_for_one_buy_extrinsic() -> Weight; } /// Weights for exchange using the hydraDX node and recommended hardware. pub struct HydraWeight(PhantomData); + impl WeightInfo for HydraWeight { - fn known_overhead_for_on_finalize() -> Weight { - (14_283_000 as Weight).saturating_add(T::DbWeight::get().reads(1 as Weight)) - } - fn sell_intention() -> Weight { - (132_316_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - fn buy_intention() -> Weight { - (131_863_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - fn on_finalize(t: u32) -> Weight { - (0 as Weight) - // Standard Error: 91_000 - .saturating_add((168_120_000 as Weight).saturating_mul(t as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(t as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(t as Weight))) - } - fn on_finalize_buys_no_matches(t: u32) -> Weight { - (8_505_000 as Weight) - // Standard Error: 92_000 - .saturating_add((190_583_000 as Weight).saturating_mul(t as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(t as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(t as Weight))) - } - fn on_finalize_sells_no_matches(t: u32) -> Weight { - (16_195_000 as Weight) - // Standard Error: 44_000 - .saturating_add((166_063_000 as Weight).saturating_mul(t as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(t as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(t as Weight))) - } - fn sell_extrinsic() -> Weight { - (177_280_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn on_finalize_for_one_sell_extrinsic() -> Weight { - (232_319_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) - } - fn buy_extrinsic() -> Weight { - (176_376_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn on_finalize_for_one_buy_extrinsic() -> Weight { - (257_266_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) - } + fn known_overhead_for_on_finalize() -> Weight { + (11_782_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + } + fn sell_intention() -> Weight { + (109_767_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + fn buy_intention() -> Weight { + (112_747_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + } + fn on_finalize(t: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 100_000 + .saturating_add((110_967_000 as Weight).saturating_mul(t as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(t as Weight))) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(t as Weight))) + } + fn on_finalize_buys_no_matches(t: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 79_000 + .saturating_add((125_236_000 as Weight).saturating_mul(t as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(t as Weight))) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(t as Weight))) + } + fn on_finalize_sells_no_matches(t: u32, ) -> Weight { + (8_528_000 as Weight) + // Standard Error: 84_000 + .saturating_add((109_453_000 as Weight).saturating_mul(t as Weight)) + .saturating_add(T::DbWeight::get().reads(4 as Weight)) + .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(t as Weight))) + .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(t as Weight))) + } + fn sell_extrinsic() -> Weight { + (121_370_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn on_finalize_for_one_sell_extrinsic() -> Weight { + (163_828_000 as Weight) + .saturating_add(T::DbWeight::get().reads(9 as Weight)) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) + } + fn buy_extrinsic() -> Weight { + (120_942_000 as Weight) + .saturating_add(T::DbWeight::get().reads(5 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn on_finalize_for_one_buy_extrinsic() -> Weight { + (179_585_000 as Weight) + .saturating_add(T::DbWeight::get().reads(9 as Weight)) + .saturating_add(T::DbWeight::get().writes(6 as Weight)) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn known_overhead_for_on_finalize() -> Weight { - (14_283_000 as Weight).saturating_add(RocksDbWeight::get().reads(1 as Weight)) - } - fn sell_intention() -> Weight { - (132_316_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - fn buy_intention() -> Weight { - (131_863_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - } - fn on_finalize(t: u32) -> Weight { - (0 as Weight) - // Standard Error: 91_000 - .saturating_add((168_120_000 as Weight).saturating_mul(t as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(t as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(t as Weight))) - } - fn on_finalize_buys_no_matches(t: u32) -> Weight { - (8_505_000 as Weight) - // Standard Error: 92_000 - .saturating_add((190_583_000 as Weight).saturating_mul(t as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(t as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(t as Weight))) - } - fn on_finalize_sells_no_matches(t: u32) -> Weight { - (16_195_000 as Weight) - // Standard Error: 44_000 - .saturating_add((166_063_000 as Weight).saturating_mul(t as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(t as Weight))) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(t as Weight))) - } - fn sell_extrinsic() -> Weight { - (177_280_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - fn on_finalize_for_one_sell_extrinsic() -> Weight { - (232_319_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(9 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) - } - fn buy_extrinsic() -> Weight { - (176_376_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - fn on_finalize_for_one_buy_extrinsic() -> Weight { - (257_266_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(9 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) - } + fn known_overhead_for_on_finalize() -> Weight { + (11_782_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + } + fn sell_intention() -> Weight { + (109_767_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(6 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + } + fn buy_intention() -> Weight { + (112_747_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(6 as Weight)) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + } + fn on_finalize(t: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 100_000 + .saturating_add((110_967_000 as Weight).saturating_mul(t as Weight)) + .saturating_add(RocksDbWeight::get().reads(4 as Weight)) + .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(t as Weight))) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(t as Weight))) + } + fn on_finalize_buys_no_matches(t: u32, ) -> Weight { + (0 as Weight) + // Standard Error: 79_000 + .saturating_add((125_236_000 as Weight).saturating_mul(t as Weight)) + .saturating_add(RocksDbWeight::get().reads(4 as Weight)) + .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(t as Weight))) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(t as Weight))) + } + fn on_finalize_sells_no_matches(t: u32, ) -> Weight { + (8_528_000 as Weight) + // Standard Error: 84_000 + .saturating_add((109_453_000 as Weight).saturating_mul(t as Weight)) + .saturating_add(RocksDbWeight::get().reads(4 as Weight)) + .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(t as Weight))) + .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(t as Weight))) + } + fn sell_extrinsic() -> Weight { + (121_370_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(5 as Weight)) + .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + } + fn on_finalize_for_one_sell_extrinsic() -> Weight { + (163_828_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(9 as Weight)) + .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + } + fn buy_extrinsic() -> Weight { + (120_942_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(5 as Weight)) + .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + } + fn on_finalize_for_one_buy_extrinsic() -> Weight { + (179_585_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(9 as Weight)) + .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + } } From 58ba308d06753f4fa13daea6272059eaab3b29b7 Mon Sep 17 00:00:00 2001 From: hydra-bench-bot Date: Thu, 18 Mar 2021 07:51:42 +0000 Subject: [PATCH 4/5] Weights update for transaction_multi_payment pallet --- .../transaction-multi-payment/src/weights.rs | 143 +++++++++--------- 1 file changed, 73 insertions(+), 70 deletions(-) diff --git a/pallets/transaction-multi-payment/src/weights.rs b/pallets/transaction-multi-payment/src/weights.rs index 83d90c28f..1691cb8db 100644 --- a/pallets/transaction-multi-payment/src/weights.rs +++ b/pallets/transaction-multi-payment/src/weights.rs @@ -17,8 +17,8 @@ //! Autogenerated weights for transaction_multi_payment //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0 -//! DATE: 2021-03-03, STEPS: [5, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0 +//! DATE: 2021-03-18, STEPS: [5, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 // Executed Command: @@ -35,89 +35,92 @@ // --output=weights.rs // --template=.maintain/pallet-weight-template.hbs - #![allow(unused_parens)] #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use frame_support::{ + traits::Get, + weights::{constants::RocksDbWeight, Weight}, +}; use sp_std::marker::PhantomData; /// Weight functions needed for transaction_multi_payment. pub trait WeightInfo { - fn swap_currency() -> Weight; - fn set_currency() -> Weight; - fn add_currency() -> Weight; - fn remove_currency() -> Weight; - fn add_member() -> Weight; - fn remove_member() -> Weight; + fn swap_currency() -> Weight; + fn set_currency() -> Weight; + fn add_currency() -> Weight; + fn remove_currency() -> Weight; + fn add_member() -> Weight; + fn remove_member() -> Weight; } /// Weights for transaction_multi_payment using the hydraDX node and recommended hardware. pub struct HydraWeight(PhantomData); + impl WeightInfo for HydraWeight { - fn swap_currency() -> Weight { - (176_475_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - fn set_currency() -> Weight { - (44_552_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn add_currency() -> Weight { - (34_724_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn remove_currency() -> Weight { - (35_529_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn add_member() -> Weight { - (30_411_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - fn remove_member() -> Weight { - (33_172_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + fn swap_currency() -> Weight { + (132_983_000 as Weight) + .saturating_add(T::DbWeight::get().reads(6 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) + } + fn set_currency() -> Weight { + (34_622_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn add_currency() -> Weight { + (26_292_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn remove_currency() -> Weight { + (26_232_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn add_member() -> Weight { + (23_021_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + fn remove_member() -> Weight { + (24_963_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } } // For backwards compatibility and tests impl WeightInfo for () { - fn swap_currency() -> Weight { - (176_475_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - } - fn set_currency() -> Weight { - (44_552_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - fn add_currency() -> Weight { - (34_724_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - fn remove_currency() -> Weight { - (35_529_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - fn add_member() -> Weight { - (30_411_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } - fn remove_member() -> Weight { - (33_172_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - } + fn swap_currency() -> Weight { + (132_983_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(6 as Weight)) + .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + } + fn set_currency() -> Weight { + (34_622_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } + fn add_currency() -> Weight { + (26_292_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } + fn remove_currency() -> Weight { + (26_232_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(2 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } + fn add_member() -> Weight { + (23_021_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } + fn remove_member() -> Weight { + (24_963_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } } From 75412a518a93b4e979ad2bc30525497e9120feed Mon Sep 17 00:00:00 2001 From: Martin Hloska Date: Thu, 18 Mar 2021 09:20:36 +0100 Subject: [PATCH 5/5] fix: regenerate reference valeus for performance check --- .maintain/bench-check/hydradx-bench-data.json | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.maintain/bench-check/hydradx-bench-data.json b/.maintain/bench-check/hydradx-bench-data.json index 933159f81..af3ba31dc 100644 --- a/.maintain/bench-check/hydradx-bench-data.json +++ b/.maintain/bench-check/hydradx-bench-data.json @@ -1,23 +1,23 @@ { "amm": { - "create_pool": 250.0, - "add_liquidity": 239.0, - "remove_liquidity": 240.0, - "sell": 169.0, - "buy": 168.0 + "create_pool": 189.0, + "add_liquidity": 171.0, + "remove_liquidity": 170.0, + "sell": 122.0, + "buy": 121.0 }, "exchange": { - "sell_intention": 132.0, - "buy_intention": 131.0, - "sell_extrinsic": 177.0, - "on_finalize_for_one_sell_extrinsic": 232.0, - "buy_extrinsic": 176.0, - "on_finalize_for_one_buy_extrinsic": 257.0 + "sell_intention": 109.0, + "buy_intention": 112.0, + "sell_extrinsic": 121.0, + "on_finalize_for_one_sell_extrinsic": 163.0, + "buy_extrinsic": 120.0, + "on_finalize_for_one_buy_extrinsic": 179.0 }, "transaction_multi_payment": { - "swap_currency": 176.0, - "set_currency": 44.0, - "add_currency": 34.0, - "remove_currency": 35.0 + "swap_currency": 132.0, + "set_currency": 34.0, + "add_currency": 26.0, + "remove_currency": 26.0 } } \ No newline at end of file