-
Notifications
You must be signed in to change notification settings - Fork 130
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
Upstream flamegraph doesn't discard fractional samples #43
Comments
Ah, yes, I think you're right! That would mean that the sample counts are all fractional (probably |
I don't think I've got the mental bandwidth currently to fully implement this as it propagates throughout the program when you make the samples floating point. In particular, it affects the lookups of I'd gladly leave it for another contributor or for a stream where you get to explain the Fun in why floats don't have decent orderings. |
One trick we could play here is to upsample by, say, 100x, and then keep using |
As far as I can tell there is no reason |
I did some digging on this in #64 (comment), and my conclusion from reading brendangregg/FlameGraph#18 is that we should probably simply discard the fractional parts of samples, and add support for |
#65 adds --factor instead. |
I'm still watching part 2 but given the current state of the source code, I believe that you may have misinterpreted the part of the regex in upstream FlameGraph about removing the fractional part of the samples.
inferno/src/flamegraph/merge.rs
Lines 94 to 98 in ce1c41a
My reading is that the non-capturing group is there to allow input in either integer or fractional format, but not in any way remove it from the surrounding capture. The non-capturing group is there to group up the separator and the fractions for the following
?
.That is, it accepts sample values like
12
,34.
, and56.78
.The text was updated successfully, but these errors were encountered: