UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Net::Private::FNetTypeStats Class Reference

#include <NetStats.h>

Classes

struct  FInitParams
 

Public Member Functions

 FNetTypeStats ()
 
 FNetTypeStats (const FNetTypeStats &)=delete
 
FNetTypeStatsoperator= (const FNetTypeStats &)=delete
 
 ~FNetTypeStats ()
 
void Init (FInitParams &InitParams)
 
void PreUpdateSetup ()
 
void ResetStats ()
 
int32 GetOrCreateTypeStats (FName Name)
 
FNetStatsContextGetNetStatsContext ()
 
bool IsEnabled () const
 
void Accumulate (FNetStatsContext &Context)
 
void ReportCSVStats ()
 
void CleanupChildNetStatsContexts ()
 
void AccumulateChildrenToParent ()
 
FNetStatsContextAcquireChildNetStatsContext ()
 
void ReleaseChildNetStatsContext (FNetStatsContext *StatsContext)
 
void SetIsInParallelPhase (const bool InParallelPhase)
 

Static Public Attributes

static constexpr int32 DefaultTypeStatsIndex = 0U
 
static constexpr int32 OOBChannelTypeStatsIndex = 1U
 

Detailed Description

Stats defined per object type for Iris replication reported to the CSV profiler. Mostly of interest on the server side due to the server authoritative network model. Currently we use a single NetStatsContext when collecting the stats, when we go wide we need to extend this to use separate contexts for different threads.

Constructor & Destructor Documentation

◆ FNetTypeStats() [1/2]

UE::Net::Private::FNetTypeStats::FNetTypeStats ( )

◆ FNetTypeStats() [2/2]

UE::Net::Private::FNetTypeStats::FNetTypeStats ( const FNetTypeStats )
delete

◆ ~FNetTypeStats()

UE::Net::Private::FNetTypeStats::~FNetTypeStats ( )

Member Function Documentation

◆ Accumulate()

void UE::Net::Private::FNetTypeStats::Accumulate ( FNetStatsContext Context)

Accumulate stats from context to main context

◆ AccumulateChildrenToParent()

void UE::Net::Private::FNetTypeStats::AccumulateChildrenToParent ( )

For each Child NetStatsContext, accumulate its values into the Parent NetStatsContext

◆ AcquireChildNetStatsContext()

FNetStatsContext * UE::Net::Private::FNetTypeStats::AcquireChildNetStatsContext ( )

Returns the next available ChildNetStatsContext which isn't being used by another task. (Thread-safe)

◆ CleanupChildNetStatsContexts()

void UE::Net::Private::FNetTypeStats::CleanupChildNetStatsContexts ( )

Wipes the Child NetStatsContext Map, ready for the next frame

◆ GetNetStatsContext()

FNetStatsContext * UE::Net::Private::FNetTypeStats::GetNetStatsContext ( )
inline

Get parent context if stats is enabled. Should not be called when in a parallel phase, as the ChildContexts should be used instead.

◆ GetOrCreateTypeStats()

int32 UE::Net::Private::FNetTypeStats::GetOrCreateTypeStats ( FName  Name)

Returns the TypeStatIndex associated with the Name or creates a new one if it does not exist

◆ Init()

void UE::Net::Private::FNetTypeStats::Init ( FInitParams InitParams)

◆ IsEnabled()

bool UE::Net::Private::FNetTypeStats::IsEnabled ( ) const
inline

Updated every frame based on the state of the CSVProfiler

◆ operator=()

FNetTypeStats & UE::Net::Private::FNetTypeStats::operator= ( const FNetTypeStats )
delete

◆ PreUpdateSetup()

void UE::Net::Private::FNetTypeStats::PreUpdateSetup ( )

Called once a frame before stats collection starts in order to set up ChildStatsContexts

◆ ReleaseChildNetStatsContext()

void UE::Net::Private::FNetTypeStats::ReleaseChildNetStatsContext ( FNetStatsContext StatsContext)

Relinquishes a ChildNetStatsContext so it can be used by another task. (Thread-safe)

◆ ReportCSVStats()

void UE::Net::Private::FNetTypeStats::ReportCSVStats ( )

ReportCSVStats and reset context

◆ ResetStats()

void UE::Net::Private::FNetTypeStats::ResetStats ( )

Reset stats

◆ SetIsInParallelPhase()

void UE::Net::Private::FNetTypeStats::SetIsInParallelPhase ( const bool  InParallelPhase)
inline

Sets a flag used to guard against using non thread safe operations when we're running parallel tasks.

Member Data Documentation

◆ DefaultTypeStatsIndex

constexpr int32 UE::Net::Private::FNetTypeStats::DefaultTypeStatsIndex = 0U
staticconstexpr

◆ OOBChannelTypeStatsIndex

constexpr int32 UE::Net::Private::FNetTypeStats::OOBChannelTypeStatsIndex = 1U
staticconstexpr

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