diff options
author | Ammar Askar <ammar_askar@hotmail.com> | 2019-04-09 12:20:41 (GMT) |
---|---|---|
committer | Cheryl Sabella <cheryl.sabella@gmail.com> | 2019-04-09 12:20:41 (GMT) |
commit | e16467af0bfcc9f399df251495ff2d2ad20a1669 (patch) | |
tree | ee3c0cbd23c0e5a04fd8de12368a47bfcb184e09 /Misc | |
parent | c324c748871804f31f56b3bd02a8650b3bf1bae7 (diff) | |
download | cpython-e16467af0bfcc9f399df251495ff2d2ad20a1669.zip cpython-e16467af0bfcc9f399df251495ff2d2ad20a1669.tar.gz cpython-e16467af0bfcc9f399df251495ff2d2ad20a1669.tar.bz2 |
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.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Windows/2018-07-20-13-09-19.bpo-34060.v-z87j.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Windows/2018-07-20-13-09-19.bpo-34060.v-z87j.rst b/Misc/NEWS.d/next/Windows/2018-07-20-13-09-19.bpo-34060.v-z87j.rst new file mode 100644 index 0000000..b77d805 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2018-07-20-13-09-19.bpo-34060.v-z87j.rst @@ -0,0 +1,2 @@ +Report system load when running test suite on Windows. Patch by Ammar Askar. +Based on prior work by Jeremy Kloth. |