Search in sources :

Example 1 with AnalyseFullData

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);
}
Also used : TestExecutor(de.dagere.peass.execution.utils.TestExecutor) TestTransformer(de.dagere.peass.testtransformation.TestTransformer) AnalyseFullData(de.dagere.peass.analysis.measurement.AnalyseFullData) ModuleClassMapping(de.dagere.peass.dependency.analysis.ModuleClassMapping) ProjectStatistics(de.dagere.peass.analysis.measurement.ProjectStatistics)

Example 2 with AnalyseFullData

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));
}
Also used : TestcaseStatistic(de.dagere.peass.measurement.statistics.data.TestcaseStatistic) StatisticsConfig(de.dagere.peass.config.StatisticsConfig) GitCommit(de.dagere.peass.vcs.GitCommit) AnalyseFullData(de.dagere.peass.analysis.measurement.AnalyseFullData) TestCase(de.dagere.peass.dependency.analysis.data.TestCase) ProjectStatistics(de.dagere.peass.analysis.measurement.ProjectStatistics) File(java.io.File) Test(org.junit.jupiter.api.Test)

Aggregations

AnalyseFullData (de.dagere.peass.analysis.measurement.AnalyseFullData)2 ProjectStatistics (de.dagere.peass.analysis.measurement.ProjectStatistics)2 StatisticsConfig (de.dagere.peass.config.StatisticsConfig)1 ModuleClassMapping (de.dagere.peass.dependency.analysis.ModuleClassMapping)1 TestCase (de.dagere.peass.dependency.analysis.data.TestCase)1 TestExecutor (de.dagere.peass.execution.utils.TestExecutor)1 TestcaseStatistic (de.dagere.peass.measurement.statistics.data.TestcaseStatistic)1 TestTransformer (de.dagere.peass.testtransformation.TestTransformer)1 GitCommit (de.dagere.peass.vcs.GitCommit)1 File (java.io.File)1 Test (org.junit.jupiter.api.Test)1