Skip to content

[Serve] Short circuit autoscaling metrics#58962

Merged
abrarsheikh merged 1 commit intomasterfrom
SERVE-1447-abrar-controller_2
Nov 26, 2025
Merged

[Serve] Short circuit autoscaling metrics#58962
abrarsheikh merged 1 commit intomasterfrom
SERVE-1447-abrar-controller_2

Conversation

@abrarsheikh
Copy link
Contributor

@abrarsheikh abrarsheikh commented Nov 25, 2025

optimization for the case where list has only one timeseries. O(nlogn) -> O(1)

Signed-off-by: abrar <abrar@anyscale.com>
@abrarsheikh abrarsheikh requested a review from a team as a code owner November 25, 2025 05:17
@abrarsheikh abrarsheikh added the go add ONLY when ready to merge, run all tests label Nov 25, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a sensible optimization to the merge_instantaneous_total function by short-circuiting the k-way merge logic when only a single time series is present. The accompanying test modifications are well-executed, ensuring that the merge and rounding logic remains thoroughly tested by using multiple series. The import refactoring for TimeStampedValue is also a good cleanup. The changes are correct and improve the code. Well done.

@ray-gardener ray-gardener bot added the serve Ray Serve Related Issue label Nov 25, 2025
@abrarsheikh abrarsheikh merged commit 12ceb2f into master Nov 26, 2025
6 checks passed
@abrarsheikh abrarsheikh deleted the SERVE-1447-abrar-controller_2 branch November 26, 2025 02:28
KaisennHu pushed a commit to KaisennHu/ray that referenced this pull request Nov 26, 2025
optimization for the case where list has only one timeseries. O(nlogn)
-> O(1)

Signed-off-by: abrar <abrar@anyscale.com>
SheldonTsen pushed a commit to SheldonTsen/ray that referenced this pull request Dec 1, 2025
optimization for the case where list has only one timeseries. O(nlogn)
-> O(1)

Signed-off-by: abrar <abrar@anyscale.com>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
optimization for the case where list has only one timeseries. O(nlogn)
-> O(1)

Signed-off-by: abrar <abrar@anyscale.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests serve Ray Serve Related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants