pub struct CoreClass {
pub name: Box<str>,
pub logical: Vec<u16>,
pub physical_count: Option<u16>,
}Expand description
A class of logical CPUs that differ in kind, not just in load.
Apple Silicon has performance and efficiency cores; big.LITTLE ARM machines have the same split under other names. It matters for reading a per-core view: four efficiency cores at 90% and four performance cores idle is a machine doing very little, and the opposite is a machine working hard — the same eight numbers.
The name comes from the platform (hw.perflevelN.name on macOS) rather than from
a table here, because inventing the vocabulary would mean guessing at hardware
this code has never seen.
Fields§
§name: Box<str>What the platform calls it, e.g. Performance or Efficiency.
logical: Vec<u16>The logical CPUs in this class, as indices into
CpuSnapshot::per_core.
Indices rather than a count, because a renderer needs to know which cores they are to colour or group them, and a count would force it to assume the classes are contiguous.
physical_count: Option<u16>Physical cores in this class, where the platform reports it separately.