2021-08-20 10:27:07 -04:00
<?xml version='1.0' ?>
<BuildGraph xmlns= "http://www.epicgames.com/BuildGraph" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://www.epicgames.com/BuildGraph ../../../Build/Graph/Schema.xsd" >
<!-- Horde Options -->
<EnvVar Name= "UE_HORDE_JOBID" />
<Option Name= "Horde" Restrict= "true|false" DefaultValue= "false" Description= "Whether the build is running under Horde" />
<Option Name= "PreflightChange" DefaultValue= "" Description= "Preflight CL number if preflight, empty otherwise" />
<Option Name= "SetPreflightFlag" DefaultValue= "true" Description= "Whether to set the IsPreflight flag to true for preflights. Use with caution: this will cause things like build versions to be set to their non-preflight form." />
<Property Name= "IsPreflight" Value= "false" />
<Property Name= "IsPreflight" Value= "true" If= "'$(PreflightChange)' != '' And $(SetPreflightFlag)" />
<Property Name= "PreflightSuffix" Value= "" />
<Property Name= "PreflightSuffix" Value= "-PF-$(PreflightChange)-$(UE_HORDE_JOBID)" If= "$(IsPreflight)" />
<Property Name= "BuildName" Value= "$(EscapedBranch)-CL-$(Change)$(PreflightSuffix)" />
2021-10-04 17:28:23 -04:00
<Option Name= "CompileCategory" DefaultValue= "Editors" Description= "Category string for Compile Label" />
<Option Name= "RunCategory" DefaultValue= "Test" Description= "Category string for Run Label" />
<Option Name= "BaselineCategory" DefaultValue= "Test" Description= "Category string for Baseline Label" />
2021-08-20 10:27:07 -04:00
<!-- Projects setup -->
<Option Name= "Projects" DefaultValue= "false" Restrict= ".+" Description= "The projects to test" />
<Error Message= "No project names specified" If= "'$(Projects)' == 'false'" />
<!-- Platform Options -->
<Option Name= "Platforms" DefaultValue= "Win64" Description= "The list of platforms to profile" />
<Property Name= "Win64CompileAgentType" Value= "Win64" />
<Property Name= "MacCompileAgentType" Value= "TestMac" />
<Error Message= "No platforms specified" If= "'$(Platforms)' == ''" />
<!-- Build Options -->
<Property Name= "ExtraPluginsCommaDelims" Value= "EditorTests" />
<Property Name= "ExtraPluginsPlusDelims" Value= "" /> <!-- populated programmatically -->
<ForEach Name= "Plugin" Values= "$(ExtraPluginsCommaDelims)" >
<Property Name= "ExtraPluginString" Value= "$(Plugin)" If= "'$(ExtraPluginsPlusDelims)' == ''" />
<Property Name= "ExtraPluginString" Value= "$(ExtraPluginsPlusDelims)+$(Plugin)" If= "'$(ExtraPluginsPlusDelims)' != ''" />
<Property Name= "ExtraPluginsPlusDelims" Value= "$(ExtraPluginString)" />
</ForEach>
2021-09-16 20:02:03 -04:00
<Property Name= "EditorCompileArgs" Value= "" />
<Property Name= "EditorCompileArgs" Value= "-BuildPlugin=$(ExtraPluginsPlusDelims)" If= "'$(ExtraPluginsPlusDelims)' != ''" />
2021-08-20 10:27:07 -04:00
<!-- Automation uses its own network output directory -->
2021-08-20 15:28:36 -04:00
<Property Name= "AutomationNetworkRootDir" Value= "\\epicgames.net\root\Builds\Automation\Reports\EditorPerf" />
<Property Name= "AutomationNetworkRootDir" Value= "/Volumes/Builds/Automation/Reports/EditorPerf" If= "'$(HostPlatform)' != 'Win64'" />
2021-08-20 10:27:07 -04:00
<Property Name= "AutomationLocalOutputDir" Value= "$(RootDir)/LocalBuilds/Reports" />
<!-- Outputs for this run keeping slashes flipped the right way because it shows up on the webapp this way -->
<Property Name= "AutomationNetworkOutputDir" Value= "$(AutomationNetworkRootDir)\$(BuildName)" />
<Property Name= "AutomationNetworkOutputDir" Value= "$(AutomationNetworkRootDir)/$(BuildName)" If= "'$(HostPlatform)' != 'Win64'" />
<Property Name= "AutomationOutputDir" Value= "$(AutomationLocalOutputDir)" />
<Property Name= "AutomationOutputDir" Value= "$(AutomationNetworkOutputDir)" If= "$(IsBuildMachine)" />
<!-- Options for baselining -->
<Option Name= "RunAndBaseline" DefaultValue= "false" Description= "Enable graph dependencies for running and setting the baseline in a single build." />
<Option Name= "BaselineDir" DefaultValue= "$(RootDir)/Engine/Build/Baseline" Description= "The revision controlled location of the baseline telemetry files." />
<Option Name= "BaselineBuildName" DefaultValue= "$(BuildName)" Description= "The BuildName of the build to set as the new baseline to compare against." />
<Property Name= "BaselineAutomationNetworkOutputDir" Value= "$(AutomationNetworkRootDir)/$(BaselineBuildName)" />
<Property Name= "BaselineAutomationNetworkOutputDir" Value= "$(AutomationOutputDir)" If= "$(RunAndBaseline)" />
<!-- Arguments for tracing -->
<Option Name= "Phases" DefaultValue= "Incr;Warm;Cold" Description= "The list of phases to perform" />
<Error Message= "No phases specified" If= "'$(Phases)' == ''" />
<Property Name= "TraceDir" Value= "$(RootDir)/Engine/Programs/UnrealInsights/Saved/TraceSessions" />
<!-- Arguments for phases, keep in mind that these are passed to both the DDCCleanupCommandlet and RunUnreal -->
<Option Name= "ColdArgs" DefaultValue= "-ddc=Cold" Description= "Arguments to unreal for the cold phase" />
<Option Name= "IncrArgs" DefaultValue= "-ddc=Warm" Description= "Arguments to unreal for the incremental phase" />
<Option Name= "WarmArgs" DefaultValue= "-ddc=Warm" Description= "Arguments to unreal for the warm phase" />
<!-- Iterations to run and average together -->
2021-11-03 19:58:01 -04:00
<Option Name= "Iterations" DefaultValue= "1" Description= "The list of iteration numbers to run. For example '1;2;3' for three iterations" />
2021-08-20 10:27:07 -04:00
<!-- Gauntlet arguments for all runs -->
<Property Name= "GauntletArgs" Value= "-build=editor -UseEditor -verbose -tempdir="$(RootDir)/Tests"" />
<Property Name= "GauntletArgs" Value= "$(GauntletArgs) -branch=$(Branch) -ECBranch="$(Branch)" -ECChangelist="$(Change)"" />
<Property Name= "GauntletArgs" Value= "$(GauntletArgs) -maxduration=28800" />
<!-- Gauntlet arguments for profile runs -->
2021-09-16 20:02:03 -04:00
<Property Name= "ProfileArgs" Value= "-test=EditorTests -testfilter=Project.Iteration.PIE -tracefiletrunc" />
2021-08-20 10:27:07 -04:00
<Property Name= "ProfileArgs" Value= "$(ProfileArgs) -EnablePlugins=$(ExtraPluginsCommaDelims)" If= "'$(ExtraPluginsCommaDelims)' != ''" />
2021-09-15 16:52:23 -04:00
<Property Name= "ProfileArgs" Value= "$(ProfileArgs) -SuppressLogWarnings -SuppressLogErrors" />
2021-08-20 10:27:07 -04:00
<Property Name= "ProfileArgs" Value= "$(ProfileArgs) -GameInstanceLostTimerSeconds=3600" />
<Property Name= "ProfileArgs" Value= "$(ProfileArgs) -NoLoadLevelAtStartup -Benchmarking -NODDCCLEANUP" />
<Property Name= "ProfileArgs" Value= "$(ProfileArgs) -NoShaderDistrib -VerboseShaderLogging" />
<!-- Gauntlet arguments for commandlet, summarize runs -->
2021-12-16 14:26:31 -05:00
<Property Name= "CommandletArgs" Value= "-notraceserver -ddc=NoShared" />
2021-08-20 10:27:07 -04:00
<Property Name= "SummarizeArgs" Value= "" />
<Property Name= "SummarizeArgs" Value= "-skipbaseline" If= "$(RunAndBaseline)" />
2021-10-26 10:13:23 -04:00
<!-- Publish telemetry options -->
<Option Name= "TelemetryConfig" DefaultValue= "" Description= "The configuration to use when publishing telemetry data to a database" />
<Property Name= "TelemetryConfig" Value= "UETelemetryStaging" If= "$(IsBuildMachine) And $(IsPreflight) And '$(TelemetryConfig)' == ''" />
<Property Name= "TelemetryConfig" Value= "UETelemetry" If= "$(IsBuildMachine) And '$(TelemetryConfig)' == ''" />
2021-08-20 10:27:07 -04:00
<!-- The main test running macro logic that is expanded with platform and dependency node names -->
2021-11-03 19:58:01 -04:00
<Macro Name= "RunTest" Arguments= "OutputName;Platform;Project;NodeName;Phase;Iteration;Args" >
2021-08-20 15:28:36 -04:00
<Property Name= "TestName" Value= "EditorPerf$(Phase)" />
2021-11-03 19:58:01 -04:00
<Property Name= "IterationName" Value= "$(Project)$(Platform)$(TestName)$(Iteration)" />
<Property Name= "TraceFilePath" Value= "$(TraceDir)/$(IterationName).utrace" />
<Property Name= "TelemetryFileName" Value= "$(IterationName)Telemetry.csv" />
<Property Name= "TelemetryFilePath" Value= "$(TraceDir)/$(TelemetryFileName)" />
<Property Name= "LogOutputParams" Value= "-logdir="$(AutomationOutputDir)/$(OutputName)"" />
<Property Name= "ReportParams" Value= "-WriteTestResultsForHorde -HordeTestDataKey="$(NodeName)$(PreflightSuffix)"" />
<Property Name= "AllGauntletArgs" Value= "-Project=$(Project) -Platform=$(Platform) $(GauntletArgs) $(ReportParams) $(LogOutputParams) -artifactname="$(Phase)$(Iteration)"" />
2021-08-20 10:27:07 -04:00
2021-11-03 19:58:01 -04:00
<!-- Do DDC cleanup outside the editor process, handles Cold cleanup without changing stats -->
<Commandlet Project= "$(Project)" Name= "DDCCleanup" Arguments= "$(Args) $(CommandletArgs)" />
2021-08-20 10:27:07 -04:00
2021-11-03 19:58:01 -04:00
<!-- Run the Gauntlet EditorPerf Tests -->
<Command Name= "RunUnreal" Arguments= "$(AllGauntletArgs) $(ProfileArgs) $(Args) -tracefile="$(TraceFilePath)"" />
2021-08-20 10:27:07 -04:00
2021-11-03 19:58:01 -04:00
<!-- Translate the utrace file into csv data -->
<Commandlet Project= "$(Project)" Name= "SummarizeTrace" Arguments= "-inputfile="$(TraceFilePath)" -testname="$(TestName)" $(SummarizeArgs) $(CommandletArgs)" />
2021-08-20 10:27:07 -04:00
2021-11-03 19:58:01 -04:00
<!-- Save all files named for this run in the trace directory -->
<Copy From= "$(TraceDir)/$(IterationName)*.*" To= "$(AutomationOutputDir)" />
2021-08-20 10:27:07 -04:00
2021-11-03 19:58:01 -04:00
<Do If= "'$(TelemetryConfig)' != ''" >
<!-- Publish telemetry to the db -->
<Command Name= "PublishUnrealAutomationTelemetry" Arguments= "-CSVFile="$(TelemetryFilePath)" -project=$(Project) -changelist=$(Change) -branch=$(Branch) -TelemetryConfig=$(TelemetryConfig)" />
</Do>
2021-08-20 10:27:07 -04:00
</Macro>
<!-- This will be set to the names of all nodes we want to execute based on specified platforms/options -->
<Property Name= "RunGraphNodes" Value= "" />
<!-- Mimic of the Runner that retrieves the stashed telemetry file and copies it to the depot location -->
<Macro Name= "BaselineResult" Arguments= "Platform;Project;Phase" >
2021-08-20 15:28:36 -04:00
<Property Name= "TestName" Value= "EditorPerf$(Phase)" />
2021-08-20 10:27:07 -04:00
<Property Name= "IterationName" Value= "$(Project)$(Platform)$(TestName)1" /> <!-- Note the 1! We use Iteration 1 for baselines for now -->
<Property Name= "TelemetryFileName" Value= "$(IterationName)Telemetry.csv" />
<Property Name= "LocalTelemetryFilePath" Value= "$(BaselineDir)/$(TelemetryFileName)" />
<Property Name= "NetworkTelemetryFilePath" Value= "$(BaselineAutomationNetworkOutputDir)/$(TelemetryFileName)" />
<Copy From= "$(NetworkTelemetryFilePath)" To= "$(LocalTelemetryFilePath)" Overwrite= "true" />
<Do If= "!$(IsBuildMachine)" >
<Spawn Exe= "p4" Arguments= "reconcile -ea $(LocalTelemetryFilePath)" />
</Do>
</Macro>
<!-- This will be set to the names of all nodes we want to execute based on specified platforms/options -->
<Property Name= "BaselineGraphNodes" Value= "" />
<!-- ForEach Platform to run, generate graph nodes -->
<ForEach Name= "Platform" Values= "$(Platforms)" >
2021-09-16 20:42:29 -04:00
<!-- ForEach Project to run, generate the graph nodes -->
<ForEach Name= "Project" Values= "$(Projects)" >
2021-08-20 10:27:07 -04:00
2021-09-27 19:39:25 -04:00
<!-- We parse the Editor target name from within [] in case it's not $(Project)Editor -->
2021-09-16 20:42:29 -04:00
<Property Name= "EditorTarget" Value= "$(Project)Editor" />
<Regex Pattern= "(.*)\[(.*)\]" Capture= "Project;EditorTarget" Input= "$(Project)" Optional= "true" />
2021-09-27 19:39:25 -04:00
<!-- Use as base string for directories and key for node names -->
2021-09-16 20:42:29 -04:00
<Property Name= "OutputName" Value= "$(Project)$(Platform)EditorPerf" />
2021-10-04 17:28:23 -04:00
<!-- Compile the Editor -->
<Property Name= "CompileNodeName" Value= "Compile $(Project) $(Platform)" />
2021-09-20 16:43:30 -04:00
<Agent Name= "Compile Editor Agent $(Platform) $(Project)" Type= "$($(Platform)CompileAgentType)" >
2021-10-04 17:28:23 -04:00
<Node Name= "$(CompileNodeName)" >
2021-09-27 19:39:25 -04:00
<Compile Target= "UnrealHeaderTool" Platform= "$(Platform)" Configuration= "Development" />
<Compile Target= "UnrealHeaderTool" Platform= "$(Platform)" Project= "$(Project)" Configuration= "Development" />
<Compile Target= "ShaderCompileWorker" Platform= "$(Platform)" Configuration= "Development" />
<Compile Target= "CrashReportClientEditor" Platform= "$(Platform)" Project= "$(Project)" Configuration= "Shipping" />
<Compile Target= "$(EditorTarget)" Platform= "$(Platform)" Project= "$(Project)" Configuration= "Development" Arguments= "$(EditorCompileArgs)" />
2021-09-16 20:02:03 -04:00
</Node>
2021-09-20 16:43:30 -04:00
</Agent>
2022-05-09 20:55:59 -04:00
<Label Category= "$(CompileCategory)" Name= "$(Project) Editor Compile" Requires= "$(CompileNodeName)" />
2021-09-20 16:43:30 -04:00
2021-10-04 17:28:23 -04:00
<!-- Run the Tests -->
<Property Name= "RunNodeRequires" Value= "$(CompileNodeName)" />
2021-11-03 23:16:02 -04:00
<Property Name= "RunNodeList" Value= "" /> <!-- Each node in this the nested loops below, they need to depend on predecessors -->
2021-09-20 16:43:30 -04:00
<Agent Name= "EditorPerf Agent $(Platform) $(Project)" Type= "EditorPerf$(Platform)" >
2021-11-03 19:58:01 -04:00
<ForEach Name= "Phase" Values= "$(Phases)" >
<ForEach Name= "Iteration" Values= "$(Iterations)" >
<!-- Only ever do one iteration of incremental, because it will warm up the workspace -->
<Do If= "'$(Phase)' != 'Incr' or '$(Iteration)' == '1'" >
<Property Name= "RunNodeName" Value= "Run $(OutputName) $(Phase)$(Iteration)" />
2021-11-03 23:16:02 -04:00
<Node Name= "$(RunNodeName)" Requires= "$(RunNodeRequires);$(RunNodeList)" >
2021-11-03 19:58:01 -04:00
<Expand Name= "RunTest" OutputName= "$(OutputName)" Platform= "$(Platform)" Project= "$(Project)" NodeName= "$(RunNodeName)" Phase= "$(Phase)" Iteration= "$(Iteration)" Args= "$($(Phase)Args)" />
</Node>
2021-11-03 23:16:02 -04:00
<Property Name= "RunNodeList" Value= "$(RunNodeList);$(RunNodeName)" />
2021-11-03 19:58:01 -04:00
</Do>
2021-08-20 10:27:07 -04:00
</ForEach>
2021-11-03 19:58:01 -04:00
</ForEach>
2021-10-04 17:28:23 -04:00
</Agent>
2022-05-09 20:55:59 -04:00
<Label Category= "$(RunCategory)" Name= "$(Project) Editor Run" Requires= "$(RunNodeRequires);$(RunNodeList)" UgsBadge= "$(Project) Editor Run" />
2021-11-03 23:16:02 -04:00
<Property Name= "RunGraphNodes" Value= "$(RunGraphNodes);$(RunNodeList)" />
2021-08-20 10:27:07 -04:00
2021-10-04 17:28:23 -04:00
<!-- Baseline the Results -->
<Property Name= "BaselineNodeName" Value= "Baseline $(OutputName)" />
<Property Name= "BaselineNodeRequires" Value= "" />
<Property Name= "BaselineNodeRequires" Value= "$(RunNodeName)" If= "$(RunAndBaseline)" />
<Property Name= "BaselineGraphNodes" Value= "$(BaselineGraphNodes);$(BaselineNodeName)" />
<Agent Name= "EditorPerf Agent $(Platform) $(Project)" Type= "EditorPerf$(Platform)" >
2021-08-20 10:27:07 -04:00
<Node Name= "$(BaselineNodeName)" Requires= "$(BaselineNodeRequires)" >
<ForEach Name= "Phase" Values= "$(Phases)" >
<Expand Name= "BaselineResult" Platform= "$(Platform)" Project= "$(Project)" Phase= "$(Phase)" />
</ForEach>
</Node>
2021-09-16 20:42:29 -04:00
</Agent>
2022-05-09 20:55:59 -04:00
<Label Category= "$(BaselineCategory)" Name= "$(Project) Perf Baseline" Requires= "$(BaselineNodeName)" />
2021-08-20 10:27:07 -04:00
2021-09-16 20:42:29 -04:00
</ForEach> <!-- Projects -->
2021-08-20 10:27:07 -04:00
</ForEach> <!-- Platforms -->
<!-- These Nodes run the Editor and gather profile data -->
2021-08-20 15:28:36 -04:00
<Aggregate Name= "Run EditorPerf Tests" Requires= "$(RunGraphNodes)" />
2021-08-20 10:27:07 -04:00
<!-- These Nodes copies the CSV telemetry files to special location in the depot, thus making them the "baselines" -->
2021-08-20 15:28:36 -04:00
<Aggregate Name= "Baseline EditorPerf Results" Requires= "$(BaselineGraphNodes)" />
2021-08-20 10:27:07 -04:00
<!-- This Node submits the baseline CSV files to Perforce -->
<!--
<Agent Name= "Submission Agent Win64" Type= "Win64" >
<Node Name= "Submit Baseline To Perforce" Requires= "$(BaselineGraphNodes)" >
2021-08-20 15:28:36 -04:00
<Submit Description= "[CL $(Change)] Updated EditorPerf baselines" Files= "$(BaselineFiles)" />
2021-08-20 10:27:07 -04:00
</Node>
</Agent>
-->
</BuildGraph>