diff options
author | Rasmus Dahlberg <rasmus@rgdd.se> | 2023-03-30 16:28:19 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@rgdd.se> | 2023-03-30 16:28:19 +0200 |
commit | 4a36fbdc9972c5b6101d6f3bc9bd0a77c8c83fd4 (patch) | |
tree | 6efecb8d7417b25016571d7401446bd76a0152ae /internal/options | |
parent | d44f024386316a364ddf9bc17762883cea3ddfc0 (diff) |
Add input file read rate-limit
Diffstat (limited to 'internal/options')
-rw-r--r-- | internal/options/options.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/options/options.go b/internal/options/options.go index d01ba83..9e1a653 100644 --- a/internal/options/options.go +++ b/internal/options/options.go @@ -21,6 +21,7 @@ type Options struct { CheckerDomain string CheckerInterval time.Duration MetricsInterval time.Duration + Limit int } func Parse() (opts Options) { @@ -36,6 +37,7 @@ func Parse() (opts Options) { 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.Parse() return |