gopsutil icon indicating copy to clipboard operation
gopsutil copied to clipboard

cpu.Info() spends too much time in Windows

Open gonboy opened this issue 8 years ago • 1 comments

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

gonboy avatar Jul 06 '17 01:07 gonboy

On Windows, we use WMI to get ProcInfo and PerfInfo and WMI is not so fast.

shirou avatar Jul 08 '17 15:07 shirou