Skip to content

Commit

Permalink
update router weight function
Browse files Browse the repository at this point in the history
  • Loading branch information
Roznovjak committed Dec 7, 2023
1 parent 9185195 commit 870645a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
1 change: 0 additions & 1 deletion runtime/basilisk/src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ impl RouterWeightInfo {
) -> Weight {
weights::route_executor::BasiliskWeight::<Runtime>::calculate_and_execute_sell_in_lbp(
num_of_calc_sell,
num_of_execute_sell,
)
.saturating_sub(weights::lbp::BasiliskWeight::<Runtime>::router_execution_sell(

Check warning on line 424 in runtime/basilisk/src/assets.rs

View check run for this annotation

Codecov / codecov/patch

runtime/basilisk/src/assets.rs#L424

Added line #L424 was not covered by tests
num_of_calc_sell.saturating_add(num_of_execute_sell),
Expand Down
16 changes: 2 additions & 14 deletions runtime/basilisk/src/weights/route_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,8 @@ impl<T: frame_system::Config> WeightInfo for BasiliskWeight<T> {
/// Proof: `AssetRegistry::Assets` (`max_values`: None, `max_size`: Some(87), added: 2562, mode: `MaxEncodedLen`)
/// The range of component `c` is `[0, 1]`.
/// The range of component `s` is `[0, 1]`.
fn calculate_and_execute_sell_in_lbp(c: u32, s: u32) -> Weight {
// Proof Size summary in bytes:
// Measured: `1600 + s * (1192 ±0)`
// Estimated: `256132379456316 + s * (7749 ±0)`
// Minimum execution time: 72_895_000 picoseconds.
Weight::from_parts(19_358_860, 256132379456316)
// Standard Error: 201_208
.saturating_add(Weight::from_parts(54_435_286, 0).saturating_mul(c.into()))
// Standard Error: 201_208
.saturating_add(Weight::from_parts(298_828_852, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().reads((9_u64).saturating_mul(s.into())))
.saturating_add(T::DbWeight::get().writes((7_u64).saturating_mul(s.into())))
.saturating_add(Weight::from_parts(0, 7749).saturating_mul(s.into()))
fn calculate_and_execute_sell_in_lbp(_c: u32) -> Weight {
Weight::from_parts(0, 0)

Check warning on line 68 in runtime/basilisk/src/weights/route_executor.rs

View check run for this annotation

Codecov / codecov/patch

runtime/basilisk/src/weights/route_executor.rs#L67-L68

Added lines #L67 - L68 were not covered by tests
}
/// Storage: `LBP::PoolData` (r:1 w:0)
/// Proof: `LBP::PoolData` (`max_values`: None, `max_size`: Some(163), added: 2638, mode: `MaxEncodedLen`)
Expand Down

0 comments on commit 870645a

Please sign in to comment.