-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
histogram: fix percentiles for empty histograms (#116)
When the histogram is empty, the percentiles function currently returns the first bucket for the standard histogram and panics due to an underflow in the sparse histogram. Change the signature to return an Optional value, which is set to None in the empty histogram case for both standard and sparse histograms. Also, add a batched percentile lookup for the sparse histogram to bring the interface in line with the standard histogram.
- Loading branch information
Showing
4 changed files
with
132 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "histogram" | ||
version = "0.10.2" | ||
version = "0.11.0" | ||
edition = "2021" | ||
authors = ["Brian Martin <[email protected]>"] | ||
license = "MIT OR Apache-2.0" | ||
|
This file contains 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
This file contains 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
This file contains 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