profile

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PlotLineCharts

func PlotLineCharts(xStep int, filePath, inFile, xLable string)

PlotLineCharts plots every attribute as VM number increases in the csv file

func PlotStackCharts

func PlotStackCharts(xStep int, metricFile, inFilePath, inFile, xLable string)

PlotStackCharts plots stack charts if any metric group exists in the csv file

Types

type CPUInfo

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

CPUInfo contains sockets and processor to socket and core map

func GetCPUInfo

func GetCPUInfo() (CPUInfo, error)

GetCPUInfo returns a instance of CPUInfo

func (*CPUInfo) AllCPUs

func (c *CPUInfo) AllCPUs() []int

AllCPUs returns the list of all logcial CPUs.

func (*CPUInfo) GetCoreID

func (c *CPUInfo) GetCoreID(processor int) (int, error)

GetCoreID returns the physical core ID

func (*CPUInfo) GetSibling

func (c *CPUInfo) GetSibling(processor int) (int, error)

GetSibling returns the sibling processor

func (*CPUInfo) GetSocketCoreInString

func (c *CPUInfo) GetSocketCoreInString(processor int) (string, error)

GetSocketCoreInString returns the physical core ID in Sx-Cx format

func (*CPUInfo) GetSocketID

func (c *CPUInfo) GetSocketID(processor int) (int, error)

GetSocketID returns the socket ID

func (*CPUInfo) NumCPU

func (c *CPUInfo) NumCPU() int

NumCPU returns the number of logcial CPUs.

func (*CPUInfo) NumSocket

func (c *CPUInfo) NumSocket() int

NumSocket returns the number of sockets.

func (*CPUInfo) SocketCPUs

func (c *CPUInfo) SocketCPUs(socket int) ([]int, error)

SocketCPUs returns a list of processors of the socket

type Profiler

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

Profiler a instance of toplev command

func NewProfiler

func NewProfiler(executionTime float64, printInterval uint64, level int, nodes, outFile string, socket, cpu int) (*Profiler, error)

NewProfiler returns a new instance of profiler

func (*Profiler) GetCoolDownTime

func (p *Profiler) GetCoolDownTime() float64

GetCoolDownTime returns the time duration until system starts tearing down.

func (*Profiler) GetCores

func (p *Profiler) GetCores() map[string]bool

GetCores returns measured core ID or thread ID

func (*Profiler) GetResult

func (p *Profiler) GetResult() (map[string]float64, error)

GetResult returns the counters of perf stat

func (*Profiler) GetWarmUpTime

func (p *Profiler) GetWarmUpTime() float64

GetWarmUpTime returns the time duration until system is warm.

func (*Profiler) PrintBottlenecks

func (p *Profiler) PrintBottlenecks()

PrintBottlenecks prints the bottlenecks during profiling

func (*Profiler) Run

func (p *Profiler) Run() error

Run checks environment and arguments and executes command

func (*Profiler) SetCoolDownTime

func (p *Profiler) SetCoolDownTime()

SetCoolDownTime sets the time duration until system starts tearing down.

func (*Profiler) SetWarmUpTime

func (p *Profiler) SetWarmUpTime()

SetWarmUpTime sets the time duration until system is warm.

Jump to

Keyboard shortcuts

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