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

Ammar Askar report at bugs.python.org
Wed Jul 18 13:26:41 EDT 2018


Ammar Askar <ammar at ammaraskar.com> added the comment:

> 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?

This sounds like a very good solution to me, it avoids adding the complexity of the C code. We actually have two options here, to keep the results consistent with the unix load, we can use `typeperf "\System\Processor Queue Length"`

To get cpu usage, we can use the command Victor posted. I'll make an alternative PR with that today just so we can contrast the two approaches.

----------

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


More information about the Python-bugs-list mailing list