Skip to content

Commit

Permalink
skip empty frames
Browse files Browse the repository at this point in the history
commit_hash:de5dc1926c413a18a299deef0bbc6b8e6b66a731
  • Loading branch information
gearoffortune committed Feb 6, 2025
1 parent 8623e58 commit 1ce9417
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions perforator/pkg/profile/flamegraph/render/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,11 @@ func (f *FlameGraph) renderBlocksToJSON(blocks []*block, w io.Writer) error {
nodeLevels := make([][]format.RenderingNode, maxLevel+1)

for _, block := range blocks {
// Skip disappeared (present in baseline, but not in the diff profile) blocks
if block.weight == 0.0 {
continue
}

blocksByLevels[block.level] = append(blocksByLevels[block.level], block)
}

Expand Down

0 comments on commit 1ce9417

Please sign in to comment.