Jeremy Kloth added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30263>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to