cpu

package
v0.0.0-...-5c7ffcf Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCpuBusy

func GetCpuBusy(t *cpu.TimesStat) float64

func GetCpuTotal

func GetCpuTotal(t *cpu.TimesStat) float64

func GetCpuUtil

func GetCpuUtil(t *cpu.TimesStat) float64

Types

type CpuState

type CpuState struct {
	// 上次执行时间
	Time int64
	Cpu  *CpuTimeCsStat
	Ctxt int64
	Sirq int64
	Hirq int64
}

type CpuTimeCsStat

type CpuTimeCsStat struct {
	M []CpuTimesStatExt
}

func (*CpuTimeCsStat) Gauge

func (st *CpuTimeCsStat) Gauge(other *CpuTimeCsStat) map[string]CpuTimesStatExt

type CpuTimesStatExt

type CpuTimesStatExt struct {
	cpu.TimesStat
	Total float64
	// gopsutil 内部概念
	Busy float64
	// vsar 特有
	Util float64
}

Jump to

Keyboard shortcuts

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