Open rayjanoka opened 4 months ago
Good point. Thanks you for opening this PR.
However, I noticed that psutil uses PERFORMANCE_INFORMATION instead of MEMORYSTATUSEX. So I think we should change that. After the change, the precision issue will be solved.
Hey! Nice library!!
I found that the
virtualMemory.UsedPercent
returned by windows is just a whole number and we lose some precision there. I computed it instead usingtotal - available / total * 100
so we can get the same precision we see on linux.