diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-27 16:59:26 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-27 16:59:26 +0200 |
| commit | e1ebebb3825f9e977067cc09caf68e18e9acf349 (patch) | |
| tree | 3a5ea0e3be3687da4e24dcc9d9caf37cc16f4792 /internal/flags | |
| parent | 31044062cc6859fb25d6916f896a318f7a30dd60 (diff) | |
flags: add live flamegraph CLI options
Diffstat (limited to 'internal/flags')
| -rw-r--r-- | internal/flags/flags.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/flags/flags.go b/internal/flags/flags.go index 6eafa5e..dccbe0d 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -9,6 +9,7 @@ import ( "strings" "sync" "sync/atomic" + "time" bpf "github.com/aquasecurity/libbpfgo" ) @@ -63,6 +64,8 @@ type Flags struct { // Flamegraph flags PlainMode bool FlamegraphEnable bool + LiveFlamegraph bool + LiveInterval time.Duration FlamegraphName string TUIExportEnable bool @@ -117,6 +120,8 @@ 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.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") |
