Open frankkusters opened 2 months ago
With this change I get one failure:
======================================================================
FAIL: psutil.tests.test_linux.TestMisc.test_cpu_steal_decrease
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/giampaolo/svn/psutil/psutil/tests/test_linux.py", line 1569, in test_cpu_steal_decrease
self.assertNotEqual(sum(cpu_times_percent), 100.0)
AssertionError: 100.0 == 100.0
Summary
Description
Implement suggestion by @ulxasc in https://github.com/giampaolo/psutil/issues/1586#issuecomment-896261172 . This fixes that
cpu_times_percent()
reports much too low values if the interval is less than 1 second (withpercpu=True
) or less than1/cpu_count()
seconds (withpercpu=False
).