sidecar

package
v0.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentPowerResponse

type ComponentPowerResponse struct {
	Powers  map[string][]float64 `json:"powers"`
	Message string               `json:"msg"`
}

ComponentPowerResponse defines a response of a map of component powers from Kepler Estimator

type EstimatorSidecarConnector

type EstimatorSidecarConnector struct {
	Socket         string
	UsageMetrics   []string
	OutputType     types.ModelOutputType
	SystemFeatures []string
	ModelName      string
	SelectFilter   string
	// contains filtered or unexported fields
}

EstimatorSidecarConnector defines power estimator with Kepler Estimator sidecar

func (*EstimatorSidecarConnector) GetComponentPower

func (c *EstimatorSidecarConnector) GetComponentPower(usageValues [][]float64, systemValues []string) (map[string][]float64, error)

GetComponentPower makes a request to Kepler Estimator Sidecar and return a list of total powers

func (*EstimatorSidecarConnector) GetTotalPower

func (c *EstimatorSidecarConnector) GetTotalPower(usageValues [][]float64, systemValues []string) ([]float64, error)

GetTotalPower makes a request to Kepler Estimator Sidecar and returns a list of total powers

func (*EstimatorSidecarConnector) Init

func (c *EstimatorSidecarConnector) Init(systemValues []string) bool

Init returns valid if estimator is connected and has compatible power model

type PowerRequest

type PowerRequest struct {
	UsageMetrics   []string    `json:"metrics"`
	UsageValues    [][]float64 `json:"values"`
	OutputType     string      `json:"output_type"`
	SystemFeatures []string    `json:"system_features"`
	SystemValues   []string    `json:"system_values"`
	ModelName      string      `json:"model_name"`
	SelectFilter   string      `json:"filter"`
}

PowerRequest defines a request to Kepler Estimator to get estimated powers

type TotalPowerResponse

type TotalPowerResponse struct {
	Powers  []float64 `json:"powers"`
	Message string    `json:"msg"`
}

TotalPowerResponse defines a response of a list of total powers from Kepler Estimator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL