Skip to content

Commit

Permalink
Add flag the specifies whether to include performance tests in defaul…
Browse files Browse the repository at this point in the history
…t reports.
  • Loading branch information
npruehs committed Jul 8, 2020
1 parent ce106e0 commit fda8475
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ ADaeTestPerformanceBudgetActor::ADaeTestPerformanceBudgetActor(
GameThreadBudget = 20.0f;
RenderThreadBudget = 20.0f;
GPUBudget = 20.0f;

bIncludeInDefaultTestReport = true;
}

void ADaeTestPerformanceBudgetActor::BeginPlay()
Expand Down Expand Up @@ -266,7 +268,14 @@ TSharedPtr<FDaeTestResultData> ADaeTestPerformanceBudgetActor::CollectResults()

FDaeTestReportWriterSet ADaeTestPerformanceBudgetActor::GetReportWriters() const
{
FDaeTestReportWriterSet ReportWriters = Super::GetReportWriters();
FDaeTestReportWriterSet ReportWriters;

if (bIncludeInDefaultTestReport)
{
FDaeTestReportWriterSet DefaultReportWriters = Super::GetReportWriters();
ReportWriters.Add(DefaultReportWriters);
}

ReportWriters.Add(MakeShareable(new FDaeTestReportWriterPerformance()));
return ReportWriters;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ class DAEDALICTESTAUTOMATIONPLUGIN_API ADaeTestPerformanceBudgetActor : public A
UPROPERTY(EditAnywhere)
float GPUBudget;

/** Whether performance budget violations should cause a failure item in default test reports. */
UPROPERTY(EditAnywhere)
bool bIncludeInDefaultTestReport;

bool bIsRunning;
bool bIsRecording;

Expand Down

0 comments on commit fda8475

Please sign in to comment.