Skip to content

Commit

Permalink
rebenchmark router and multi payment pallet
Browse files Browse the repository at this point in the history
  • Loading branch information
Roznovjak committed Jan 16, 2025
1 parent 4e9892c commit 15c15b0
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 37 deletions.
54 changes: 29 additions & 25 deletions runtime/basilisk/src/weights/pallet_route_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//! Autogenerated weights for `pallet_route_executor`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
//! DATE: 2025-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2025-01-16, STEPS: `50`, REPEAT: `20`, 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: `None`, DB CACHE: `1024`
Expand Down Expand Up @@ -57,6 +57,13 @@ pub struct WeightInfo<T>(PhantomData<T>);
/// Weights for `pallet_route_executor` using the Basilisk node and recommended hardware.
pub struct BasiliskWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_route_executor::WeightInfo for BasiliskWeight<T> {
fn skip_ed_handling_for_trade_with_insufficient_assets() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 222_000 picoseconds.
Weight::from_parts(244_000, 0)
}
/// Storage: `LBP::PoolData` (r:1 w:0)
/// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`)
/// Storage: `Tokens::Accounts` (r:5 w:5)
Expand All @@ -80,10 +87,10 @@ impl<T: frame_system::Config> pallet_route_executor::WeightInfo for BasiliskWeig
// Proof Size summary in bytes:
// Measured: `3066`
// Estimated: `13905`
// Minimum execution time: 362_510_000 picoseconds.
Weight::from_parts(366_742_532, 13905)
// Standard Error: 292_354
.saturating_add(Weight::from_parts(75_099_167, 0).saturating_mul(c.into()))
// Minimum execution time: 367_925_000 picoseconds.
Weight::from_parts(371_354_146, 13905)
// Standard Error: 306_800
.saturating_add(Weight::from_parts(74_898_853, 0).saturating_mul(c.into()))
.saturating_add(T::DbWeight::get().reads(15_u64))
.saturating_add(T::DbWeight::get().writes(10_u64))
}
Expand All @@ -110,13 +117,13 @@ impl<T: frame_system::Config> pallet_route_executor::WeightInfo for BasiliskWeig
fn calculate_and_execute_buy_in_lbp(c: u32, b: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `1463 + b * (1608 ±0)`
// Estimated: `6156 + b * (7749 ±1_992_139_977_073_960)`
// Minimum execution time: 99_385_000 picoseconds.
Weight::from_parts(100_258_000, 6156)
// Standard Error: 226_920
.saturating_add(Weight::from_parts(873_135, 0).saturating_mul(c.into()))
// Standard Error: 505_414
.saturating_add(Weight::from_parts(269_445_572, 0).saturating_mul(b.into()))
// Estimated: `6156 + b * (7749 ±7_072_116_491_613_192)`
// Minimum execution time: 101_140_000 picoseconds.
Weight::from_parts(102_000_000, 6156)
// Standard Error: 234_028
.saturating_add(Weight::from_parts(942_788, 0).saturating_mul(c.into()))
// Standard Error: 521_247
.saturating_add(Weight::from_parts(271_903_319, 0).saturating_mul(b.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().reads((12_u64).saturating_mul(b.into())))
.saturating_add(T::DbWeight::get().writes((10_u64).saturating_mul(b.into())))
Expand Down Expand Up @@ -152,8 +159,8 @@ impl<T: frame_system::Config> pallet_route_executor::WeightInfo for BasiliskWeig
// Proof Size summary in bytes:
// Measured: `8255`
// Estimated: `39735`
// Minimum execution time: 1_817_626_000 picoseconds.
Weight::from_parts(1_830_522_000, 39735)
// Minimum execution time: 1_794_259_000 picoseconds.
Weight::from_parts(1_799_766_000, 39735)
.saturating_add(T::DbWeight::get().reads(47_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -163,8 +170,8 @@ impl<T: frame_system::Config> pallet_route_executor::WeightInfo for BasiliskWeig
// Proof Size summary in bytes:
// Measured: `929`
// Estimated: `0`
// Minimum execution time: 30_560_000 picoseconds.
Weight::from_parts(31_089_000, 0)
// Minimum execution time: 30_957_000 picoseconds.
Weight::from_parts(31_456_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// Storage: `Router::Routes` (r:1 w:0)
Expand All @@ -173,8 +180,8 @@ impl<T: frame_system::Config> pallet_route_executor::WeightInfo for BasiliskWeig
// Proof Size summary in bytes:
// Measured: `701`
// Estimated: `3555`
// Minimum execution time: 9_244_000 picoseconds.
Weight::from_parts(9_441_000, 3555)
// Minimum execution time: 9_304_000 picoseconds.
Weight::from_parts(9_530_000, 3555)
.saturating_add(T::DbWeight::get().reads(1_u64))
}
/// Storage: `EmaOracle::Oracles` (r:2 w:0)
Expand All @@ -183,8 +190,8 @@ impl<T: frame_system::Config> pallet_route_executor::WeightInfo for BasiliskWeig
// Proof Size summary in bytes:
// Measured: `1353`
// Estimated: `6294`
// Minimum execution time: 33_025_000 picoseconds.
Weight::from_parts(33_659_000, 6294)
// Minimum execution time: 33_059_000 picoseconds.
Weight::from_parts(33_926_000, 6294)
.saturating_add(T::DbWeight::get().reads(2_u64))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
Expand All @@ -206,11 +213,8 @@ impl<T: frame_system::Config> pallet_route_executor::WeightInfo for BasiliskWeig
// Proof Size summary in bytes:
// Measured: `1500`
// Estimated: `6156`
// Minimum execution time: 41_817_000 picoseconds.
Weight::from_parts(42_680_000, 6156)
// Minimum execution time: 42_229_000 picoseconds.
Weight::from_parts(42_681_000, 6156)
.saturating_add(T::DbWeight::get().reads(4_u64))
}
fn skip_ed_handling_for_trade_with_insufficient_assets() -> Weight {
Weight::MAX
}
}
58 changes: 46 additions & 12 deletions runtime/basilisk/src/weights/pallet_transaction_multi_payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//! Autogenerated weights for `pallet_transaction_multi_payment`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0
//! DATE: 2025-01-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2025-01-16, STEPS: `50`, REPEAT: `20`, 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: `None`, DB CACHE: `1024`
Expand Down Expand Up @@ -63,8 +63,8 @@ impl<T: frame_system::Config> pallet_transaction_multi_payment::WeightInfo for B
// Proof Size summary in bytes:
// Measured: `1126`
// Estimated: `3493`
// Minimum execution time: 26_897_000 picoseconds.
Weight::from_parts(27_538_000, 3493)
// Minimum execution time: 27_334_000 picoseconds.
Weight::from_parts(27_716_000, 3493)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -74,8 +74,8 @@ impl<T: frame_system::Config> pallet_transaction_multi_payment::WeightInfo for B
// Proof Size summary in bytes:
// Measured: `1157`
// Estimated: `3493`
// Minimum execution time: 27_076_000 picoseconds.
Weight::from_parts(27_386_000, 3493)
// Minimum execution time: 27_175_000 picoseconds.
Weight::from_parts(27_577_000, 3493)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -87,8 +87,8 @@ impl<T: frame_system::Config> pallet_transaction_multi_payment::WeightInfo for B
// Proof Size summary in bytes:
// Measured: `1191`
// Estimated: `3493`
// Minimum execution time: 34_561_000 picoseconds.
Weight::from_parts(34_923_000, 3493)
// Minimum execution time: 34_833_000 picoseconds.
Weight::from_parts(35_397_000, 3493)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -100,8 +100,8 @@ impl<T: frame_system::Config> pallet_transaction_multi_payment::WeightInfo for B
// Proof Size summary in bytes:
// Measured: `3308`
// Estimated: `27510`
// Minimum execution time: 103_736_000 picoseconds.
Weight::from_parts(105_047_000, 27510)
// Minimum execution time: 102_307_000 picoseconds.
Weight::from_parts(104_033_000, 27510)
.saturating_add(T::DbWeight::get().reads(11_u64))
}
/// Storage: `MultiTransactionPayment::AccountCurrencyMap` (r:0 w:1)
Expand All @@ -110,11 +110,45 @@ impl<T: frame_system::Config> pallet_transaction_multi_payment::WeightInfo for B
// Proof Size summary in bytes:
// Measured: `929`
// Estimated: `0`
// Minimum execution time: 21_574_000 picoseconds.
Weight::from_parts(21_946_000, 0)
// Minimum execution time: 21_850_000 picoseconds.
Weight::from_parts(22_175_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
/// 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:2 w:0)
/// Proof: `MultiTransactionPayment::AcceptedCurrencies` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `AssetRegistry::NextAssetId` (r:1 w:0)
/// Proof: `AssetRegistry::NextAssetId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `AssetRegistry::LocationAssets` (r:1 w:0)
/// Proof: `AssetRegistry::LocationAssets` (`max_values`: None, `max_size`: Some(622), added: 3097, mode: `MaxEncodedLen`)
/// Storage: `MultiTransactionPayment::AcceptedCurrencyPrice` (r:1 w:0)
/// Proof: `MultiTransactionPayment::AcceptedCurrencyPrice` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
/// Storage: `Router::Routes` (r:1 w:0)
/// Proof: `Router::Routes` (`max_values`: None, `max_size`: Some(90), added: 2565, mode: `MaxEncodedLen`)
/// Storage: `EmaOracle::Oracles` (r:1 w:0)
/// Proof: `EmaOracle::Oracles` (`max_values`: None, `max_size`: Some(177), added: 2652, mode: `MaxEncodedLen`)
/// Storage: `Tokens::Accounts` (r:4 w:4)
/// Proof: `Tokens::Accounts` (`max_values`: None, `max_size`: Some(108), added: 2583, mode: `MaxEncodedLen`)
/// Storage: `XYK::ShareToken` (r:1 w:0)
/// Proof: `XYK::ShareToken` (`max_values`: None, `max_size`: Some(52), added: 2527, 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: `EmaOracle::Accumulator` (r:1 w:1)
/// Proof: `EmaOracle::Accumulator` (`max_values`: Some(1), `max_size`: Some(4441), added: 4936, mode: `MaxEncodedLen`)
/// Storage: `Broadcast::ExecutionContext` (r:1 w:0)
/// Proof: `Broadcast::ExecutionContext` (`max_values`: Some(1), `max_size`: Some(593), added: 1088, mode: `MaxEncodedLen`)
/// Storage: `Tokens::TotalIssuance` (r:1 w:1)
/// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`)
fn withdraw_fee() -> Weight {
Weight::MAX
// Proof Size summary in bytes:
// Measured: `3587`
// Estimated: `11322`
// Minimum execution time: 232_769_000 picoseconds.
Weight::from_parts(233_723_000, 11322)
.saturating_add(T::DbWeight::get().reads(20_u64))
.saturating_add(T::DbWeight::get().writes(7_u64))
}
}

0 comments on commit 15c15b0

Please sign in to comment.