-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move MinMax
type into mz-ore
#29222
Move MinMax
type into mz-ore
#29222
Conversation
src/ore/src/stats.rs
Outdated
/// The push stack and the pop stack, merged into one allocation to optimize memory usage. | ||
/// | ||
/// The push stack is the first `push_stack_len` items, the pop stack is the rest. | ||
/// The push stack grows to the left, the pop stack grows to the right. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading this more carefully, shouldn't this be the push stack grows to the right, pop stack to the left?
In the diagram below the arrows indicate that's what's happening, and it seems that the code does too (top of push stack = push_stack_len
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦 Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
src/ore/src/stats.rs
Outdated
/// The push stack and the pop stack, merged into one allocation to optimize memory usage. | ||
/// | ||
/// The push stack is the first `push_stack_len` items, the pop stack is the rest. | ||
/// The push stack grows to the left, the pop stack grows to the right. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good catch!
This commit moves the `MinMax` type supporting the compute controller metrics into the mz-ore crate, as it might be generally useful. The type is also renamed to `SlidingMinMax` to make its purpose more obvious outside the a metrics context.
TFTRs! |
This PR moves the
MinMax
type supporting the compute controller metrics into the mz-ore crate, as it might be generally useful. The type is also renamed toSlidingMinMax
to make its purpose more obvious outside the a metrics context.Motivation
Tips for reviewer
Checklist
$T ⇔ Proto$T
mapping (possibly in a backwards-incompatible way), then it is tagged with aT-proto
label.