private static void Compare(StatisticalTestKind statisticalTestKind, ThresholdUnit thresholdUnit, double thresholdValue, double[] baseline, double[] current, string expectedResult) { var sut = new StatisticalTestColumn(statisticalTestKind, Threshold.Create(thresholdUnit, thresholdValue)); Assert.Equal(expectedResult, sut.GetValue(null, null, new Statistics(baseline), new Statistics(current), isBaseline: true)); Assert.Equal(expectedResult, sut.GetValue(null, null, new Statistics(baseline), new Statistics(current), isBaseline: false)); }
public void CompareAllResults() { var comparer = new Comparer(Threshold.Create(ThresholdUnit.Ratio, 0.05), Threshold.Create(ThresholdUnit.Nanoseconds, 3)); var results = comparer.Compare(_baselineFolder, _diffFolder, new string[0]).ToList(); Assert.Equal(8, results.Count()); Assert.Equal(2, results.Count(x => x.Runtime == ".NET Core 3.1.7")); Assert.Equal(2, results.Count(x => x.Runtime == ".NET 4.8")); Assert.Equal(2, results.Count(x => x.Runtime == ".NET Core 3.1")); Assert.Equal(2, results.Count(x => x.Runtime == ".NET 4.6.1")); }
public StatisticalTestColumnAttribute(StatisticalTestKind testKind, ThresholdUnit thresholdUnit, double value, bool showPValues = false) : base(StatisticalTestColumn.Create(testKind, Threshold.Create(thresholdUnit, value), showPValues)) { }