Accessing profiling data / performance stats in C++ code?

Hello everyone,

I’m trying to create a small benchmark-like application and would like to access the profiler and it’s data or the debug data shown by the stat-commands at runtime preferably through some variables or outputted data files.

Is this possible for C++ code, and if yes, how?

Thanks in advance.

1 Like

Dont know if you found this out, but check out the Engine\Source\Runtime\Core\Public\Stats\Stats.h file. As of 4.12 it has a nice tutorial in there. Not sure about other versions.


I was trying to do the same thing and come with the function that can collect some stats in runtime and save them to string/file: Saving stats to file - Programming & Scripting - Unreal Engine Forums