mirror of
https://github.com/shirou/gopsutil.git
synced 2025-05-10 19:29:14 +08:00
add VendorId and CacheSize on darwin.
This commit is contained in:
parent
2d08e158d6
commit
82227bfed4
@ -86,12 +86,14 @@ func CPUInfo() ([]CPUInfoStat, error) {
|
||||
}
|
||||
} else if strings.HasPrefix(line, "machdep.cpu.core_count") {
|
||||
c.Cores = mustParseInt32(values[1])
|
||||
} else if strings.HasPrefix(line, "machdep.cpu.cache.size") {
|
||||
c.CacheSize = mustParseInt32(values[1])
|
||||
} else if strings.HasPrefix(line, "machdep.cpu.vendor") {
|
||||
c.VendorID = values[1]
|
||||
}
|
||||
|
||||
// TODO:
|
||||
// c.Mhz = mustParseFloat64(values[1])
|
||||
// c.VendorID = matches[1]
|
||||
|
||||
}
|
||||
|
||||
return append(ret, c), nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user