Documentation ¶
Index ¶
- func CheckCPUGovernorsAndResumeLatency(cpus []int, nodeName, pmQos, governor string) error
- func CollectPowerMetricsWithNoWorkload(duration, samplingInterval time.Duration, tag, nodeName string) (map[string]string, error)
- func CollectPowerUsageMetrics(duration, samplingInterval time.Duration, scenario, tag, nodeName string) (map[string]string, error)
- func DefineQoSTestPod(namespace namespace.Builder, ...) *pod.Builder
- func DeployProcessExporter() *daemonset.Builder
- func GetComponentName(profileName string, prefix string) string
- func GetEnv(key, fallback string) string
- func GetHostPowerUsage(nodeName string) (map[string]float64, error)
- func GetPerformanceProfileWithCPUSet() (*nto.Builder, error)
- func GetPowerState(perfProfile *nto.Builder) (powerState string, err error)
- func IsIpmitoolExist(nodeName string) bool
- func IsSingleNodeCluster(client *clients.Settings) bool
- func Max(input []float64) (max float64, err error)
- func Mean(input []float64) (mean float64, err error)
- func Median(input []float64) (median float64, err error)
- func Min(input []float64) (min float64, err error)
- func ParseBmcInfo(conf *config.GeneralConfig) (bmcUser, bmcPassword string, bmcHosts []string)
- func RedefineContainerResources(pod *pod.Builder, cpuRequest string, cpuLimit string, memoryRequest string, ...) *pod.Builder
- func SetPowerMode(perfProfile *nto.Builder, ...) error
- func StdDev(input []float64) (stdev float64, err error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCPUGovernorsAndResumeLatency ¶
CheckCPUGovernorsAndResumeLatency Checks power and latency settings of the cpus.
func CollectPowerMetricsWithNoWorkload ¶
func CollectPowerMetricsWithNoWorkload(duration, samplingInterval time.Duration, tag, nodeName string) (map[string]string, error)
CollectPowerMetricsWithNoWorkload collects metrics with no workload.
func CollectPowerUsageMetrics ¶
func CollectPowerUsageMetrics(duration, samplingInterval time.Duration, scenario, tag, nodeName string) (map[string]string, error)
CollectPowerUsageMetrics collects power usage metrics.
func DefineQoSTestPod ¶
func DefineQoSTestPod(namespace namespace.Builder, nodeName, cpuReq, cpuLimit, memReq, memLimit string) *pod.Builder
DefineQoSTestPod defines test pod with given cpu and memory resources.
func DeployProcessExporter ¶
DeployProcessExporter deploys process exporter and returns the daemonset and error if any.
func GetComponentName ¶
GetComponentName returns the component name for the specific performance profile.
func GetHostPowerUsage ¶
GetHostPowerUsage retrieve host power utilization metrics queried via ipmitool command.
func GetPerformanceProfileWithCPUSet ¶
GetPerformanceProfileWithCPUSet returns the first performance profile found with reserved and isolated cpuset.
func GetPowerState ¶
GetPowerState determines the power state from the workloadHints object of the PerformanceProfile.
func IsIpmitoolExist ¶
IsIpmitoolExist returns true if ipmitool is installed on test executor, otherwise false.
func IsSingleNodeCluster ¶
IsSingleNodeCluster returns true if the cluster is single-node, otherwise false.
func ParseBmcInfo ¶
func ParseBmcInfo(conf *config.GeneralConfig) (bmcUser, bmcPassword string, bmcHosts []string)
ParseBmcInfo returns bmc username, password, and hosts from environment variables if exist.
func RedefineContainerResources ¶
func RedefineContainerResources( pod *pod.Builder, cpuRequest string, cpuLimit string, memoryRequest string, memoryLimit string) *pod.Builder
RedefineContainerResources redefines a pod builder with CPU and Memory resources in first container Use empty string to skip a resource. e.g., cpuLimit="".
Types ¶
type Config ¶
type Config struct { General struct { ReportDirAbsPath string `yaml:"report" envconfig:"REPORT_DIR_NAME"` CnfNodeLabel string `yaml:"cnf_worker_label" envconfig:"ROLE_WORKER_CNF"` DumpFailedTestsReportLocation string `envconfig:"REPORTER_ERROR_OUTPUT"` PolarionReport bool `yaml:"polarion_report" envconfig:"POLARION_REPORT"` } `yaml:"general"` Network struct { TestContainerImage string `yaml:"test_container_image" envconfig:"NETWORK_TEST_CONTAINER_IMAGE"` SriovInterfaces string `envconfig:"CNF_INTERFACES_LIST"` MetalLBAddressPoolIP string `envconfig:"METALLB_ADDR_LIST"` MetalLBSwitchInterfaces string `envconfig:"METALLB_SWITCH_INTERFACES"` MetalLBVlanIDs string `envconfig:"METALLB_VLANS"` FrrImage string `yaml:"frr_image" envconfig:"FRR_IMAGE"` SwitchUser string `envconfig:"SWITCH_USER"` SwitchPass string `envconfig:"SWITCH_PASS"` SwitchIP string `envconfig:"SWITCH_IP"` SwitchInterfaces string `envconfig:"SWITCH_INTERFACES"` } `yaml:"network"` Ran struct { CnfTestImage string `yaml:"cnf_test_image" envconfig:"CNF_TEST_IMAGE"` StressngTestImage string `yaml:"stressng_test_image" envconfig:"STRESSNG_TEST_IMAGE"` OslatTestImage string `yaml:"oslat_test_image" envconfig:"OSLAT_TEST_IMAGE"` ProcessExporterImage string `yaml:"process_exporter_image" envconfig:"PROCESS_EXPORTER_IMAGE"` ProcessExporterConfigsDir string `yaml:"process_exporter_resources"` BmcHosts string `envconfig:"BMC_HOSTS"` BmcUser string `yaml:"bmc_user" envconfig:"BMC_USER"` BmcPassword string `yaml:"bmc_password" envconfig:"BMC_PASSWORD"` PduAddr string `envconfig:"PDU_ADDR"` PduSocket string `envconfig:"PDU_SOCKET"` RanEventTestDebug string `envconfig:"RAN_EVENT_TEST_DEBUG"` ConsumerImage string `yaml:"consumer_image" envconfig:"CLOUD_EVENT_CONSUMER_IMAGE"` BmerTestDebug string `envconfig:"BMER_TEST_DEBUG"` BmerConfigsDir string `yaml:"bmer_consumer_manifests"` PtpConfigsDir string `yaml:"ptp_consumer_manifests"` KubeconfigHub string `envconfig:"KUBECONFIG_HUB"` OcpUpgradeUpstreamURL string `yaml:"ocp_upgrade_upstream_url" envconfig:"OCP_UPGRADE_UPSTREAM_URL"` TalmPrecachePolicies []string `envconfig:"TALM_PRECACHE_POLICIES" yaml:"talm_precache_policies"` KubeconfigSpoke2 string `envconfig:"KUBECONFIG_SPOKE2"` ZtpGitRepo string `envconfig:"ZTP_GIT_REPO"` ZtpGitBranch string `envconfig:"ZTP_GIT_BRANCH"` ZtpGitDir string `envconfig:"ZTP_GIT_DIR"` } `yaml:"ran"` }
Config type keeps general configuration.