Skip to content

Commit

Permalink
rebenchmark dca and otc-settlements
Browse files Browse the repository at this point in the history
  • Loading branch information
Roznovjak committed Jun 20, 2024
1 parent 1bce5dc commit 19ae17b
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 71 deletions.
33 changes: 17 additions & 16 deletions pallets/dca/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.


//! Autogenerated weights for `pallet_dca`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-05-24, STEPS: `10`, REPEAT: `30`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-06-20, STEPS: `10`, REPEAT: `30`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
Expand All @@ -36,7 +37,6 @@
// --pallet=pallet-dca
// --output=weights/dca.rs
// --extrinsic=*
// --extra

#![allow(unused_parens)]
#![allow(unused_imports)]
Expand Down Expand Up @@ -73,10 +73,10 @@ impl WeightInfo for () {
/// Proof: `DCA::RetriesOnError` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`)
fn on_initialize_with_buy_trade() -> Weight {
// Proof Size summary in bytes:
// Measured: `54485`
// Measured: `54523`
// Estimated: `31902`
// Minimum execution time: 207_153_000 picoseconds.
Weight::from_parts(209_471_000, 31902)
// Minimum execution time: 207_400_000 picoseconds.
Weight::from_parts(211_361_000, 31902)
.saturating_add(RocksDbWeight::get().reads(17_u64))
.saturating_add(RocksDbWeight::get().writes(7_u64))
}
Expand All @@ -94,10 +94,10 @@ impl WeightInfo for () {
/// Proof: `DCA::RetriesOnError` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`)
fn on_initialize_with_sell_trade() -> Weight {
// Proof Size summary in bytes:
// Measured: `54593`
// Measured: `54631`
// Estimated: `31902`
// Minimum execution time: 206_729_000 picoseconds.
Weight::from_parts(210_115_000, 31902)
// Minimum execution time: 209_659_000 picoseconds.
Weight::from_parts(213_448_000, 31902)
.saturating_add(RocksDbWeight::get().reads(17_u64))
.saturating_add(RocksDbWeight::get().writes(7_u64))
}
Expand All @@ -107,8 +107,9 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `1113`
// Estimated: `3566`
// Minimum execution time: 14_273_000 picoseconds.
Weight::from_parts(14_864_000, 3566).saturating_add(RocksDbWeight::get().reads(1_u64))
// Minimum execution time: 14_992_000 picoseconds.
Weight::from_parts(15_296_000, 3566)
.saturating_add(RocksDbWeight::get().reads(1_u64))
}
/// Storage: `MultiTransactionPayment::AcceptedCurrencies` (r:1 w:0)
/// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
Expand All @@ -134,10 +135,10 @@ impl WeightInfo for () {
/// Proof: `DCA::RemainingAmounts` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
fn schedule() -> Weight {
// Proof Size summary in bytes:
// Measured: `52618`
// Measured: `52656`
// Estimated: `29326`
// Minimum execution time: 153_135_000 picoseconds.
Weight::from_parts(155_526_000, 29326)
// Minimum execution time: 152_493_000 picoseconds.
Weight::from_parts(155_888_000, 29326)
.saturating_add(RocksDbWeight::get().reads(17_u64))
.saturating_add(RocksDbWeight::get().writes(8_u64))
}
Expand All @@ -157,10 +158,10 @@ impl WeightInfo for () {
/// Proof: `DCA::ScheduleOwnership` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`)
fn terminate() -> Weight {
// Proof Size summary in bytes:
// Measured: `2492`
// Measured: `2530`
// Estimated: `4714`
// Minimum execution time: 70_794_000 picoseconds.
Weight::from_parts(71_685_000, 4714)
// Minimum execution time: 71_135_000 picoseconds.
Weight::from_parts(71_902_000, 4714)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(7_u64))
}
Expand Down
37 changes: 7 additions & 30 deletions pallets/otc-settlements/src/weights.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// This file is part of HydraDX.

// Copyright (C) 2020-2023 Intergalactic, Limited (GIB).
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -15,10 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.


//! Autogenerated weights for `pallet_otc_settlements`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-05-29, STEPS: `10`, REPEAT: `30`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-06-20, STEPS: `10`, REPEAT: `30`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
Expand All @@ -32,10 +30,10 @@
// --repeat=30
// --wasm-execution=compiled
// --heap-pages=4096
// --template=.maintain/pallet-weight-template.hbs
// --template=scripts/pallet-weight-template.hbs
// --pallet=pallet-otc-settlements
// --output=weights/otc-settlements.rs
// --extrinsic=
// --extrinsic=*

#![allow(unused_parens)]
#![allow(unused_imports)]
Expand All @@ -53,27 +51,6 @@ pub trait WeightInfo {
}

/// Weights for pallet_otc using the hydraDX node and recommended hardware.
pub struct HydraWeight<T>(PhantomData<T>);

impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
/// Storage: `OTC::Orders` (r:1 w:0)
/// Proof: `OTC::Orders` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:2 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// Storage: `Tokens::Accounts` (r:1 w:0)
/// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
fn settle_otc_order() -> Weight {
// Proof Size summary in bytes:
// Measured: `747`
// Estimated: `6196`
// Minimum execution time: 122_182_000 picoseconds.
Weight::from_parts(123_996_000, 6196)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}

// For backwards compatibility and tests
impl WeightInfo for () {
/// Storage: `OTC::Orders` (r:1 w:0)
/// Proof: `OTC::Orders` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
Expand All @@ -85,8 +62,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `747`
// Estimated: `6196`
// Minimum execution time: 122_182_000 picoseconds.
Weight::from_parts(123_996_000, 6196)
// Minimum execution time: 100_657_000 picoseconds.
Weight::from_parts(101_597_000, 6196)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
Expand Down
31 changes: 15 additions & 16 deletions runtime/hydradx/src/weights/pallet_dca.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//! Autogenerated weights for `pallet_dca`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-05-24, STEPS: `10`, REPEAT: `30`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2024-06-20, STEPS: `10`, REPEAT: `30`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
Expand All @@ -37,7 +37,6 @@
// --pallet=pallet-dca
// --output=weights/dca.rs
// --extrinsic=*
// --extra*

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand Down Expand Up @@ -67,10 +66,10 @@ impl<T: frame_system::Config> pallet_dca::WeightInfo for HydraWeight<T> {
/// Proof: `DCA::RetriesOnError` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`)
fn on_initialize_with_buy_trade() -> Weight {
// Proof Size summary in bytes:
// Measured: `54485`
// Measured: `54523`
// Estimated: `31902`
// Minimum execution time: 207_153_000 picoseconds.
Weight::from_parts(209_471_000, 31902)
// Minimum execution time: 207_400_000 picoseconds.
Weight::from_parts(211_361_000, 31902)
.saturating_add(T::DbWeight::get().reads(17_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
Expand All @@ -88,10 +87,10 @@ impl<T: frame_system::Config> pallet_dca::WeightInfo for HydraWeight<T> {
/// Proof: `DCA::RetriesOnError` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`)
fn on_initialize_with_sell_trade() -> Weight {
// Proof Size summary in bytes:
// Measured: `54593`
// Measured: `54631`
// Estimated: `31902`
// Minimum execution time: 206_729_000 picoseconds.
Weight::from_parts(210_115_000, 31902)
// Minimum execution time: 209_659_000 picoseconds.
Weight::from_parts(213_448_000, 31902)
.saturating_add(T::DbWeight::get().reads(17_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
Expand All @@ -101,8 +100,8 @@ impl<T: frame_system::Config> pallet_dca::WeightInfo for HydraWeight<T> {
// Proof Size summary in bytes:
// Measured: `1113`
// Estimated: `3566`
// Minimum execution time: 14_273_000 picoseconds.
Weight::from_parts(14_864_000, 3566)
// Minimum execution time: 14_992_000 picoseconds.
Weight::from_parts(15_296_000, 3566)
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: `MultiTransactionPayment::AcceptedCurrencies` (r:1 w:0)
Expand All @@ -129,10 +128,10 @@ impl<T: frame_system::Config> pallet_dca::WeightInfo for HydraWeight<T> {
/// Proof: `DCA::RemainingAmounts` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`)
fn schedule() -> Weight {
// Proof Size summary in bytes:
// Measured: `52618`
// Measured: `52656`
// Estimated: `29326`
// Minimum execution time: 153_135_000 picoseconds.
Weight::from_parts(155_526_000, 29326)
// Minimum execution time: 152_493_000 picoseconds.
Weight::from_parts(155_888_000, 29326)
.saturating_add(T::DbWeight::get().reads(17_u64))
.saturating_add(T::DbWeight::get().writes(8_u64))
}
Expand All @@ -152,10 +151,10 @@ impl<T: frame_system::Config> pallet_dca::WeightInfo for HydraWeight<T> {
/// Proof: `DCA::ScheduleOwnership` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `MaxEncodedLen`)
fn terminate() -> Weight {
// Proof Size summary in bytes:
// Measured: `2492`
// Measured: `2530`
// Estimated: `4714`
// Minimum execution time: 70_794_000 picoseconds.
Weight::from_parts(71_685_000, 4714)
// Minimum execution time: 71_135_000 picoseconds.
Weight::from_parts(71_902_000, 4714)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
Expand Down
15 changes: 6 additions & 9 deletions runtime/hydradx/src/weights/pallet_otc_settlements.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// This file is part of HydraDX.

// Copyright (C) 2020-2023 Intergalactic, Limited (GIB).
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -18,8 +15,8 @@

//! Autogenerated weights for `pallet_otc_settlements`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-05-29, STEPS: `10`, REPEAT: `30`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2024-06-20, STEPS: `10`, REPEAT: `30`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `bench-bot`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
Expand All @@ -33,10 +30,10 @@
// --repeat=30
// --wasm-execution=compiled
// --heap-pages=4096
// --template=.maintain/pallet-weight-template.hbs
// --template=scripts/pallet-weight-template.hbs
// --pallet=pallet-otc-settlements
// --output=weights/otc-settlements.rs
// --extrinsic=a
// --extrinsic=*

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -61,8 +58,8 @@ impl<T: frame_system::Config> WeightInfo for HydraWeight<T> {
// Proof Size summary in bytes:
// Measured: `747`
// Estimated: `6196`
// Minimum execution time: 122_182_000 picoseconds.
Weight::from_parts(123_996_000, 6196)
// Minimum execution time: 100_657_000 picoseconds.
Weight::from_parts(101_597_000, 6196)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand Down

0 comments on commit 19ae17b

Please sign in to comment.