SIGN IN SIGN UP

bpo-34060: Report system load when running test suite for Windows (GH-8357)

While Windows exposes the system processor queue length, the raw value
used for load calculations on Unix systems, it does not provide an API
to access the averaged value. Hence to calculate the load we must track
and average it ourselves. We can't use multiprocessing or a thread to
read it in the background while the tests run since using those would
conflict with test_multiprocessing and test_xxsubprocess.

Thus, we use Window's asynchronous IO API to run the tracker in the
background with it sampling at the correct rate. When we wish to access
the load we check to see if there's new data on the stream, if there is,
we update our load values.
A
Ammar Askar committed
e16467af0bfcc9f399df251495ff2d2ad20a1669
Parent: c324c74
Committed by Cheryl Sabella <cheryl.sabella@gmail.com> on 4/9/2019, 12:20:41 PM