-
Notifications
You must be signed in to change notification settings - Fork 13
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
rewrite of the histogram crate #66
Conversation
Rewrite the histogram crate to merge heatmap functionality into this crate and reparameterize the histogram constructors.
Adds a few benchmarks and increases the minimum interval for the sliding window histograms. We can lower it in the future, but for now, increasing to milliseonds as finest resolution prevents excessive looping when snapshots are needed on increment.
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.
partial review
Return build errors instead of panicing via assert if the sliding window interval is either too short or too long
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.
Partial review
} | ||
|
||
/// Produce a snapshot from this histogram. | ||
pub fn snapshot(&self) -> Snapshot { |
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.
We might need another API where the snapshot is pre-allocated and provided by the caller so we can minimize allocation? Fine to add it in a different PR.
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.
snapshot_into()
would be nice. Will do a follow-on PR.
Rewrite the histogram crate to merge heatmap functionality into this crate and
reparameterize the histogram constructors.