summaryrefslogtreecommitdiff
path: root/internal/tui/flamegraph/controls.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-08 19:43:33 +0300
committerPaul Buetow <paul@buetow.org>2026-05-08 19:43:33 +0300
commitf86699a94bdde7d973ba5d6fa3e7ca4ab2f234fb (patch)
treec2e11bfa4fdac965623a8058716c514fce507eba /internal/tui/flamegraph/controls.go
parentc41a38ef55bb80681a6cc0b2161f8e84bfabcf17 (diff)
add duration metric, tolerate missing tracepoints, ship el8 build
- Bubbles, treemap, icicle, and the live flamegraph 'b' cycle now include syscall duration (sum) as a third metric alongside events and bytes. Statsengine snapshots expose TotalLatencyNs to support this. - AttachAll takes an optional warn callback. Production passes one so older kernels that lack newer tracepoints log a warning and keep going instead of aborting startup. - Dockerfile.el8 + scripts/build-with-docker-el8.sh + mage buildDockerEl8 produce ior.el8, a static binary built against Rocky Linux 8 glibc for RHEL/Rocky/Alma 8 hosts. - README.md documents installing mage and the new el8 target.
Diffstat (limited to 'internal/tui/flamegraph/controls.go')
-rw-r--r--internal/tui/flamegraph/controls.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/internal/tui/flamegraph/controls.go b/internal/tui/flamegraph/controls.go
index 2033416..bd588b3 100644
--- a/internal/tui/flamegraph/controls.go
+++ b/internal/tui/flamegraph/controls.go
@@ -57,8 +57,16 @@ func (m *Model) cycleFieldOrder() {
}
func (m *Model) toggleCountField() {
- next := "bytes"
- if m.countField == "bytes" {
+ // 3-way cycle: count → bytes → duration → count.
+ // durationToPrev (inter-syscall gap) is reachable via the CLI flag but
+ // kept out of the toolbar cycle for now.
+ var next string
+ switch m.countField {
+ case "count":
+ next = "bytes"
+ case "bytes":
+ next = "duration"
+ default:
next = "count"
}
if m.liveTrie != nil {
@@ -168,6 +176,8 @@ func (m Model) countFieldLabel() string {
return "events"
case "bytes":
return "bytes"
+ case "duration":
+ return "duration"
default:
return m.countField
}