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. // whether or not a regression has occurred.
sampleGroupResult.BaselineValue = baselineSampleGroupResult.AggregatedValue; sampleGroupResult.BaselineValue = baselineSampleGroupResult.AggregatedValue;
sampleGroupResult.Threshold = baselineSampleGroupResult.Threshold; sampleGroupResult.Threshold = baselineSampleGroupResult.Threshold;
sampleGroupResult.StandardDeviation = baselineSampleGroupResult.StandardDeviation;
sampleGroupResult.IncreaseIsBetter = baselineSampleGroupResult.IncreaseIsBetter;
var res = DeterminePerformanceResult(sampleGroupResult, sigfig); var res = DeterminePerformanceResult(sampleGroupResult, sigfig);
@ -172,10 +174,11 @@ namespace UnityPerformanceBenchmarkReporter
private MeasurementResult DeterminePerformanceResult(SampleGroupResult sampleGroup, uint sigFig) private MeasurementResult DeterminePerformanceResult(SampleGroupResult sampleGroup, uint sigFig)
{ {
var measurementResult = MeasurementResult.Neutral; var measurementResult = MeasurementResult.Neutral;
var positiveThresholdValue = sampleGroup.BaselineValue + (sampleGroup.BaselineValue * sampleGroup.Threshold);
var negativeThresholdValue = sampleGroup.BaselineValue - (sampleGroup.BaselineValue * sampleGroup.Threshold); var baselineval = sampleGroup.BaselineValue;// + sampleGroup.StandardDeviation ; //TODO Add flag to use standard deviation or not
positiveThresholdValue += sampleGroup.StandardDeviation; var positiveThresholdValue = baselineval + (baselineval * sampleGroup.Threshold);
negativeThresholdValue -= sampleGroup.StandardDeviation; var negativeThresholdValue = baselineval - (baselineval * sampleGroup.Threshold);
if (sampleGroup.IncreaseIsBetter) if (sampleGroup.IncreaseIsBetter)
{ {