[Serve] Short circuit autoscaling metrics#58962
Merged
abrarsheikh merged 1 commit intomasterfrom Nov 26, 2025
Merged
Conversation
Signed-off-by: abrar <abrar@anyscale.com>
Contributor
There was a problem hiding this comment.
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.
akyang-anyscale
approved these changes
Nov 26, 2025
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
optimization for the case where list has only one timeseries. O(nlogn) -> O(1)