gopsutil
gopsutil copied to clipboard
cpu.Info() spends too much time in Windows
Microsoft Windows 7
Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz 4核
4G
test :
osInfo = 100.0058ms
memInfo = 0s
cpuInfo = 1.0430596s
cpuProcInfo= 276.0158ms
cpuPerfInfo = 268.0153ms
On Windows, we use WMI to get ProcInfo and PerfInfo and WMI is not so fast.