Documentation ¶
Index ¶
Constants ¶
const ( // MegaFactor : Mega unit multiplier MegaFactor = float64(1. / 1024. / 1024.) )
Variables ¶
This section is empty.
Functions ¶
func GetMuSigma ¶
func GetMuSigma(rs *ResourceStats) (float64, float64)
GetMuSigma : get average and standard deviation from statistics
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector : get data from load watcher, encapsulating the load watcher and its operations
Trimaran plugins have different, potentially conflicting, objectives. Thus, it is recommended not to enable them concurrently. As such, they are currently designed to each have its own Collector. If a need arises in the future to enable multiple Trimaran plugins, a restructuring to have a single Collector, serving the multiple plugins, may be beneficial for performance reasons.
func NewCollector ¶
func NewCollector(trimaranSpec *pluginConfig.TrimaranSpec) (*Collector, error)
NewCollector : create an instance of a data collector
func (*Collector) GetNodeMetrics ¶
func (collector *Collector) GetNodeMetrics(nodeName string) ([]watcher.Metric, *watcher.WatcherMetrics)
GetNodeMetrics : get metrics for a node from watcher
type PodAssignEventHandler ¶
type PodAssignEventHandler struct { // Maintains the node-name to podInfo mapping for pods successfully bound to nodes ScheduledPodsCache map[string][]podInfo sync.RWMutex }
This event handler watches assigned Pod and caches them locally
func New ¶
func New() *PodAssignEventHandler
Returns a new instance of PodAssignEventHandler, after starting a background go routine for cache cleanup
func (*PodAssignEventHandler) AddToHandle ¶
func (p *PodAssignEventHandler) AddToHandle(handle framework.Handle)
AddToHandle : add event handler to framework handle
func (*PodAssignEventHandler) OnAdd ¶
func (p *PodAssignEventHandler) OnAdd(obj interface{})
func (*PodAssignEventHandler) OnDelete ¶
func (p *PodAssignEventHandler) OnDelete(obj interface{})
func (*PodAssignEventHandler) OnUpdate ¶
func (p *PodAssignEventHandler) OnUpdate(oldObj, newObj interface{})
type ResourceStats ¶
type ResourceStats struct { // average used (absolute) UsedAvg float64 // standard deviation used (absolute) UsedStdev float64 // req of pod Req float64 // node capacity Capacity float64 }
ResourceStats : statistics data for a resource
func CreateResourceStats ¶
func CreateResourceStats(metrics []watcher.Metric, node *v1.Node, podRequest *framework.Resource, resourceName v1.ResourceName, watcherType string) (rs *ResourceStats, isValid bool)
CreateResourceStats : get resource statistics data from measurements for a node
Directories ¶
Path | Synopsis |
---|---|
Package loadvariationriskbalancing plugin attempts to balance the risk in load variation across the cluster.
|
Package loadvariationriskbalancing plugin attempts to balance the risk in load variation across the cluster. |