utils

package
v0.0.0-...-291ff04 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCPULoad

func GetCPULoad(monitor *CpuLoadMonitor) float64

func GetCPUTarget

func GetCPUTarget(controller *CpuLoadController) float64

func GetSleepTime

func GetSleepTime(controller *CpuLoadController) time.Duration

func RunCpuLoader

func RunCpuLoader(actuator *CpuLoadGenerator) time.Duration

Actuator

func SetCPU

func SetCPU(controller *CpuLoadController, cpu float64)

func SetCPUTarget

func SetCPUTarget(controller *CpuLoadController, target float64)

func StartCpuLoadController

func StartCpuLoadController(controller *CpuLoadController)

func StartCpuMonitor

func StartCpuMonitor(monitor *CpuLoadMonitor)

func StopCpuLoadController

func StopCpuLoadController(controller *CpuLoadController)

func StopCpuMonitor

func StopCpuMonitor(monitor *CpuLoadMonitor)

Types

type CpuLoadController

type CpuLoadController struct {
	// contains filtered or unexported fields
}

func NewCpuLoadController

func NewCpuLoadController(samplingInterval time.Duration, cpuTarget float64) *CpuLoadController

type CpuLoadGenerator

type CpuLoadGenerator struct {
	// contains filtered or unexported fields
}

func NewCpuLoadGenerator

func NewCpuLoadGenerator(controller *CpuLoadController, monitor *CpuLoadMonitor, duration time.Duration) *CpuLoadGenerator

type CpuLoadMonitor

type CpuLoadMonitor struct {
	// contains filtered or unexported fields
}

func NewCpuLoadMonitor

func NewCpuLoadMonitor(cpu float64, interval time.Duration) *CpuLoadMonitor

Jump to

Keyboard shortcuts

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