-
Notifications
You must be signed in to change notification settings - Fork 708
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
A bug in Histogram? #2006
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was looking around the source code and the following piece of code seems a bit buggy to me:
perfview/src/TraceEvent/Stacks/Histogram.cs
Lines 48 to 68 in c671d46
Let's say the following sequence of
AddMetric
is called:The second time will cause the array to be constructed, and
m_singleBucketValue
is populated into the array.But within the third call,
if (m_singleBucketNum == bucket)
will still be true, and the metric is still added intom_singleBucketValue
instead of the array.Inside the indexer:
perfview/src/TraceEvent/Stacks/Histogram.cs
Lines 119 to 126 in c671d46
the
m_singleBucketValue
isn't used when the array is not null, causing the entry form_singleBucketNum
to be returned with incorrected value.I don't have the whole knowledge of how Histogram is used, so I don't sure if this is really a bug. And this problem might not be a big issue due to the usage pattern, cause I don't see any bucket to be obviously wrong in the GUI.
The text was updated successfully, but these errors were encountered: