summaryrefslogtreecommitdiff
path: root/internal/flamegraph/collapsed.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-03-28 23:01:25 +0200
committerPaul Buetow <paul@buetow.org>2025-03-28 23:01:25 +0200
commit525e38ae59ce7a0d3be49ecba94df678f1def409 (patch)
tree0e8011f99d52d1d24a2ebeeb8d17237887861212 /internal/flamegraph/collapsed.go
parenta9b56186f32b4a1899543c8cddad400390d795c4 (diff)
initial iordata implementation
Diffstat (limited to 'internal/flamegraph/collapsed.go')
-rw-r--r--internal/flamegraph/collapsed.go4
1 files changed, 2 insertions, 2 deletions
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