From 214264cb4448127c4e1ce2cf19615fd39aeedff5 Mon Sep 17 00:00:00 2001 From: Francesco Vigliaturo Date: Wed, 11 Sep 2024 07:05:14 +0200 Subject: [PATCH] re-introduce merge intervals during some refactoring to resolve conflicts with the main branch this was left out. Fixing it here. --- internal/flamegraph/flamegraph.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/flamegraph/flamegraph.go b/internal/flamegraph/flamegraph.go index 317a346..dc81228 100644 --- a/internal/flamegraph/flamegraph.go +++ b/internal/flamegraph/flamegraph.go @@ -572,7 +572,8 @@ func GetFlamegraphFromCandidates( for tid, callTree := range result.CallTrees { if intervals, ok := result.Intervals[tid]; ok { - for _, interval := range intervals { + sortedAndMergedIntervals := mergeIntervals(&intervals) + for _, interval := range sortedAndMergedIntervals { intervalExample := utils.NewExampleFromProfilerChunk( result.Chunk.ProjectID, result.Chunk.ProfilerID,