Skip to content

Commit

Permalink
fix #140
Browse files Browse the repository at this point in the history
  • Loading branch information
brendangregg committed Aug 18, 2017
1 parent 38145a7 commit 8f2e64e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flamegraph.pl
Original file line number Diff line number Diff line change
Expand Up @@ -978,10 +978,11 @@ sub flow {
// Step through frames saving only the biggest bottom-up frames
// thanks to the sort order. This relies on the tree property
// where children are always smaller than their parents.
var fudge = 0.0001; // JavaScript floating point
for (var k in keys) {
var x = parseFloat(keys[k]);
var w = matches[keys[k]];
if (x >= lastx + lastw) {
if (x >= lastx + lastw - fudge) {
count += w;
lastx = x;
lastw = w;
Expand Down

0 comments on commit 8f2e64e

Please sign in to comment.