cpu

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoadAverages

type LoadAverages struct {
	OneMinute     float64
	FiveMinute    float64
	FifteenMinute float64
}

LoadAverages stores the values of load averages of the last 1, 5 and 15 minutes.

type LoadMetrics

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

LoadMetrics stores the sampled load average values of the host.

func Load

func Load() (*LoadMetrics, error)

Load returns CPU load information for the previous 1, 5, and 15 minute periods.

func (*LoadMetrics) Averages

func (m *LoadMetrics) Averages() LoadAverages

Averages return the CPU load averages. These values should range from 0 to NumCPU.

func (*LoadMetrics) NormalizedAverages

func (m *LoadMetrics) NormalizedAverages() LoadAverages

NormalizedAverages return the CPU load averages normalized by the NumCPU. These values should range from 0 to 1.

Jump to

Keyboard shortcuts

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