use of de.dagere.peass.analysis.measurement.AnalyseFullData in project peass by DaGeRe.
the class ContinuousExecutor method analyzeMeasurements.
private void analyzeMeasurements(final File measurementFolder) throws InterruptedException, IOException, JsonGenerationException, JsonMappingException, XmlPullParserException {
final ProjectStatistics statistics = new ProjectStatistics();
TestTransformer testTransformer = ExecutorCreator.createTestTransformer(folders, measurementConfig.getExecutionConfig(), measurementConfig);
TestExecutor executor = ExecutorCreator.createExecutor(folders, testTransformer, env);
ModuleClassMapping mapping = new ModuleClassMapping(folders.getProjectFolder(), executor.getModules(), measurementConfig.getExecutionConfig());
final AnalyseFullData afd = new AnalyseFullData(resultsFolders.getChangeFile(), statistics, mapping, measurementConfig.getStatisticsConfig());
afd.analyseFolder(measurementFolder);
Constants.OBJECTMAPPER.writeValue(resultsFolders.getStatisticsFile(), statistics);
}
use of de.dagere.peass.analysis.measurement.AnalyseFullData in project peass by DaGeRe.
the class TestChangedIterationReading method testChangedIterationReading.
@Test
public void testChangedIterationReading() throws InterruptedException {
VersionComparator.setVersions(Arrays.asList(new GitCommit("a23e385264c31def8dcda86c3cf64faa698c62d8", null, null, null), new GitCommit("33ce17c04b5218c25c40137d4d09f40fbb3e4f0f", null, null, null)));
ProjectStatistics statistics = new ProjectStatistics();
AnalyseFullData afd = new AnalyseFullData(new File("target/changes.json"), statistics, null, new StatisticsConfig());
afd.analyseFolder(new File(DATA_FOLDER, "measurement_a23e385264c31def8dcda86c3cf64faa698c62d8_33ce17c04b5218c25c40137d4d09f40fbb3e4f0f/measurements"));
TestcaseStatistic testcaseStatistic = statistics.getStatistics().get("a23e385264c31def8dcda86c3cf64faa698c62d8").get(new TestCase("de.test.CalleeTest#onlyCallMethod2"));
System.out.println(testcaseStatistic);
System.out.println(testcaseStatistic.getDeviationCurrent());
System.out.println(testcaseStatistic.getDeviationOld());
MatcherAssert.assertThat(testcaseStatistic.getDeviationCurrent(), Matchers.lessThan(800000d));
MatcherAssert.assertThat(testcaseStatistic.getDeviationOld(), Matchers.lessThan(800000d));
}
Aggregations