summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-27 17:18:32 +0200
committerPaul Buetow <paul@buetow.org>2026-02-27 17:18:32 +0200
commit812267c2d82d887dc143ec10abda6d4b8474f757 (patch)
treef1031f11627dd079d4d5a205b2a9612003c94d63 /internal
parent2f9d714397e9467a8acf674612465829da8b8aa6 (diff)
ior: route live mode through trace pipeline
Diffstat (limited to 'internal')
-rw-r--r--internal/ior.go2
-rw-r--r--internal/ior_mode_test.go12
2 files changed, 13 insertions, 1 deletions
diff --git a/internal/ior.go b/internal/ior.go
index a19d2f7..bf0fb1f 100644
--- a/internal/ior.go
+++ b/internal/ior.go
@@ -147,7 +147,7 @@ func dispatchRun(cfg flags.Flags) error {
}
func shouldRunTraceMode(cfg flags.Flags) bool {
- return cfg.PlainMode || cfg.FlamegraphEnable || cfg.PprofEnable
+ return cfg.PlainMode || cfg.FlamegraphEnable || cfg.LiveFlamegraph || cfg.PprofEnable
}
func tuiTraceStarterFromRunTrace(
diff --git a/internal/ior_mode_test.go b/internal/ior_mode_test.go
index 42b0a48..35d7f43 100644
--- a/internal/ior_mode_test.go
+++ b/internal/ior_mode_test.go
@@ -34,6 +34,12 @@ func TestShouldRunTraceMode(t *testing.T) {
if !shouldRunTraceMode(withPprof) {
t.Fatalf("expected pprof mode to use trace mode")
}
+
+ withLive := base
+ withLive.LiveFlamegraph = true
+ if !shouldRunTraceMode(withLive) {
+ t.Fatalf("expected live mode to use trace mode")
+ }
}
func TestShouldAutoStopByDuration(t *testing.T) {
@@ -59,6 +65,12 @@ func TestShouldAutoStopByDuration(t *testing.T) {
if !shouldAutoStopByDuration(withPprof) {
t.Fatalf("expected pprof mode to auto-stop by duration")
}
+
+ withLive := base
+ withLive.LiveFlamegraph = true
+ if shouldAutoStopByDuration(withLive) {
+ t.Fatalf("expected live mode not to auto-stop by duration")
+ }
}
func TestDispatchRunUsesTraceModeWhenRequested(t *testing.T) {