Versions in this module Expand all Collapse all v2 v2.43.1 Apr 3, 2023 Changes in this version + const CPIdle — darwin/amd64 + const CPIntr — darwin/amd64 + const CPNice — darwin/amd64 + const CPSys — darwin/amd64 + const CPUStates — darwin/amd64 + const CPUser — darwin/amd64 + const ClocksPerSec — windows/amd64 + var ClocksPerSec = float64(100) — linux/amd64 + var ClocksPerSec = float64(128) — darwin/amd64 + func Counts(logical bool) (int, error) + func CountsWithContext(ctx context.Context, logical bool) (int, error) + func Percent(interval time.Duration, percpu bool) ([]float64, error) + func PercentWithContext(ctx context.Context, interval time.Duration, percpu bool) ([]float64, error) + type InfoStat struct + CPU int32 + CacheSize int32 + CoreID string + Cores int32 + Family string + Flags []string + Mhz float64 + Microcode string + Model string + ModelName string + PhysicalID string + Stepping int32 + VendorID string + func Info() ([]InfoStat, error) + func InfoWithContext(ctx context.Context) ([]InfoStat, error) + func (c InfoStat) String() string + type TimesStat struct + CPU string + Guest float64 + GuestNice float64 + Idle float64 + Iowait float64 + Irq float64 + Nice float64 + Softirq float64 + Steal float64 + System float64 + User float64 + func Times(percpu bool) ([]TimesStat, error) + func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) + func (c TimesStat) String() string + func (c TimesStat) Total() float64 + type Win32_PerfFormattedData_PerfOS_System struct — windows/amd64 + Processes uint32 + ProcessorQueueLength uint32 + func ProcInfo() ([]Win32_PerfFormattedData_PerfOS_System, error) + func ProcInfoWithContext(ctx context.Context) ([]Win32_PerfFormattedData_PerfOS_System, error) + type Win32_Processor struct — windows/amd64 + Family uint16 + LoadPercentage *uint16 + Manufacturer string + MaxClockSpeed uint32 + Name string + NumberOfCores uint32 + NumberOfLogicalProcessors uint32 + ProcessorID *string + Stepping *string