Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotConfig ¶
type BotConfig struct { Dimensions []string `json:"dimensions"` Bots map[string]bool `json:"bots"` // maps bot id to boolean TaskAverageDurations []TaskDuration `json:"tasks"` }
BotConfig represents one bot config we test on. I.e. one group of dimensions that execute tasks.
type CapacityClient ¶
type CapacityClient interface { // QueryAll updates the capacity metrics. QueryAll(ctx context.Context) error // StartLoading begins an infinite loop to recompute the capacity metrics after a // given interval of time. Any errors are logged, but the loop is not broken. StartLoading(ctx context.Context, interval time.Duration) // Returns the most recent capacity metrics. Keyed by stringified dimensions. CapacityMetrics() map[string]BotConfig }
CapacityClient provides methods for tracking bot capacity.
type CapacityClientImpl ¶
type CapacityClientImpl struct {
// contains filtered or unexported fields
}
func New ¶
func New(tcc *task_cfg_cache.TaskCfgCacheImpl, tasks cache.TaskCache, repos repograph.Map) *CapacityClientImpl
Caller is responsible for periodically updating the arguments.
func (*CapacityClientImpl) CapacityMetrics ¶
func (c *CapacityClientImpl) CapacityMetrics() map[string]BotConfig
CapacityMetrics implements CapacityClient.
func (*CapacityClientImpl) QueryAll ¶
func (c *CapacityClientImpl) QueryAll(ctx context.Context) error
QueryAll implements CapacityClient.
func (*CapacityClientImpl) StartLoading ¶
func (c *CapacityClientImpl) StartLoading(ctx context.Context, interval time.Duration)
StartLoading implements CapacityClient.
Click to show internal directories.
Click to hide internal directories.