UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
StatsSystem.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreTypes.h"
7#include "Templates/Atomic.h"
8
9namespace UE::Stats
10{
12 struct FStats
13 {
15 DECLARE_DELEGATE_ThreeParams(FOnAdvanceRenderingThreadStats, bool /*bDiscardCallstack*/, int64 /*StatsFrame*/, int32 /*PrimaryDisableChangeTagStartFrame*/);
16
17 /* Initializes any relevant stat systems, including those that exist when STATS is 0. */
18 static CORE_API void Init();
19
22
24 static CORE_API void TickCommandletStats();
25
30 static CORE_API bool EnabledForCommandlet();
31
37
42
45
46 #if STATS
47 // The engine stats system maintains its own frame counter. We need to propagate this to
48 // the end-of-pipe thread so that stat data it submits is attributed to the correct frame.
49 // This is done inside AdvanceRenderingThreadStats.
51 #endif
52 };
53} // namespace UE::Stats
54
55UE_DEPRECATED(5.6, "Use UE::Stats::FStats instead.")
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition Platform.h:1127
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition Atomic.h:538
Definition StatsCommand.cpp:2274
Definition AdvancedWidgetsModule.cpp:13
Definition Optional.h:131
Definition StatsSystem.h:13
static CORE_API bool EnabledForCommandlet()
Definition StatsSystem.cpp:116
DECLARE_DELEGATE_ThreeParams(FOnAdvanceRenderingThreadStats, bool, int64, int32)
static CORE_API bool HasLoadTimeFileForCommandletToken()
Definition StatsSystem.cpp:128
static CORE_API void AdvanceFrame(bool bDiscardCallstack, const FOnAdvanceRenderingThreadStats &AdvanceRenderingThreadStatsDelegate=FOnAdvanceRenderingThreadStats())
Definition StatsSystem.cpp:58
static CORE_API void Init()
Definition StatsSystem.cpp:44
static CORE_API void TickCommandletStats()
Definition StatsSystem.cpp:102
static CORE_API bool HasLoadTimeStatsForCommandletToken()
Definition StatsSystem.cpp:122
static CORE_API TAtomic< int32 > GameThreadStatsFrame
Definition StatsSystem.h:44