t.FPSChart.InterestingFramerates
t.FPSChart.InterestingFramerates
#Overview
name: t.FPSChart.InterestingFramerates
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Comma separated list of interesting frame rates\n default: 30,60,120
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of t.FPSChart.InterestingFramerates is to define a list of interesting frame rates for performance analysis and charting in Unreal Engine 5. This setting variable is primarily used for the engine’s performance tracking and reporting system.
The Unreal Engine subsystem that relies on this setting variable is the performance tracking system, specifically the FPS (Frames Per Second) charting functionality. This can be seen from the file name “ChartCreation.cpp” and the context in which the variable is used.
The value of this variable is set as a console variable, which means it can be modified at runtime through the console or configuration files. The default value is “30,60,120”, representing three common frame rate targets in game development.
The associated variable GFPSChartInterestingFramerates interacts directly with t.FPSChart.InterestingFramerates. GFPSChartInterestingFramerates is defined as a TAutoConsoleVariable
Developers must be aware that this variable expects a comma-separated list of frame rates as integers. The values provided will be used as thresholds for performance summary reports.
Best practices when using this variable include:
- Setting frame rates that are relevant to your target platforms and performance goals.
- Including a range of frame rates to get a comprehensive view of performance across different scenarios.
- Considering the capabilities of the target hardware when setting these values.
Regarding the associated variable GFPSChartInterestingFramerates:
The purpose of GFPSChartInterestingFramerates is to store and provide access to the interesting frame rates defined by t.FPSChart.InterestingFramerates.
This variable is used within the Engine module, specifically in the performance tracking system.
The value of GFPSChartInterestingFramerates is set when the console variable t.FPSChart.InterestingFramerates is initialized or modified.
GFPSChartInterestingFramerates interacts with another variable, GTargetFrameRatesForSummary, which is an array that stores the parsed integer values of the frame rates.
Developers should be aware that changes to t.FPSChart.InterestingFramerates will be reflected in GFPSChartInterestingFramerates, and these changes will take effect when StartCharting() is called.
Best practices for using GFPSChartInterestingFramerates include:
- Accessing its value using GetValueOnGameThread() to ensure thread-safety.
- Parsing the string value into individual frame rates when needed, as shown in the StartCharting() function.
- Using the parsed values stored in GTargetFrameRatesForSummary for performance comparisons and reporting.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ChartCreation.cpp:74
Scope: file
Source code excerpt:
// Comma separated list of interesting frame rates
static TAutoConsoleVariable<FString> GFPSChartInterestingFramerates(
TEXT("t.FPSChart.InterestingFramerates"),
TEXT("30,60,120"),
TEXT("Comma separated list of interesting frame rates\n")
TEXT(" default: 30,60,120"));
/** Array of interesting summary thresholds (e.g., 30 Hz, 60 Hz, 120 Hz) */
TArray<int32> GTargetFrameRatesForSummary;
#Associated Variable and Callsites
This variable is associated with another variable named GFPSChartInterestingFramerates
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ChartCreation.cpp:73
Scope: file
Source code excerpt:
// Comma separated list of interesting frame rates
static TAutoConsoleVariable<FString> GFPSChartInterestingFramerates(
TEXT("t.FPSChart.InterestingFramerates"),
TEXT("30,60,120"),
TEXT("Comma separated list of interesting frame rates\n")
TEXT(" default: 30,60,120"));
/** Array of interesting summary thresholds (e.g., 30 Hz, 60 Hz, 120 Hz) */
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ChartCreation.cpp:1379
Scope (from outer to inner):
file
function void FPerformanceTrackingSystem::StartCharting
Source code excerpt:
GTargetFrameRatesForSummary.Reset();
TArray<FString> InterestingFramerateStrings;
GFPSChartInterestingFramerates.GetValueOnGameThread().ParseIntoArray(InterestingFramerateStrings, TEXT(","));
for (FString FramerateString : InterestingFramerateStrings)
{
FramerateString.TrimStartAndEndInline();
GTargetFrameRatesForSummary.Add(FCString::Atoi(*FramerateString));
}