DefaultInteractiveFramerate

DefaultInteractiveFramerate

#Overview

name: DefaultInteractiveFramerate

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of DefaultInteractiveFramerate is to define a default frame rate threshold for interactive performance testing in Unreal Engine’s automation system. It is used to determine whether the game is running at an acceptable frame rate during automated testing scenarios.

This setting variable is primarily used by the Unreal Engine’s automation and testing subsystem. It is referenced in the AutomationTestSettings class and utilized in the AutomationCommon module.

The value of this variable is set in the UAutomationTestSettings constructor with a default value of 10.0 frames per second. It can also be configured through the project settings or configuration files, as indicated by the UPROPERTY macro with the ‘config’ specifier.

DefaultInteractiveFramerate interacts with two other related variables:

  1. DefaultInteractiveFramerateWaitTime: Defines the maximum wait time for achieving the target frame rate.
  2. DefaultInteractiveFramerateDuration: Specifies how long the target frame rate must be maintained.

Developers should be aware that this variable is crucial for performance-related automated tests. It sets the baseline for what is considered an “interactive” frame rate in the context of automation testing.

Best practices when using this variable include:

  1. Adjust the value based on the specific performance requirements of your project.
  2. Consider different values for different platforms or test scenarios.
  3. Use in conjunction with DefaultInteractiveFramerateWaitTime and DefaultInteractiveFramerateDuration for comprehensive performance testing.
  4. Regularly review and update this value as your project evolves and performance targets change.
  5. Be cautious when modifying this value, as it may affect the pass/fail criteria of existing automated tests.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:2795, section: [AutomationTesting.StaticMeshEditorTest]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Tests/AutomationTestSettings.h:450

Scope (from outer to inner):

file
class        class UAutomationTestSettings : public UObject

Source code excerpt:

	 */
	UPROPERTY(EditAnywhere, config, Category = Automation)
	float DefaultInteractiveFramerate;

	/**
	 * Default wait time in seconds for FWaitForInteractiveFrameRate. After this time a test will fail.
	 */
	UPROPERTY(EditAnywhere, config, Category = Automation)
	float DefaultInteractiveFramerateWaitTime;

	/**
	 *  Default time in seconds that DefaultInteractiveFramerate must remain true in FWaitForInteractiveFrameRate
	 */
	UPROPERTY(EditAnywhere, config, Category = Automation)
	float DefaultInteractiveFramerateDuration;
};

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Tests/AutomationCommon.cpp:572

Scope (from outer to inner):

file
function     FWaitForInteractiveFrameRate::FWaitForInteractiveFrameRate

Source code excerpt:

	if (DesiredFrameRate == 0)
	{
		DesiredFrameRate = AutomationTestSettings->DefaultInteractiveFramerate;
	}

	if (Duration == 0)
	{
		Duration = AutomationTestSettings->DefaultInteractiveFramerateDuration;
	}

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Tests/AutomationTestSettings.cpp:12

Scope (from outer to inner):

file
function     UAutomationTestSettings::UAutomationTestSettings

Source code excerpt:

	PIETestDuration = 5.f;
	// These defaults are are also set in BaseEngine.ini
	DefaultInteractiveFramerate = 10.f;
	DefaultInteractiveFramerateWaitTime = 10.f * 60.f;		// 10 minutes - assume shaders and other DDC may need to be built
	DefaultInteractiveFramerateDuration = 5.f;
}