MCPcopy
hub / github.com/jaypipes/ghw / Info

Struct Info

pkg/cpu/cpu.go:123–137  ·  view source on GitHub ↗

Info describes all central processing unit (CPU) functionality on a host. Returned by the `ghw.CPU()` function.

Source from the content-addressed store, hash-verified

121// Info describes all central processing unit (CPU) functionality on a host.
122// Returned by the `ghw.CPU()` function.
123type Info struct {
124 // TotalCores is the total number of physical cores the host system
125 // contains
126 TotalCores uint32 `json:"total_cores"`
127 // TotalThreads is the total number of hardware threads the host system
128 // contains
129 TotalHardwareThreads uint32 `json:"total_hardware_threads"`
130 // TotalThreads is the total number of hardware threads the host system
131 // contains
132 // DEPRECATED: Use `TotalHardwareThreads` instead
133 TotalThreads uint32 `json:"total_threads"`
134 // Processors is a slice of Processor struct pointers, one for each
135 // physical processor package contained in the host
136 Processors []*Processor `json:"processors"`
137}
138
139// New returns a pointer to an Info struct that contains information about the
140// CPUs on the host system

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected