Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUTimeStat ¶
type CPUTimeStat struct {
sync.RWMutex
PrevIdleTime []uint64
PrevTotalTime []uint64
CurIdleTime []uint64
CurTotalTime []uint64
DeltaIdleTime []uint64
DeltaTotalTime []uint64
CPUUsage []float64
IsGetCPUUsageBegin bool
}
CPUTimeStat is used to calculate the CPU usage.
func (*CPUTimeStat) GetCPUTimeStat ¶
func (t *CPUTimeStat) GetCPUTimeStat() error
GetCPUTimeStat calculates CPU usage by using the CPU time statistics from /proc/stat
Click to show internal directories.
Click to hide internal directories.