[issue34060] regrtest: log "CPU usage" on Windows

Steve Dower report at bugs.python.org
Wed Jul 18 11:00:35 EDT 2018


Steve Dower <steve.dower at python.org> added the comment:

> wmic cpu ...

This is the WMI solution we are trying to avoid.

But then again, if it's solely for our tests, perhaps the best way to approach this is to start a Python thread that periodically runs this command?

I also haven't seen it suggested, but perhaps GetProcessTimes (https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getprocesstimes) (or GetThreadTimes) would provide enough information to detect the same information?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34060>
_______________________________________


More information about the Python-bugs-list mailing list