Repository navigation
Streaming histogram - #2590
Merged
Merged
Streaming histogram#2590
Conversation
echeipesh
approved these changes
Mar 29, 2018
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.
Overview
Fixes
StreamingHistogram.itemCount. Has the effect of changing the behavior ofStreamingHistogram.binCountso that bin counts are not always zero.Checklist
docs/CHANGELOG.rstupdated, if necessarydocsguides update, if necessaryDemo
Previously,
binCounton a streaming histogram would return answers with counts of zero.This was due to the fact that the values of the bins were being generated by the functionThis was due tovalueswhich produced numbers that did not match the internals bins of the streaming histogram.itemCountbeing incorrect.New behavior:
Notes
As stated above, the previous behavior was to use bin labels generated byvalueswhich did not (do not) line up with the internal bins used by the streaming histogram. When a count for a non-bucket-label value is requested, zero is returned (because [by construction and intent] the streaming histogram does not have access to that information).The new behavior is to simply return the internal buckets used by the streaming histogram. Note that the interpretations of these bin counts is therefore somewhat different than for other histogram types.Note that the median value of 34.18 above is "correct" (expected) for an approximation using three buckets. Because all of the input data are not available, the median has to be approximated. If the approximate histogram is viewed as a curve, the median is approximated by returning the value at which half of the the area under the curve is to the left and half to the right.
Closes #2274