![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <NetStats.h>
Classes | |
| struct | FInitParams |
Public Member Functions | |
| FNetTypeStats () | |
| FNetTypeStats (const FNetTypeStats &)=delete | |
| FNetTypeStats & | operator= (const FNetTypeStats &)=delete |
| ~FNetTypeStats () | |
| void | Init (FInitParams &InitParams) |
| void | PreUpdateSetup () |
| void | ResetStats () |
| int32 | GetOrCreateTypeStats (FName Name) |
| FNetStatsContext * | GetNetStatsContext () |
| bool | IsEnabled () const |
| void | Accumulate (FNetStatsContext &Context) |
| void | ReportCSVStats () |
| void | CleanupChildNetStatsContexts () |
| void | AccumulateChildrenToParent () |
| FNetStatsContext * | AcquireChildNetStatsContext () |
| void | ReleaseChildNetStatsContext (FNetStatsContext *StatsContext) |
| void | SetIsInParallelPhase (const bool InParallelPhase) |
Static Public Attributes | |
| static constexpr int32 | DefaultTypeStatsIndex = 0U |
| static constexpr int32 | OOBChannelTypeStatsIndex = 1U |
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.
| UE::Net::Private::FNetTypeStats::FNetTypeStats | ( | ) |
|
delete |
| UE::Net::Private::FNetTypeStats::~FNetTypeStats | ( | ) |
| void UE::Net::Private::FNetTypeStats::Accumulate | ( | FNetStatsContext & | Context | ) |
Accumulate stats from context to main context
| void UE::Net::Private::FNetTypeStats::AccumulateChildrenToParent | ( | ) |
For each Child NetStatsContext, accumulate its values into the Parent NetStatsContext
| FNetStatsContext * UE::Net::Private::FNetTypeStats::AcquireChildNetStatsContext | ( | ) |
Returns the next available ChildNetStatsContext which isn't being used by another task. (Thread-safe)
| void UE::Net::Private::FNetTypeStats::CleanupChildNetStatsContexts | ( | ) |
Wipes the Child NetStatsContext Map, ready for the next frame
|
inline |
Get parent context if stats is enabled. Should not be called when in a parallel phase, as the ChildContexts should be used instead.
Returns the TypeStatIndex associated with the Name or creates a new one if it does not exist
| void UE::Net::Private::FNetTypeStats::Init | ( | FInitParams & | InitParams | ) |
|
inline |
Updated every frame based on the state of the CSVProfiler
|
delete |
| void UE::Net::Private::FNetTypeStats::PreUpdateSetup | ( | ) |
Called once a frame before stats collection starts in order to set up ChildStatsContexts
| void UE::Net::Private::FNetTypeStats::ReleaseChildNetStatsContext | ( | FNetStatsContext * | StatsContext | ) |
Relinquishes a ChildNetStatsContext so it can be used by another task. (Thread-safe)
| void UE::Net::Private::FNetTypeStats::ReportCSVStats | ( | ) |
ReportCSVStats and reset context
| void UE::Net::Private::FNetTypeStats::ResetStats | ( | ) |
Reset stats
Sets a flag used to guard against using non thread safe operations when we're running parallel tasks.