Merge pull request #11 from unity/FixStandardDevAddition

fix standard deviation being added to threshold automatically
This commit is contained in:
Andre Maestas 2023-04-25 12:50:09 -07:00 коммит произвёл GitHub Enterprise
Родитель 839b3aaf27 1ac07fe8b5
Коммит f49d9c9f3a
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -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 deviation or not
var positiveThresholdValue = baselineval + (baselineval * sampleGroup.Threshold);
var negativeThresholdValue = baselineval - (baselineval * sampleGroup.Threshold);
if (sampleGroup.IncreaseIsBetter)
{