use of de.dagere.peass.measurement.statistics.bimodal.CompareData in project peass by DaGeRe.
the class TestBimodalChange method testIsBimodalChange.
@Test
public void testIsBimodalChange() {
List<Result> before = BimodalTestUtil.buildValues(50, 100);
List<Result> after = BimodalTestUtil.buildValues(51, 101);
CompareData data = new CompareData(before, after);
final BimodalityTester tester = new BimodalityTester(data);
Assert.assertTrue(tester.isBimodal());
Assert.assertTrue(tester.isTChange(0.001));
}
use of de.dagere.peass.measurement.statistics.bimodal.CompareData in project peass by DaGeRe.
the class TestDifferentStatisticTests method testBimodalExample.
@Test
public void testBimodalExample() {
final CallTreeNode node = new CallTreeNode("de.mypackage.Test#callMethod", "public void de.mypackage.Test.callMethod()", "public void de.mypackage.Test.callMethod()", TestCallTreeStatistics.CONFIG);
final CallTreeNode otherVersionNode = new CallTreeNode("de.mypackage.Test#callMethod", "public void de.mypackage.Test.callMethod()", "public void de.mypackage.Test.callMethod()", TestCallTreeStatistics.CONFIG);
node.setOtherVersionNode(otherVersionNode);
buildBimodalMeasurementValues(node);
CompareData cd = node.getComparableStatistics("A", "B");
TestCallTreeStatistics.CONFIG.getStatisticsConfig().setStatisticTest(ImplementedTests.AGNOSTIC_T_TEST);
Relation relationAgnostic = StatisticUtil.isDifferent(cd, TestCallTreeStatistics.CONFIG.getStatisticsConfig());
Assert.assertEquals(Relation.UNKOWN, relationAgnostic);
TestCallTreeStatistics.CONFIG.getStatisticsConfig().setStatisticTest(ImplementedTests.T_TEST);
Relation relationTTest = StatisticUtil.isDifferent(cd, TestCallTreeStatistics.CONFIG.getStatisticsConfig());
Assert.assertEquals(Relation.EQUAL, relationTTest);
TestCallTreeStatistics.CONFIG.getStatisticsConfig().setStatisticTest(ImplementedTests.BIMODAL_T_TEST);
Relation relation = StatisticUtil.isDifferent(cd, TestCallTreeStatistics.CONFIG.getStatisticsConfig());
Assert.assertEquals(Relation.LESS_THAN, relation);
TestCallTreeStatistics.CONFIG.getStatisticsConfig().setStatisticTest(ImplementedTests.MANN_WHITNEY_TEST);
Relation relationMannWhitney = StatisticUtil.isDifferent(cd, TestCallTreeStatistics.CONFIG.getStatisticsConfig());
Assert.assertEquals(Relation.LESS_THAN, relationMannWhitney);
TestCallTreeStatistics.CONFIG.getStatisticsConfig().setStatisticTest(ImplementedTests.CONFIDENCE_INTERVAL);
Relation relationConfidence = StatisticUtil.isDifferent(cd, TestCallTreeStatistics.CONFIG.getStatisticsConfig());
Assert.assertEquals(Relation.EQUAL, relationConfidence);
}
use of de.dagere.peass.measurement.statistics.bimodal.CompareData in project peass by DaGeRe.
the class StatisticUtil method isBimodal.
public static boolean isBimodal(final List<Result> valuesPrev, final List<Result> valuesVersion) {
CompareData data = new CompareData(valuesPrev, valuesVersion);
final BimodalityTester tester = new BimodalityTester(data);
return tester.isBimodal();
}
use of de.dagere.peass.measurement.statistics.bimodal.CompareData in project peass by DaGeRe.
the class DifferentNodeDeterminer method calculateNodeDifference.
private void calculateNodeDifference(final CallTreeNode currentPredecessorNode, final CompareData cd) {
if (cd.getBeforeStat() == null || cd.getAfterStat() == null) {
LOG.debug("Statistics is null, is different: {} vs {}", cd.getBeforeStat(), cd.getAfterStat());
levelDifferentPrecessor.add(currentPredecessorNode);
} else {
final CompareData cleaned = removeOutliers(cd);
printComparisonInfos(currentPredecessorNode, cleaned.getBeforeStat(), cleaned.getAfterStat());
checkNodeDiffering(currentPredecessorNode, cleaned);
}
}
use of de.dagere.peass.measurement.statistics.bimodal.CompareData in project peass by DaGeRe.
the class DifferentNodeDeterminer method calculateDiffering.
public void calculateDiffering() {
final Iterator<CallTreeNode> predecessorIterator = measurePredecessor.iterator();
for (; predecessorIterator.hasNext(); ) {
final CallTreeNode currentPredecessorNode = predecessorIterator.next();
CompareData cd = currentPredecessorNode.getComparableStatistics(measurementConfig.getExecutionConfig().getVersionOld(), measurementConfig.getExecutionConfig().getVersion());
calculateNodeDifference(currentPredecessorNode, cd);
}
}
Aggregations