forked from voldemort/voldemort
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Histogram: halved memory footprint, test boundary conditions, d…
…ropped unnecessary binary search. These changes preserve/correct behavior of the current Histogram. src/java/voldemort/store/stats/Histogram.java - Halved memory footprint by dropping unnecessary "bounds" array - Dropped unnecessary binary search, making insert O(1) rather than O(log(nBuckets)) - Improved documentation - Made interface consistent for type of values inserted/got from histogram (i.e., all are 'long') test/unit/voldemort/store/stats/HistogramTest.java - Added tests for boundary conditions: -ive values are dropped on insert, "too large" values are bucketed in the final bucket on insert. Minor fixes to RequestCounter calls to histogram to conform to 'long' interfaces.
- Loading branch information
Showing
3 changed files
with
58 additions
and
59 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
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