Title: bpo-34060: Report system load when running test suite for Windows by ammaraskar · Pull Request #8357 · python/cpython · GitHub
Open Graph Title: bpo-34060: Report system load when running test suite for Windows by ammaraskar · Pull Request #8357 · python/cpython
X Title: bpo-34060: Report system load when running test suite for Windows by ammaraskar · Pull Request #8357 · python/cpython
Description: This is (mostly) a pure Python implementation of the other PR. It leverages the typeperf command which monitors performance counters and outputs them at a given interval. So every 5 seconds, typeperf can output the processor queue length into stdout.
subprocess.stdout.readline is a blocking call. Using a thread seemed like an obvious solution, but we can't achieve this with multiprocessing or a thread, because like Victor speculated in the previous bug report on this, it conflicts with test_multiprocessing and test_threading. Hence, I opted to use the asynchronous/overlapped IO API which was designed for async. Most of the diff actually just pertains to using this rather low level API.
This is almost a pure python implementation but there was one edge case where this would fail. Namely, when the python interpreter running the test suite crashes, this leaves an orphaned typeperf process running which refuses to die. This means that when the test suite is run with -j x and this situation happens:
python -m test -j2
├── python
Open Graph Description: This is (mostly) a pure Python implementation of the other PR. It leverages the typeperf command which monitors performance counters and outputs them at a given interval. So every 5 seconds, typepe...
X Description: This is (mostly) a pure Python implementation of the other PR. It leverages the typeperf command which monitors performance counters and outputs them at a given interval. So every 5 seconds, typepe...
Opengraph URL: https://github.com/python/cpython/pull/8357
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:169165d0-ce26-8e98-c703-0a62e2b21d87 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E476:19B879:23BAEA8:31EF77B:6A54A1EF |
| html-safe-nonce | 592704497f9b5987fc9a1f7d43fcaba0d6b2361f89d168e343122eeb96db186c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDc2OjE5Qjg3OToyM0JBRUE4OjMxRUY3N0I6NkE1NEExRUYiLCJ2aXNpdG9yX2lkIjoiNDYyNjgwNDk5MTE2MzUxOTgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1001cdd37def843353661e0d620ca7c39837cfb691bf6f217e725b1230a73520 |
| hovercard-subject-tag | pull_request:202948321 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/8357/files |
| twitter:image | https://avatars.githubusercontent.com/u/773529?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/773529?s=400&v=4 |
| og:image:alt | This is (mostly) a pure Python implementation of the other PR. It leverages the typeperf command which monitors performance counters and outputs them at a given interval. So every 5 seconds, typepe... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f8cfff6384f62259baea531c7f58bc7040f8dd92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width