source

package
v0.4.2 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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// this variable is used for unit and functional test purpose
	SystemCollectionSupported = false
)

Functions

func CloseAllMSR

func CloseAllMSR()

func GetRAPLEnergyByMSR

func GetRAPLEnergyByMSR(coreFunc, dramFunc, uncoreFunc, pkgFunc func(n int) (uint64, error)) map[int]NodeComponentsEnergy

func InitUnits

func InitUnits() error

func OpenAllMSR

func OpenAllMSR() error

func ReadAllPower

func ReadAllPower(f func(n int) (uint64, error)) (uint64, error)

func ReadCorePower

func ReadCorePower(packageID int) (uint64, error)

func ReadDramPower

func ReadDramPower(packageID int) (uint64, error)

func ReadMSR

func ReadMSR(packageID int, msr int64) (uint64, error)

func ReadPkgPower

func ReadPkgPower(packageID int) (uint64, error)

func ReadUncorePower

func ReadUncorePower(packageID int) (uint64, error)

Types

type ApmXgeneSysfs

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

func (*ApmXgeneSysfs) GetEnergyFromCore

func (r *ApmXgeneSysfs) GetEnergyFromCore() (uint64, error)

func (*ApmXgeneSysfs) GetEnergyFromDram

func (r *ApmXgeneSysfs) GetEnergyFromDram() (uint64, error)

func (*ApmXgeneSysfs) GetEnergyFromPackage

func (r *ApmXgeneSysfs) GetEnergyFromPackage() (uint64, error)

func (*ApmXgeneSysfs) GetEnergyFromUncore

func (r *ApmXgeneSysfs) GetEnergyFromUncore() (uint64, error)

func (*ApmXgeneSysfs) GetNodeComponentsEnergy

func (r *ApmXgeneSysfs) GetNodeComponentsEnergy() map[int]NodeComponentsEnergy

func (*ApmXgeneSysfs) IsSystemCollectionSupported

func (r *ApmXgeneSysfs) IsSystemCollectionSupported() bool

func (*ApmXgeneSysfs) StopPower

func (r *ApmXgeneSysfs) StopPower()

type NodeComponentsEnergy

type NodeComponentsEnergy struct {
	Core   uint64
	DRAM   uint64
	Uncore uint64
	Pkg    uint64
}

NodeComponentsEnergy defines set of energy per RAPL components in mJ

func (NodeComponentsEnergy) String

func (p NodeComponentsEnergy) String() string

type PowerDummy

type PowerDummy struct{}

func (*PowerDummy) GetEnergyFromCore

func (r *PowerDummy) GetEnergyFromCore() (uint64, error)

func (*PowerDummy) GetEnergyFromDram

func (r *PowerDummy) GetEnergyFromDram() (uint64, error)

func (*PowerDummy) GetEnergyFromPackage

func (r *PowerDummy) GetEnergyFromPackage() (uint64, error)

func (*PowerDummy) GetEnergyFromUncore

func (r *PowerDummy) GetEnergyFromUncore() (uint64, error)

func (*PowerDummy) GetNodeComponentsEnergy

func (r *PowerDummy) GetNodeComponentsEnergy() map[int]NodeComponentsEnergy

func (*PowerDummy) IsSystemCollectionSupported

func (r *PowerDummy) IsSystemCollectionSupported() bool

func (*PowerDummy) StopPower

func (r *PowerDummy) StopPower()

type PowerEstimate

type PowerEstimate struct{}

func (*PowerEstimate) GetEnergyFromCore

func (r *PowerEstimate) GetEnergyFromCore() (uint64, error)

func (*PowerEstimate) GetEnergyFromDram

func (r *PowerEstimate) GetEnergyFromDram() (uint64, error)

func (*PowerEstimate) GetEnergyFromPackage

func (r *PowerEstimate) GetEnergyFromPackage() (uint64, error)

func (*PowerEstimate) GetEnergyFromUncore

func (r *PowerEstimate) GetEnergyFromUncore() (uint64, error)

func (*PowerEstimate) GetNodeComponentsEnergy

func (r *PowerEstimate) GetNodeComponentsEnergy() map[int]NodeComponentsEnergy

No node components information, consider as 1 socket

func (*PowerEstimate) IsSystemCollectionSupported

func (r *PowerEstimate) IsSystemCollectionSupported() bool

If the Estimated Power is being used, it means that the system does not support Components Power Measurement

func (*PowerEstimate) StopPower

func (r *PowerEstimate) StopPower()

type PowerEstimateData

type PowerEstimateData struct {
	Architecture string  `csv:"Architecture"`
	MinWatts     float64 `csv:"Min Watts"`
	MaxWatts     float64 `csv:"Max Watts"`
	PerGBWatts   float64 `csv:"GB/Chip"`
}

type PowerMSR

type PowerMSR struct{}

func (*PowerMSR) GetEnergyFromCore

func (r *PowerMSR) GetEnergyFromCore() (uint64, error)

func (*PowerMSR) GetEnergyFromDram

func (r *PowerMSR) GetEnergyFromDram() (uint64, error)

func (*PowerMSR) GetEnergyFromPackage

func (r *PowerMSR) GetEnergyFromPackage() (uint64, error)

func (*PowerMSR) GetEnergyFromUncore

func (r *PowerMSR) GetEnergyFromUncore() (uint64, error)

func (*PowerMSR) GetNodeComponentsEnergy

func (r *PowerMSR) GetNodeComponentsEnergy() map[int]NodeComponentsEnergy

func (*PowerMSR) IsSystemCollectionSupported

func (r *PowerMSR) IsSystemCollectionSupported() bool

func (*PowerMSR) StopPower

func (r *PowerMSR) StopPower()

type PowerSysfs

type PowerSysfs struct{}

func (*PowerSysfs) GetEnergyFromCore

func (r *PowerSysfs) GetEnergyFromCore() (uint64, error)

func (*PowerSysfs) GetEnergyFromDram

func (r *PowerSysfs) GetEnergyFromDram() (uint64, error)

func (*PowerSysfs) GetEnergyFromPackage

func (r *PowerSysfs) GetEnergyFromPackage() (uint64, error)

func (*PowerSysfs) GetEnergyFromUncore

func (r *PowerSysfs) GetEnergyFromUncore() (uint64, error)

func (*PowerSysfs) GetNodeComponentsEnergy

func (r *PowerSysfs) GetNodeComponentsEnergy() map[int]NodeComponentsEnergy

func (*PowerSysfs) IsSystemCollectionSupported

func (r *PowerSysfs) IsSystemCollectionSupported() bool

func (*PowerSysfs) StopPower

func (r *PowerSysfs) StopPower()

Jump to

Keyboard shortcuts

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