source

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 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

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

func (*ApmXgeneSysfs) GetAbsEnergyFromDram

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

func (*ApmXgeneSysfs) GetAbsEnergyFromNodeComponents

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

func (*ApmXgeneSysfs) GetAbsEnergyFromPackage

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

func (*ApmXgeneSysfs) GetAbsEnergyFromUncore

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

func (ApmXgeneSysfs) GetName

func (ApmXgeneSysfs) GetName() string

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

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

func (*PowerDummy) GetAbsEnergyFromDram

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

func (*PowerDummy) GetAbsEnergyFromNodeComponents

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

func (*PowerDummy) GetAbsEnergyFromPackage

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

func (*PowerDummy) GetAbsEnergyFromUncore

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

func (PowerDummy) GetName

func (PowerDummy) GetName() string

func (*PowerDummy) IsSystemCollectionSupported

func (r *PowerDummy) IsSystemCollectionSupported() bool

func (*PowerDummy) StopPower

func (r *PowerDummy) StopPower()

type PowerEstimate

type PowerEstimate struct{}

func (*PowerEstimate) GetAbsEnergyFromCore

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

func (*PowerEstimate) GetAbsEnergyFromDram

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

func (*PowerEstimate) GetAbsEnergyFromNodeComponents

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

No node components information, consider as 1 socket

func (*PowerEstimate) GetAbsEnergyFromPackage

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

func (*PowerEstimate) GetAbsEnergyFromUncore

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

func (PowerEstimate) GetName

func (PowerEstimate) GetName() string

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

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

func (*PowerMSR) GetAbsEnergyFromDram

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

func (*PowerMSR) GetAbsEnergyFromNodeComponents

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

func (*PowerMSR) GetAbsEnergyFromPackage

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

func (*PowerMSR) GetAbsEnergyFromUncore

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

func (PowerMSR) GetName

func (PowerMSR) GetName() string

func (*PowerMSR) IsSystemCollectionSupported

func (r *PowerMSR) IsSystemCollectionSupported() bool

func (*PowerMSR) StopPower

func (r *PowerMSR) StopPower()

type PowerSysfs

type PowerSysfs struct{}

func (*PowerSysfs) GetAbsEnergyFromCore

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

func (*PowerSysfs) GetAbsEnergyFromDram

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

func (*PowerSysfs) GetAbsEnergyFromNodeComponents

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

func (*PowerSysfs) GetAbsEnergyFromPackage

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

func (*PowerSysfs) GetAbsEnergyFromUncore

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

func (*PowerSysfs) GetMaxEnergyRangeFromCore

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

func (*PowerSysfs) GetMaxEnergyRangeFromDram

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

func (*PowerSysfs) GetMaxEnergyRangeFromPackage

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

func (*PowerSysfs) GetMaxEnergyRangeFromUncore

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

func (PowerSysfs) GetName

func (PowerSysfs) GetName() string

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