Documentation
¶
Index ¶
- Constants
- Variables
- func AdvisorDegradation(advisorHealth, enableReclaim bool) bool
- func CPUIsSufficient(request, available float64) bool
- func GetContainerRequestedCores(metaServer *metaserver.MetaServer, allocationInfo *state.AllocationInfo) float64
- func GetCoresReservedForSystem(conf *config.Configuration, metaServer *metaserver.MetaServer, ...) (machine.CPUSet, error)
- func PackAllocationResponse(allocationInfo *state.AllocationInfo, resourceName, ociPropertyName string, ...) (*pluginapi.ResourceAllocationResponse, error)
- func PopulateHintsByAvailableNUMANodes(numaNodes []int, hints *pluginapi.ListOfTopologyHints, preferred bool)
- func RegenerateHints(allocationInfo *state.AllocationInfo, regenerate bool) map[string]*pluginapi.ListOfTopologyHints
- type Entries
- type MetricInfo
- type MetricRing
- func (ring *MetricRing) Avg() float64
- func (ring *MetricRing) AvgAfterTimestampWithCountBound(ts int64, countBound int) (float64, error)
- func (ring *MetricRing) Count() (softOverCount, hardOverCount int)
- func (ring *MetricRing) Len() int
- func (ring *MetricRing) OverCount(threshold float64) (overCount int)
- func (ring *MetricRing) Push(snapShot *MetricSnapshot)
- func (ring *MetricRing) Sum() float64
- type MetricSnapshot
- type NumaMetricHistory
- type PoolMetricCollectHandler
- type SubEntries
Constants ¶
View Source
const (
FakePodUID = ""
)
Variables ¶
View Source
var ( ErrNoAvailableCPUHints = pkgerrors.New("no available cpu hints") ErrNoAvailableMemoryBandwidthHints = pkgerrors.New("no available memory bandwidth hints") )
Functions ¶
func AdvisorDegradation ¶ added in v0.5.4
func CPUIsSufficient ¶ added in v0.5.12
func GetContainerRequestedCores ¶ added in v0.5.28
func GetContainerRequestedCores(metaServer *metaserver.MetaServer, allocationInfo *state.AllocationInfo) float64
GetContainerRequestedCores parses and returns request cores for the given container
func GetCoresReservedForSystem ¶ added in v0.4.0
func GetCoresReservedForSystem(conf *config.Configuration, metaServer *metaserver.MetaServer, machineInfo *machine.KatalystMachineInfo, allCPUs machine.CPUSet) (machine.CPUSet, error)
func PackAllocationResponse ¶ added in v0.4.0
func PackAllocationResponse(allocationInfo *state.AllocationInfo, resourceName, ociPropertyName string, isNodeResource, isScalarResource bool, req *pluginapi.ResourceRequest, ) (*pluginapi.ResourceAllocationResponse, error)
PackAllocationResponse fills pluginapi.ResourceAllocationResponse with information from AllocationInfo and pluginapi.ResourceRequest
func PopulateHintsByAvailableNUMANodes ¶ added in v0.5.28
func PopulateHintsByAvailableNUMANodes( numaNodes []int, hints *pluginapi.ListOfTopologyHints, preferred bool, )
func RegenerateHints ¶ added in v0.4.0
func RegenerateHints(allocationInfo *state.AllocationInfo, regenerate bool) map[string]*pluginapi.ListOfTopologyHints
RegenerateHints regenerates hints for container that'd already been allocated cpu, and regenerateHints will assemble hints based on already-existed AllocationInfo, without any calculation logics at all
Types ¶
type Entries ¶ added in v0.5.33
type Entries map[string]SubEntries
Entries are keyed by pod UID or pool name
type MetricInfo ¶ added in v0.5.33
type MetricRing ¶ added in v0.5.33
type MetricRing struct {
MaxLen int
Queue []*MetricSnapshot
CurrentIndex int
sync.RWMutex
}
func CreateMetricRing ¶ added in v0.5.33
func CreateMetricRing(size int) *MetricRing
func (*MetricRing) Avg ¶ added in v0.5.33
func (ring *MetricRing) Avg() float64
func (*MetricRing) AvgAfterTimestampWithCountBound ¶ added in v0.5.33
func (ring *MetricRing) AvgAfterTimestampWithCountBound(ts int64, countBound int) (float64, error)
func (*MetricRing) Count ¶ added in v0.5.33
func (ring *MetricRing) Count() (softOverCount, hardOverCount int)
func (*MetricRing) Len ¶ added in v0.5.33
func (ring *MetricRing) Len() int
func (*MetricRing) OverCount ¶ added in v0.5.33
func (ring *MetricRing) OverCount(threshold float64) (overCount int)
OverCount pass threshold from outside
func (*MetricRing) Push ¶ added in v0.5.33
func (ring *MetricRing) Push(snapShot *MetricSnapshot)
func (*MetricRing) Sum ¶ added in v0.5.33
func (ring *MetricRing) Sum() float64
type MetricSnapshot ¶ added in v0.5.33
type MetricSnapshot struct {
Info MetricInfo
Time int64
}
type NumaMetricHistory ¶ added in v0.5.33
type NumaMetricHistory struct {
// numa -> pod -> metric -> ring
Inner map[int]map[string]map[string]*MetricRing
RingSize int
}
func NewMetricHistory ¶ added in v0.5.33
func NewMetricHistory(ringSize int) *NumaMetricHistory
type PoolMetricCollectHandler ¶ added in v0.5.33
type SubEntries ¶ added in v0.5.33
type SubEntries map[string]*MetricRing
SubEntries is keyed by container name or empty string (for pool)
func (SubEntries) IsPoolEntry ¶ added in v0.5.33
func (se SubEntries) IsPoolEntry() bool
Click to show internal directories.
Click to hide internal directories.