Documentation ¶
Index ¶
- Variables
- func CreateContainerPowerEstimatorModel(...)
- func CreateNodeComponentPoweEstimatorModel(...)
- func CreateNodePlatformPoweEstimatorModel(...)
- func CreatePowerEstimatorModels(...)
- func CreatePowerModelConfig(powerSourceTarget string) *types.ModelConfig
- func CreateProcessPowerEstimatorModel(...)
- func GetNodeComponentPowers(nodeMetrics *collector_metric.NodeMetrics, isIdlePower bool) (nodeComponentsEnergy map[int]source.NodeComponentsEnergy)
- func GetNodePlatformPower(nodeMetrics *collector_metric.NodeMetrics, isIdlePower bool) (platformEnergy map[string]float64)
- func IsNodeComponentPowerModelEnabled() bool
- func IsNodePlatformPowerModelEnabled() bool
- func UpdateContainerEnergy(containersMetrics map[string]*collector_metric.ContainerMetrics, ...)
- func UpdateNodeComponentEnergy(nodeMetrics *collector_metric.NodeMetrics)
- func UpdateNodePlatformEnergy(nodeMetrics *collector_metric.NodeMetrics)
- func UpdateProcessEnergy(processMetrics map[uint64]*collector_metric.ProcessMetrics, ...)
- type PowerMoldelInterface
Constants ¶
This section is empty.
Variables ¶
var (
EstimatorSidecarSocket = "/tmp/estimator.sock"
)
Functions ¶
func CreateContainerPowerEstimatorModel ¶ added in v0.5.4
func CreateContainerPowerEstimatorModel(containerFeatureNames, systemMetaDataFeatureNames, systemMetaDataFeatureValues []string)
func CreateNodeComponentPoweEstimatorModel ¶ added in v0.5.4
func CreateNodeComponentPoweEstimatorModel(nodeFeatureNames, systemMetaDataFeatureNames, systemMetaDataFeatureValues []string)
CreateNodeComponentPoweEstimatorModel only create a new power model estimater if node components power metrics are not available
func CreateNodePlatformPoweEstimatorModel ¶ added in v0.5.4
func CreateNodePlatformPoweEstimatorModel(nodeFeatureNames, systemMetaDataFeatureNames, systemMetaDataFeatureValues []string)
CreateNodeComponentPoweEstimatorModel only create a new power model estimater if node platform power metrics are not available
func CreatePowerEstimatorModels ¶ added in v0.5.4
func CreatePowerEstimatorModels(containerFeatureNames, systemMetaDataFeatureNames, systemMetaDataFeatureValues []string)
CreatePowerEstimatorModels checks validity of power model and set estimate functions
func CreatePowerModelConfig ¶ added in v0.5.4
func CreatePowerModelConfig(powerSourceTarget string) *types.ModelConfig
CreatePowerModelConfig loads the power model configurations from the ConfigMap, including the Model type, name, filter, URL to download data, and model output type. The powerSourceTarget parameter acts as a prefix, which can have values like NODE_TOTAL, NODE_COMPONENTS, CONTAINER_COMPONENTS, etc. The complete variable name is created by combining the prefix with the specific attribute. For example, if the model name (which the key is MODEL) is under NODE_TOTAL, it will be called NODE_TOTAL_MODEL.
func CreateProcessPowerEstimatorModel ¶ added in v0.5.4
func CreateProcessPowerEstimatorModel(processFeatureNames, systemMetaDataFeatureNames, systemMetaDataFeatureValues []string)
func GetNodeComponentPowers ¶
func GetNodeComponentPowers(nodeMetrics *collector_metric.NodeMetrics, isIdlePower bool) (nodeComponentsEnergy map[int]source.NodeComponentsEnergy)
GetNodeComponentPowers returns estimated RAPL power for the node
func GetNodePlatformPower ¶ added in v0.5.4
func GetNodePlatformPower(nodeMetrics *collector_metric.NodeMetrics, isIdlePower bool) (platformEnergy map[string]float64)
GetNodePlatformPower returns a single estimated value of node total power
func IsNodeComponentPowerModelEnabled ¶
func IsNodeComponentPowerModelEnabled() bool
IsNodeComponentPowerModelEnabled returns if the estimator has been enabled or not
func IsNodePlatformPowerModelEnabled ¶
func IsNodePlatformPowerModelEnabled() bool
IsNodePlatformPowerModelEnabled returns if the estimator has been enabled or not
func UpdateContainerEnergy ¶
func UpdateContainerEnergy(containersMetrics map[string]*collector_metric.ContainerMetrics, nodeMetrics *collector_metric.NodeMetrics)
UpdateContainerEnergy resets the power model samples, add new samples to the power models, then estimates the idle and dynamic energy
func UpdateNodeComponentEnergy ¶ added in v0.5.4
func UpdateNodeComponentEnergy(nodeMetrics *collector_metric.NodeMetrics)
UpdateNodeComponentEnergy resets the power model samples, add new samples to the power models, then estimates the idle and absolute energy
func UpdateNodePlatformEnergy ¶ added in v0.5.4
func UpdateNodePlatformEnergy(nodeMetrics *collector_metric.NodeMetrics)
UpdateNodePlatformEnergy resets the power model samples, add new samples to the power models, then estimates the idle and dynamic energy
func UpdateProcessEnergy ¶
func UpdateProcessEnergy(processMetrics map[uint64]*collector_metric.ProcessMetrics, nodeMetrics *collector_metric.NodeMetrics)
UpdateProcessEnergy resets the power model samples, add new samples to the power models, then estimates the idle and dynamic energy
Types ¶
type PowerMoldelInterface ¶ added in v0.5.4
type PowerMoldelInterface interface { // AddContainerFeatureValues adds the new x as a point for trainning or prediction. Where x are explanatory variable (or the independent variable). // x values are added to a sliding window with circular list for dynamic data flow AddContainerFeatureValues(x []float64) // AddNodeFeatureValues adds the new x as a point for trainning or prediction. Where x are explanatory variable (or the independent variable). AddNodeFeatureValues(x []float64) // AddDesiredOutValue adds the new y as a point for trainning. Where y the response variable (or the dependent variable). AddDesiredOutValue(y float64) // ResetSampleIdx set the sample sliding window index, setting to 0 to overwrite the old samples with new ones for trainning or prediction. ResetSampleIdx() // Train triggers the regressiong fit after adding data points to create a new power model Train() error // IsEnabled returns true if the power model was trained and is active IsEnabled() bool // GetModelType returns if the model is Ratio, LinearRegressor or EstimatorSidecar GetModelType() types.ModelType // GetContainerFeatureNamesList returns the list of container features that the model was configured to use GetContainerFeatureNamesList() []string // GetNodeFeatureNamesList returns the list of node features that the model was configured to use GetNodeFeatureNamesList() []string // GetPlatformPower returns the total Platform Power in Watts associated to each process/container/pod // If isIdlePower is true, return the idle power, otherwise return the dynamic or absolute power depending on the model. GetPlatformPower(isIdlePower bool) ([]float64, error) // GetComponentsPower returns RAPL components Power in Watts associated to each each process/container/pod // If isIdlePower is true, return the idle power, otherwise return the dynamic or absolute power depending on the model. GetComponentsPower(isIdlePower bool) ([]source.NodeComponentsEnergy, error) // GetComponentsPower returns GPU Power in Watts associated to each each process/container/pod // If isIdlePower is true, return the idle power, otherwise return the dynamic or absolute power depending on the model. GetGPUPower(isIdlePower bool) ([]float64, error) }
PowerMoldelInterface defines the power model sckeleton
var ( ContainerPlatformPowerModel PowerMoldelInterface ContainerComponentPowerModel PowerMoldelInterface )
var ( ProcessPlatformPowerModel PowerMoldelInterface ProcessComponentPowerModel PowerMoldelInterface )
var ( // the absulute power model includes both the absolute and idle power consumption NodeComponentPowerModel PowerMoldelInterface )
var (
NodePlatformPowerModel PowerMoldelInterface
)