From 525e38ae59ce7a0d3be49ecba94df678f1def409 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 28 Mar 2025 23:01:25 +0200 Subject: initial iordata implementation --- internal/flamegraph/collapsed.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/flamegraph/collapsed.go') diff --git a/internal/flamegraph/collapsed.go b/internal/flamegraph/collapsed.go index 012ea45..57e5ac0 100644 --- a/internal/flamegraph/collapsed.go +++ b/internal/flamegraph/collapsed.go @@ -13,7 +13,7 @@ type counter struct { duration uint64 } -func (c *counter) merge(other counter) { +func (c *counter) add(other counter) { c.count += other.count c.duration += other.duration } @@ -33,7 +33,7 @@ func (c collapsed) merge(other collapsed) (merged int) { } for traceId, cnt := range v { if existingCnt, ok := c[k][traceId]; ok { - existingCnt.merge(cnt) + existingCnt.add(cnt) merged++ c[k][traceId] = existingCnt continue -- cgit v1.2.3