diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-05 22:39:21 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-05 22:39:21 +0200 |
| commit | 4e464d082e0c83f33f4b4659859b8a9be58987e1 (patch) | |
| tree | 4005e44389c67e0d1daa64dfbe032d096c78f129 /internal/tui/flamegraph/renderer.go | |
| parent | 3307447e4ae159b11bbe262ad161d6e3c571ee4c (diff) | |
task 359: add flamegraph zoom interactions
Diffstat (limited to 'internal/tui/flamegraph/renderer.go')
| -rw-r--r-- | internal/tui/flamegraph/renderer.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/tui/flamegraph/renderer.go b/internal/tui/flamegraph/renderer.go index 8b2aff0..5e223a6 100644 --- a/internal/tui/flamegraph/renderer.go +++ b/internal/tui/flamegraph/renderer.go @@ -18,6 +18,10 @@ const minFlameWidth = 60 // BuildTerminalLayout converts a live trie snapshot into terminal frame cells. func BuildTerminalLayout(snapshot *snapshotNode, width, height int) []tuiFrame { + return buildTerminalLayoutWithPath(snapshot, width, height, "") +} + +func buildTerminalLayoutWithPath(snapshot *snapshotNode, width, height int, rootPath string) []tuiFrame { if snapshot == nil || width <= 0 || height <= 0 { return nil } @@ -27,6 +31,9 @@ func BuildTerminalLayout(snapshot *snapshotNode, width, height int) []tuiFrame { } rootName := frameName(snapshot.Name, 0) + if rootPath != "" { + rootName = rootPath + } frames := make([]tuiFrame, 0, len(snapshot.Children)+1) collectTerminalLayout(&frames, snapshot, rootTotal, width, height, 0, 0, rootName) return frames |
