3ee6c14f54
We want to increase our throughput for downtime estimation. This commit adds the ability to reach out to multiple nodes concurrently for downtime estimation. The number of concurrent routines is determined by a new config flag, EstimationConcurrencyLimit. It also increases the default EstimationBatchSize to 1000. Change-Id: I800ce7ec1035885afa194c3c3f64eedd4f6f61eb
23 lines
790 B
Go
23 lines
790 B
Go
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package downtime
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/spacemonkeygo/monkit/v3"
|
|
)
|
|
|
|
var (
|
|
mon = monkit.Package()
|
|
)
|
|
|
|
// Config for the chore.
|
|
type Config struct {
|
|
DetectionInterval time.Duration `help:"how often to run the downtime detection chore." releaseDefault:"1h0s" devDefault:"30s"`
|
|
EstimationInterval time.Duration `help:"how often to run the downtime estimation chore" releaseDefault:"1h0s" devDefault:"30s"`
|
|
EstimationBatchSize int `help:"the downtime estimation chore should check this many offline nodes" releaseDefault:"1000" devDefault:"100"`
|
|
EstimationConcurrencyLimit int `help:"max number of concurrent connections in estimation chore" default:"10"`
|
|
}
|