diff options
| author | Paul Buetow <paul@buetow.org> | 2025-03-14 20:38:59 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-03-14 20:38:59 +0200 |
| commit | 57bad06f0fc9f63078e97ce5871a28a93029c473 (patch) | |
| tree | 7e0c4ad35f47355f6f75ba1e6d04098081c81645 /internal/flags/flags.go | |
| parent | 092ba747e516620054852f012dbc7d00031683dd (diff) | |
add --duration flag
Diffstat (limited to 'internal/flags/flags.go')
| -rw-r--r-- | internal/flags/flags.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/flags/flags.go b/internal/flags/flags.go index da62f34..4d375fc 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -16,12 +16,14 @@ type Flags struct { PathFilter string PprofEnable bool FlamegraphEnable bool + Duration int } func New() (flags Flags) { flag.IntVar(&flags.PidFilter, "pid", -1, "Filter for processes ID") flag.IntVar(&flags.TidFilter, "tid", -1, "Filter for thread ID") flag.IntVar(&flags.EventMapSize, "mapSize", 4096*16, "BPF FD event ring buffer map size") + flag.IntVar(&flags.Duration, "duration", 60, "Probe duration in seconds") flag.StringVar(&flags.CommFilter, "comm", "", "Command to filter for") flag.StringVar(&flags.PathFilter, "path", "", "Path to filter for") flag.BoolVar(&flags.PprofEnable, "pprof", false, "Enable profiling") |
