UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FStatsHierarchical Class Reference

#include <StatsHierarchical.h>

Classes

struct  FScope
 

Static Public Member Functions

static CORE_API void BeginMeasurements ()
 
static CORE_API bool IsEnabled ()
 
static CORE_API FStatsTreeElement EndMeasurements (FStatsTreeElement MeasurementsToMerge=FStatsTreeElement(), bool bAddUntrackedElements=true)
 
static CORE_API FStatsTreeElement GetLastMeasurements ()
 
static CORE_API void DumpMeasurements (FMessageLog &Log, bool bSortByDuration=true)
 
static CORE_API FName GetUntrackedTimeName ()
 

Friends

struct FStatsHierarchical::FScope
 

Detailed Description

A helper class with static methods to perform hierarchical profiling

The FStatsHierarchical class / namespace can be used to record profiling data in a hierarchical fashion - by nesting scopes in functions that call each other. Profiling entries are recorded per invocation as raw data to ensure minimal impact on the runtime performance - and then can be compacted into a tree at a later time for reporting / display.

Users should refer to the DECLARE_SCOPE_HIERARCHICAL_COUNTER macro instead to place scopes.

Users need to call FStatsHierarchical::BeginMeasurements() and FStatsHierarchical::EndMeasurements() to enable / disable the profiling.

Note: This system is not thread-safe. You want to call it from a single thread only.

Member Function Documentation

◆ BeginMeasurements()

void FStatsHierarchical::BeginMeasurements ( )
static

◆ DumpMeasurements()

void FStatsHierarchical::DumpMeasurements ( FMessageLog Log,
bool  bSortByDuration = true 
)
static

◆ EndMeasurements()

FStatsTreeElement FStatsHierarchical::EndMeasurements ( FStatsTreeElement  MeasurementsToMerge = FStatsTreeElement(),
bool  bAddUntrackedElements = true 
)
static

Ends measurements / profiling and returns the compacted profiling tree.

Parameters
MeasurementsToMergeThe baseline for the measurement.
bAddUntrackedElementsIf true adds an element for untracked time (time not profiled) for each node in the tree.

◆ GetLastMeasurements()

FStatsTreeElement FStatsHierarchical::GetLastMeasurements ( )
static

◆ GetUntrackedTimeName()

FName FStatsHierarchical::GetUntrackedTimeName ( )
static

◆ IsEnabled()

bool FStatsHierarchical::IsEnabled ( )
static

Friends And Related Symbol Documentation

◆ FStatsHierarchical::FScope


The documentation for this class was generated from the following files: