cpuhist

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NumCPU = runtime.NumCPU()

Functions

func GetSystemUsePercentage

func GetSystemUsePercentage() float64

GetSystemUsePercentage returns the average CPU usage percentage of the system. Percentage is expressed as [0, 1] where 0 means no usage and 1 means full usage of all cores. The average is calculated over a period of time.

func GetUsePercentage

func GetUsePercentage(proc *process.Process) float64

GetUsePercentage returns the average CPU usage percentage of the process. Percentage is expressed as [0, #CPU] where 0 means no usage and #CPU means full usage of all cores. The average is calculated over a period of time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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