gopsutil
gopsutil copied to clipboard
Increasing precision for virtual memory used percent on windows
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 using total - available / total * 100
so we can get the same precision we see on linux.
virtMemTest - Old 28.000000 : New 28.606437
virtMemTest - Old 28.000000 : New 28.594666
virtMemTest - Old 28.000000 : New 28.637374