From 388caec0b6ed6b9cccb15de7ee2f093361772764 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Fri, 24 Mar 2023 19:59:36 +0100 Subject: Few clean-ups --- internal/options/options.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/options') diff --git a/internal/options/options.go b/internal/options/options.go index f7510ba..8e10686 100644 --- a/internal/options/options.go +++ b/internal/options/options.go @@ -10,6 +10,7 @@ type Options struct { NumWorkers int MetricsInterval time.Duration Timeout time.Duration + MaxResponse int64 } func Parse() (opts Options) { @@ -17,6 +18,7 @@ func Parse() (opts Options) { flag.IntVar(&opts.NumWorkers, "w", 10, "number of parallel workers") flag.DurationVar(&opts.Timeout, "t", 10*time.Second, "timeout for each website visit") flag.DurationVar(&opts.MetricsInterval, "m", 5*time.Second, "how often to emit metrics") + flag.Int64Var(&opts.MaxResponse, "r", 128*1024*1024, "max response body size to accept") flag.Parse() return } -- cgit v1.2.3