summaryrefslogtreecommitdiff
path: root/internal/flags
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-27 23:04:55 +0200
committerPaul Buetow <paul@buetow.org>2026-02-27 23:04:55 +0200
commitf16162fc01429c1759adb4a63ba9a31f229e1603 (patch)
tree2c9e28ff20f1efc7918b5b2ea16558f50cc63217 /internal/flags
parent89e864669d62a88f337c02d2097de4afb37e6333 (diff)
flamegraph: default live update interval to 200ms
Diffstat (limited to 'internal/flags')
-rw-r--r--internal/flags/flags.go2
-rw-r--r--internal/flags/flags_test.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/internal/flags/flags.go b/internal/flags/flags.go
index 8785ea9..3f6bfc3 100644
--- a/internal/flags/flags.go
+++ b/internal/flags/flags.go
@@ -121,7 +121,7 @@ func parse() {
flag.BoolVar(&singleton.PlainMode, "plain", false, "Enable plain CSV output mode (disable TUI)")
flag.BoolVar(&singleton.FlamegraphEnable, "flamegraph", false, "Enable flamegraph builder")
flag.BoolVar(&singleton.LiveFlamegraph, "live", false, "Enable live flamegraph mode")
- flag.DurationVar(&singleton.LiveInterval, "live-interval", time.Second, "Live flamegraph refresh interval")
+ flag.DurationVar(&singleton.LiveInterval, "live-interval", 200*time.Millisecond, "Live flamegraph refresh interval")
flag.StringVar(&singleton.FlamegraphName, "name", "default", "Name of the flamegraph, used to generate the SVG file")
flag.BoolVar(&singleton.TUIExportEnable, "tuiExport", true, "Enable writing TUI snapshot export files")
diff --git a/internal/flags/flags_test.go b/internal/flags/flags_test.go
index 872a597..9fc6570 100644
--- a/internal/flags/flags_test.go
+++ b/internal/flags/flags_test.go
@@ -70,8 +70,8 @@ func TestParseLiveDefaults(t *testing.T) {
if cfg.LiveFlamegraph {
t.Fatalf("expected live mode disabled by default")
}
- if cfg.LiveInterval != time.Second {
- t.Fatalf("default live interval = %v, want %v", cfg.LiveInterval, time.Second)
+ if cfg.LiveInterval != 200*time.Millisecond {
+ t.Fatalf("default live interval = %v, want %v", cfg.LiveInterval, 200*time.Millisecond)
}
}