summaryrefslogtreecommitdiff
path: root/internal/tui/dashboard/model.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/tui/dashboard/model.go')
-rw-r--r--internal/tui/dashboard/model.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/internal/tui/dashboard/model.go b/internal/tui/dashboard/model.go
index 850a483..42a9ad4 100644
--- a/internal/tui/dashboard/model.go
+++ b/internal/tui/dashboard/model.go
@@ -713,10 +713,14 @@ func sortedProcessSnapshots(rows []statsengine.ProcessSnapshot, metric bubbleMet
}
func processMetricValue(proc statsengine.ProcessSnapshot, metric bubbleMetric) uint64 {
- if metric == bubbleMetricBytes {
+ switch metric {
+ case bubbleMetricBytes:
return proc.Bytes
+ case bubbleMetricDuration:
+ return proc.TotalLatencyNs
+ default:
+ return proc.Syscalls
}
- return proc.Syscalls
}
func processSelectionLabel(proc statsengine.ProcessSnapshot) string {
@@ -1289,10 +1293,15 @@ func nextVizMode(current tabVizMode, allowed []tabVizMode) tabVizMode {
}
func nextBubbleMetric(metric bubbleMetric) bubbleMetric {
- if metric == bubbleMetricBytes {
+ // 3-way cycle: count (events) → bytes → duration → count.
+ switch metric {
+ case bubbleMetricCount:
+ return bubbleMetricBytes
+ case bubbleMetricBytes:
+ return bubbleMetricDuration
+ default:
return bubbleMetricCount
}
- return bubbleMetricBytes
}
func tickCmd(d time.Duration) tea.Cmd {