resources

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bandwidth

func Bandwidth(mhz uint64) (uint64, error)

Bandwidth computes the CPU bandwidth given a mhz value from task config. We assume the bandwidth per-core base is 100_000 which is the default.

func SetSpecs added in v0.1.1

func SetSpecs(compute cpustats.Compute)

Types

type MicroSecond

type MicroSecond uint64

type Percent

type Percent float64

type Specs

type Specs struct {
	MHz   uint64
	Cores int
}

func GetSpecs

func GetSpecs() Specs

func (Specs) Ticks

func (s Specs) Ticks() uint64

type TrackCPU

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

func (*TrackCPU) Percent

func (t *TrackCPU) Percent(user, system, total MicroSecond) (Percent, Percent, Percent)

Percent returns the percentage of time spent in user, system, total CPU usage.

type Utilization

type Utilization struct {
	Memory uint64
	Swap   uint64
	Cache  uint64

	System          Percent
	User            Percent
	Percent         Percent
	ThrottlePeriods uint64
	ThrottleTime    uint64
	Ticks           Percent
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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