Download

Get profiling data programmatically

Hello, I’m trying to get profiling data like those used by stat command (i.e. stat unit, etc).
Can anyone give me a clue where and how to tap to those data?

Thank you very much.

Hello,
I’m able to get the data I want by mimicking this method:


  
int32 FStatUnitData::DrawStat(FViewport* InViewport, FCanvas* InCanvas, int32 InX, int32 InY);


it is inside UnrealClient.cpp file.

There’s DECLARE_CYCLE_STAT() and RETURN_QUICK_DECLARE_CYCLE_STAT() macros that can be used to generate and collect debug data in code.
The data you use with these macros will automatically be visible from within Profiling tools in Editor.

Can you help me understand how can DECLARE_CYCLE_STAT() and RETURN_QUICK_DECLARE_CYCLE_STAT() works so that they able to collect the debug data.
I’m interested to tap to those data programmatically (not only for analysing via Session Frontend).

You gonna have to dive into engine source code.
Those macros are everywhere ^^

I see…
been doing that for a few days now. Still trying to understand the code.
:slight_smile: