STINNER Victor <vstin...@python.org> added the comment:
We could avoid typeperf command by accessing directly performance counters: (1) The Performance Data Helper (PDH) interface, which provides high-level access to data from both version 1 and version 2 performance counter providers. (2) The registry interface, which provides low-level access to data from performance counter providers. (3) The performance library interface, which provides direct access to data from version 2 performance counter providers. https://docs.microsoft.com/en-us/windows/win32/perfctrs/consuming-counter-data (2) in short: RegQueryValueEx() with HKEY_PERFORMANCE_DATA and the PPERF_DATA_BLOCK structure Documentation: https://docs.microsoft.com/en-us/windows/win32/perfctrs/using-the-registry-functions-to-consume-counter-data PERF_DATA_BLOCK structure fields: https://docs.microsoft.com/en-us/windows/win32/api/winperf/ns-winperf-perf_data_block Example: https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regqueryvalueexw Some examples mention "RegQueryValueEx function. Use HKEY_PERFORMANCE_DATA". Performance Data Format: https://docs.microsoft.com/en-us/windows/win32/perfctrs/performance-data-format -- PDH & friends was discussed in bpo-34060 which added the feature to libregrtest. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36670> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com