From 55c8cb7e31eb838f529f43d64bc40cd4917b750d Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Thu, 30 Mar 2023 16:34:16 +0200 Subject: Tweak default options and info print --- internal/options/options.go | 4 ++-- main.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/options/options.go b/internal/options/options.go index 9e1a653..3d03e19 100644 --- a/internal/options/options.go +++ b/internal/options/options.go @@ -30,14 +30,14 @@ func Parse() (opts Options) { flag.Int64Var(&opts.StartLineInclusive, "s", 0, "first line to read in input file, inclusive and zero-based index") flag.Int64Var(&opts.EndLineExclusive, "e", 0, "last line to read in input file, exclusive and zero-based; 0 to disable") - flag.IntVar(&opts.NumWorkers, "w", 2, "number of parallel workers") + flag.IntVar(&opts.NumWorkers, "w", 32, "number of parallel workers") flag.DurationVar(&opts.Timeout, "t", 10*time.Second, "timeout for each website visit") flag.Int64Var(&opts.MaxResponse, "r", 128, "max response body size to accept in MiB") flag.StringVar(&opts.CheckerDomain, "c", "", "domain with onion location for setup santity-checks") flag.DurationVar(&opts.CheckerInterval, "C", 10*time.Second, "how often to to run checker") flag.DurationVar(&opts.MetricsInterval, "m", 5*time.Second, "how often to emit metrics") - flag.IntVar(&opts.Limit, "l", 10, "rate-limit that kicks in before feeding workers in reads/s") + flag.IntVar(&opts.Limit, "l", 16, "rate-limit that kicks in before handing out work in requests/s") flag.Parse() return diff --git a/main.go b/main.go index a6ee613..32c9a6b 100644 --- a/main.go +++ b/main.go @@ -71,7 +71,7 @@ func main() { }() } - log.Printf("INFO: starting %d workers\n", opts.NumWorkers) + log.Printf("INFO: starting %d workers with rate-limit %d requests/s\n", opts.NumWorkers, opts.Limit) for i := 0; i < opts.NumWorkers; i++ { go func() { wg.Add(1) -- cgit v1.2.3