Message296311
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:13 | jkloth | set | recipients:
+ jkloth, terry.reedy, vstinner, louielu |
2017-06-19 11:39:12 | jkloth | set | messageid: <1497872352.98.0.454409643035.issue30263@psf.upfronthosting.co.za> |
2017-06-19 11:39:12 | jkloth | link | issue30263 messages |
2017-06-19 11:39:12 | jkloth | create | |
|