From 57bad06f0fc9f63078e97ce5871a28a93029c473 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 14 Mar 2025 20:38:59 +0200 Subject: add --duration flag --- internal/flags/flags.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/flags') 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") -- cgit v1.2.3