From f42d4f4f0b9d3faf38d2f3c3a9753a03440cdd24 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 26 May 2026 22:26:45 +0300 Subject: flamegraph: add dual trie value/height totals (task po) --- internal/flamegraph/trie_insert.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/flamegraph/trie_insert.go') diff --git a/internal/flamegraph/trie_insert.go b/internal/flamegraph/trie_insert.go index 7748b4a..8c01792 100644 --- a/internal/flamegraph/trie_insert.go +++ b/internal/flamegraph/trie_insert.go @@ -1,7 +1,7 @@ package flamegraph -// insertTriePath follows or creates nodes for frames and adds value at the leaf. -func insertTriePath(root *trieNode, frames []string, value uint64) { +// insertTriePath follows or creates nodes for frames and adds values at the leaf. +func insertTriePath(root *trieNode, frames []string, value, heightValue uint64) { node := root for _, frame := range frames { if node.childMap == nil { @@ -19,4 +19,5 @@ func insertTriePath(root *trieNode, frames []string, value uint64) { node = child } node.value += value + node.heightValue += heightValue } -- cgit v1.2.3