diff options
| -rw-r--r-- | internal/flags/flags.go | 2 | ||||
| -rw-r--r-- | internal/flags/flags_test.go | 4 | ||||
| -rw-r--r-- | internal/flamegraph/liveserver.go | 2 |
3 files changed, 4 insertions, 4 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) } } diff --git a/internal/flamegraph/liveserver.go b/internal/flamegraph/liveserver.go index 1cbb1d4..032bc3b 100644 --- a/internal/flamegraph/liveserver.go +++ b/internal/flamegraph/liveserver.go @@ -68,7 +68,7 @@ func handleSSE(lt *LiveTrie, interval time.Duration) http.HandlerFunc { return } if interval <= 0 { - interval = time.Second + interval = 200 * time.Millisecond } w.Header().Set("Content-Type", "text/event-stream") |
