CallStats

Struct to hold stats for a call.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/ProfilingDebugging/CookStats.h

Include

#include "ProfilingDebugging/CookStats.h"

Syntax

struct CallStats

Remarks

Struct to hold stats for a call. The sub-structs and stuff look intimidating, but it is to unify the concept of accumulating any stat on the game or other thread, using raw int64 on the main thread, and thread safe accumulators on other threads.

Each call type that will be tracked will track call counts, call cycles, and bytes processed, grouped by hits and misses. Some stats will by definition be zero but it limits the branching in the tracking code.

Functions

Name Description

Public function

void

 

Accumulate

(
    EHitOrMiss HitOrMiss,
    EStatType StatType,
    int64 Value,
    bool bIsInGameThread
)

Make it easier to update an accumulator by providing strongly typed access to the 2D array.

Public function Const

int64

 

GetAccumulatedValue

(
    EHitOrMiss HitOrMiss,
    EStatType StatType,
    bool bIsInGameThread
)

Make it easier to access an accumulator using a uniform, stronly typed interface.

Public function Const

void

 

LogStats

(
    FCookStatsManager::AddStatFuncRef A...,
    const FString& StatName,
    const FString& NodeName,
    const TCHAR* CallName
)

Used to log the instance in a common way.

Classes

Name

Description

Public struct

GameAndOtherThreadAccumulator

Contains a pair of accumulators, one for the game thread, one for the other threads.

Enums

Name

Description

Public enum

EHitOrMiss

One group of accumulators for hits and misses.

Public enum

EStatType

Each hit or miss will contain these accumulator stats.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss