Get GPU and CPU usage in C++

Hi,

I would like to get the CPU and GPU usage of UE4 in C++ during running a simulation and then stores their values in an array.

Any idea what are the commands in c++ that I can use to get the CPU and GPU usages?

Thanks

1 Like

You can get CPU utilization here:

GPU usage is a bit harder as common information source (which normally was get by talking directly to driver) for it is quite new concept even for Windows, there for UE4 dont have implementation for it yet other then GPU timings on UE4 side which wont give you usage time rether how fast GPU renders the scene. You would need to talk to system API direcly, here some hints:

Hi, thanks a lot for your answer. I think I bumped into these functions before but couldn’t figure out how to use them. Would you be able to provide a little example of how I would use them?

Thanks

2 Likes