source

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 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) GetAbsEnergyFromCore added in v0.5.4

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

func (*ApmXgeneSysfs) GetAbsEnergyFromDram added in v0.5.4

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

func (*ApmXgeneSysfs) GetAbsEnergyFromNodeComponents added in v0.5.4

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

func (*ApmXgeneSysfs) GetAbsEnergyFromPackage added in v0.5.4

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

func (*ApmXgeneSysfs) GetAbsEnergyFromUncore added in v0.5.4

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

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) GetAbsEnergyFromCore added in v0.5.4

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

func (*PowerDummy) GetAbsEnergyFromDram added in v0.5.4

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

func (*PowerDummy) GetAbsEnergyFromNodeComponents added in v0.5.4

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

func (*PowerDummy) GetAbsEnergyFromPackage added in v0.5.4

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

func (*PowerDummy) GetAbsEnergyFromUncore added in v0.5.4

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

func (*PowerDummy) IsSystemCollectionSupported

func (r *PowerDummy) IsSystemCollectionSupported() bool

func (*PowerDummy) StopPower

func (r *PowerDummy) StopPower()

type PowerEstimate

type PowerEstimate struct{}

func (*PowerEstimate) GetAbsEnergyFromCore added in v0.5.4

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

func (*PowerEstimate) GetAbsEnergyFromDram added in v0.5.4

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

func (*PowerEstimate) GetAbsEnergyFromNodeComponents added in v0.5.4

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

No node components information, consider as 1 socket

func (*PowerEstimate) GetAbsEnergyFromPackage added in v0.5.4

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

func (*PowerEstimate) GetAbsEnergyFromUncore added in v0.5.4

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

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) GetAbsEnergyFromCore added in v0.5.4

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

func (*PowerMSR) GetAbsEnergyFromDram added in v0.5.4

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

func (*PowerMSR) GetAbsEnergyFromNodeComponents added in v0.5.4

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

func (*PowerMSR) GetAbsEnergyFromPackage added in v0.5.4

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

func (*PowerMSR) GetAbsEnergyFromUncore added in v0.5.4

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

func (*PowerMSR) IsSystemCollectionSupported

func (r *PowerMSR) IsSystemCollectionSupported() bool

func (*PowerMSR) StopPower

func (r *PowerMSR) StopPower()

type PowerSysfs

type PowerSysfs struct{}

func (*PowerSysfs) GetAbsEnergyFromCore added in v0.5.4

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

func (*PowerSysfs) GetAbsEnergyFromDram added in v0.5.4

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

func (*PowerSysfs) GetAbsEnergyFromNodeComponents added in v0.5.4

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

func (*PowerSysfs) GetAbsEnergyFromPackage added in v0.5.4

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

func (*PowerSysfs) GetAbsEnergyFromUncore added in v0.5.4

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

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