summaryrefslogtreecommitdiff
path: root/internal/ior_mode_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-26 23:33:55 +0200
committerPaul Buetow <paul@buetow.org>2026-02-26 23:33:55 +0200
commit4ca34f040203c8e31603bbb39fd38632b68067d8 (patch)
treeeed81b39e169eb6d0cd7d2eca6b338c7c0914ba4 /internal/ior_mode_test.go
parente5cb5db2292ae84680935767d455a777125e0fe9 (diff)
tui: add paused stream CSV export and foreground editor open
Diffstat (limited to 'internal/ior_mode_test.go')
-rw-r--r--internal/ior_mode_test.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/internal/ior_mode_test.go b/internal/ior_mode_test.go
index 84ff651..42b0a48 100644
--- a/internal/ior_mode_test.go
+++ b/internal/ior_mode_test.go
@@ -36,6 +36,31 @@ func TestShouldRunTraceMode(t *testing.T) {
}
}
+func TestShouldAutoStopByDuration(t *testing.T) {
+ base := flags.Flags{}
+ if shouldAutoStopByDuration(base) {
+ t.Fatalf("expected default TUI mode not to auto-stop by duration")
+ }
+
+ withPlain := base
+ withPlain.PlainMode = true
+ if !shouldAutoStopByDuration(withPlain) {
+ t.Fatalf("expected plain mode to auto-stop by duration")
+ }
+
+ withFlamegraph := base
+ withFlamegraph.FlamegraphEnable = true
+ if !shouldAutoStopByDuration(withFlamegraph) {
+ t.Fatalf("expected flamegraph mode to auto-stop by duration")
+ }
+
+ withPprof := base
+ withPprof.PprofEnable = true
+ if !shouldAutoStopByDuration(withPprof) {
+ t.Fatalf("expected pprof mode to auto-stop by duration")
+ }
+}
+
func TestDispatchRunUsesTraceModeWhenRequested(t *testing.T) {
origRunTrace := runTraceFn
origRunTUI := runTUIFn