This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jkloth
Recipients jkloth, louielu, terry.reedy, vstinner
Date 2017-06-19.11:39:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I've implemented a getloadavg() equivalent using Windows performance counters that could be used to display the load in regrtest, as it happens, before finding this issue.  It is implemented in C (although it *can* be done in only Python).

It has the identical properties of the Linux /proc/loadavg stats.  An exponential decaying average using the same equations for 1m, 5m and 15m buckets.  So, in theory, it would usable as `os.getloadavg()`.

Before implementing this as a PR, I would like guidance as to the best place to integrate this:
 1. as os.getloadavg(),
 2. in _testcapi
 3. in winapi (although it is a conglomeration of WinAPIs)
 4. in regrtest (as Python).

I believe that #1 would be a nice to have, but #2 as most likely. 
 #3 doesn't fit so much with the "feel" of the winapi module; loadavg() being a utility function whereas the rest of that module is raw APIs.  And, #4 as, well, last.  Mostly due to the fact of walking C structures in Python sucks.
Date User Action Args
2017-06-19 11:39:13jklothsetrecipients: + jkloth, terry.reedy, vstinner, louielu
2017-06-19 11:39:12jklothsetmessageid: <>
2017-06-19 11:39:12jklothlinkissue30263 messages
2017-06-19 11:39:12jklothcreate