summaryrefslogtreecommitdiff
path: root/internal/flamegraph/trie_insert.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/flamegraph/trie_insert.go')
-rw-r--r--internal/flamegraph/trie_insert.go5
1 files changed, 3 insertions, 2 deletions
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
}