3

I want to test how much my application consumes CPU and GPU in percent.

I am aware of some counters which we can track using PerfMon by creating data collector set. But also then i haven't read anything related to GPU in PerfMon.

Till now, i was doing this task manually with the help of Windows Task Manager. I was wondering if there is any way i can automate it?

anjali rai
  • 185
  • 1
  • 1
  • 14
  • Relevant: https://stackoverflow.com/questions/23143693/retrieving-cpu-load-percent-total-in-windows-with-c – Azeem Oct 31 '19 at 06:22
  • Did you try to run WMIC commands from your C++ executable? Here's a relevant thread: https://stackoverflow.com/questions/9097067/get-cpu-usage-from-windows-command-prompt. You can use WMIC commands to get these stats. And, for GPUs, I believe that there are APIs available for each GPU. You just need to explore a bit more. – Azeem Oct 31 '19 at 06:25
  • Possible duplicate of [Getting current cpu usage in c++/windows for particular process](https://stackoverflow.com/questions/18095994/getting-current-cpu-usage-in-c-windows-for-particular-process) – phuclv Oct 31 '19 at 10:13

0 Answers0