diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -14,6 +14,7 @@ import ( "fmt" "log" "os" + "time" "git.cs.kau.se/rasmoste/ct-sans/internal/ctflag" ) @@ -43,15 +44,17 @@ Options: -k, --batch-disk: Certificate batch size before persisting (Default: 16384) -q, --batch-req: Certificate batch size to use in request (Default: 512) -a, --http-agent: HTTP agent to use in all request (Default: "git.cs.kau.se/rasmoste/ct-sans") + -m, --metrics: How often to emit metrics to stderr (Default: 15s) ` type options struct { - Directory string - WorkersPerLog uint64 - PersistSize uint64 - BatchSize uint64 - HTTPAgent string + Directory string + WorkersPerLog uint64 + PersistSize uint64 + BatchSize uint64 + HTTPAgent string + MetricsInterval time.Duration logDirectory string metadataFile string @@ -78,6 +81,7 @@ func main() { ctflag.Uint64(&fs, &opts.PersistSize, "batch-disk", "k", 16384) ctflag.Uint64(&fs, &opts.BatchSize, "batch-req", "q", 512) ctflag.String(&fs, &opts.HTTPAgent, "http-agent", "a", "git.cs.kau.se/rasmoste/ct-sans") + ctflag.Duration(&fs, &opts.MetricsInterval, "metrics", "m", 15*time.Second) // Parse command-line options and hardcode additional values if err := ctflag.Parse(fs, os.Args[2:]); err != nil { |