From 92913ed5dcc7c7dadfe8acd885c0c3f83762576d Mon Sep 17 00:00:00 2001 From: andre-maestas Date: Tue, 25 Apr 2023 12:16:32 -0700 Subject: [PATCH 1/2] fix standard deveation being added to threshold automatically --- .../PerformanceTestRunProcessor.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/UnityPerformanceBenchmarkReporter/PerformanceTestRunProcessor.cs b/UnityPerformanceBenchmarkReporter/PerformanceTestRunProcessor.cs index ede65fd..07e530e 100644 --- a/UnityPerformanceBenchmarkReporter/PerformanceTestRunProcessor.cs +++ b/UnityPerformanceBenchmarkReporter/PerformanceTestRunProcessor.cs @@ -85,6 +85,8 @@ namespace UnityPerformanceBenchmarkReporter // whether or not a regression has occurred. sampleGroupResult.BaselineValue = baselineSampleGroupResult.AggregatedValue; sampleGroupResult.Threshold = baselineSampleGroupResult.Threshold; + sampleGroupResult.StandardDeviation = baselineSampleGroupResult.StandardDeviation; + sampleGroupResult.IncreaseIsBetter = baselineSampleGroupResult.IncreaseIsBetter; var res = DeterminePerformanceResult(sampleGroupResult, sigfig); @@ -172,10 +174,11 @@ namespace UnityPerformanceBenchmarkReporter private MeasurementResult DeterminePerformanceResult(SampleGroupResult sampleGroup, uint sigFig) { var measurementResult = MeasurementResult.Neutral; - var positiveThresholdValue = sampleGroup.BaselineValue + (sampleGroup.BaselineValue * sampleGroup.Threshold); - var negativeThresholdValue = sampleGroup.BaselineValue - (sampleGroup.BaselineValue * sampleGroup.Threshold); - positiveThresholdValue += sampleGroup.StandardDeviation; - negativeThresholdValue -= sampleGroup.StandardDeviation; + + var baselineval = sampleGroup.BaselineValue;// + sampleGroup.StandardDeviation ; //TODO Add flag to use standard dveationm or not + var positiveThresholdValue = baselineval + (baselineval * sampleGroup.Threshold); + var negativeThresholdValue = baselineval - (baselineval * sampleGroup.Threshold); + if (sampleGroup.IncreaseIsBetter) { From 1ac07fe8b5a154d22db881d84ddfb120f3fc69be Mon Sep 17 00:00:00 2001 From: andre-maestas Date: Tue, 25 Apr 2023 12:19:28 -0700 Subject: [PATCH 2/2] fixed comment typo --- .../PerformanceTestRunProcessor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnityPerformanceBenchmarkReporter/PerformanceTestRunProcessor.cs b/UnityPerformanceBenchmarkReporter/PerformanceTestRunProcessor.cs index 07e530e..a74d3b4 100644 --- a/UnityPerformanceBenchmarkReporter/PerformanceTestRunProcessor.cs +++ b/UnityPerformanceBenchmarkReporter/PerformanceTestRunProcessor.cs @@ -175,7 +175,7 @@ namespace UnityPerformanceBenchmarkReporter { var measurementResult = MeasurementResult.Neutral; - var baselineval = sampleGroup.BaselineValue;// + sampleGroup.StandardDeviation ; //TODO Add flag to use standard dveationm or not + var baselineval = sampleGroup.BaselineValue;// + sampleGroup.StandardDeviation ; //TODO Add flag to use standard deviation or not var positiveThresholdValue = baselineval + (baselineval * sampleGroup.Threshold); var negativeThresholdValue = baselineval - (baselineval * sampleGroup.Threshold);