Search in sources :

Example 6 with StaticTestSelection

use of de.dagere.peass.dependency.persistence.StaticTestSelection in project peass by DaGeRe.

the class FindLowestVMCountStarter method call.

@Override
public Void call() throws Exception {
    final StaticTestSelection dependencies = Constants.OBJECTMAPPER.readValue(dependencyFile, StaticTestSelection.class);
    VersionComparator.setDependencies(dependencies);
    final FindLowestVMCounter flv = new FindLowestVMCounter();
    for (File folder : data) {
        LOG.info("Searching in " + folder);
        flv.processDataFolder(folder);
    }
    return null;
}
Also used : File(java.io.File) StaticTestSelection(de.dagere.peass.dependency.persistence.StaticTestSelection)

Example 7 with StaticTestSelection

use of de.dagere.peass.dependency.persistence.StaticTestSelection in project peass by DaGeRe.

the class IsThereTimeReductionIterationsStarter method call.

@Override
public Void call() throws Exception {
    final StaticTestSelection dependencies = Constants.OBJECTMAPPER.readValue(dependencyFile, StaticTestSelection.class);
    VersionComparator.setDependencies(dependencies);
    final IsThereTimeReductionIterations isThereTimeReductionIterations = new IsThereTimeReductionIterations();
    isThereTimeReductionIterations.analyze(data);
    return null;
}
Also used : StaticTestSelection(de.dagere.peass.dependency.persistence.StaticTestSelection)

Example 8 with StaticTestSelection

use of de.dagere.peass.dependency.persistence.StaticTestSelection in project peass by DaGeRe.

the class AnalyseFullData method main.

public static void main(final String[] args) throws InterruptedException, JAXBException, JsonParseException, JsonMappingException, IOException {
    final File folder = new File(args[0]);
    if (!folder.getName().equals("measurements")) {
        throw new RuntimeException("Can only be executed with measurements-folder! For searching folders, use FolderSearcher");
    }
    LOG.info("Draw results: " + Constants.DRAW_RESULTS);
    VersionComparator.setDependencies(new StaticTestSelection());
    // final File dependencyFile = new File(args[1]);
    // final Dependencies dependencies = Constants.OBJECTMAPPER.readValue(dependencyFile, Dependencies.class);
    // VersionComparator.setDependencies(dependencies);
    // throw new RuntimeException("adapt if needed");
    ProjectStatistics statistics = new ProjectStatistics();
    final AnalyseFullData analyseFullData = new AnalyseFullData(new File("results/changes.json"), statistics, null, new StatisticsConfig());
    analyseFullData.analyseFolder(folder);
    Constants.OBJECTMAPPER.writeValue(new File("results/statistics.json"), statistics);
}
Also used : StatisticsConfig(de.dagere.peass.config.StatisticsConfig) File(java.io.File) StaticTestSelection(de.dagere.peass.dependency.persistence.StaticTestSelection)

Example 9 with StaticTestSelection

use of de.dagere.peass.dependency.persistence.StaticTestSelection in project peass by DaGeRe.

the class TestMerging method testMerging.

@Test
public void testMerging() {
    List<GitCommit> commits = ParallelTestUtil.getCommits();
    VersionComparator.setVersions(commits);
    StaticTestSelection deps1 = new StaticTestSelection(), deps2 = new StaticTestSelection();
    deps1.setInitialversion(new InitialVersion());
    deps1.getInitialversion().setVersion("0");
    for (GitCommit commit : commits.subList(1, 6)) {
        deps1.getVersions().put(commit.getTag(), null);
    }
    deps2.setInitialversion(new InitialVersion());
    deps2.getInitialversion().setVersion("5");
    for (GitCommit commit : commits.subList(5, 10)) {
        deps2.getVersions().put(commit.getTag(), null);
    }
    StaticTestSelection merged = DependencyReaderUtil.mergeDependencies(deps1, deps2);
    Assert.assertEquals(9, merged.getVersions().size());
}
Also used : GitCommit(de.dagere.peass.vcs.GitCommit) InitialVersion(de.dagere.peass.dependency.persistence.InitialVersion) StaticTestSelection(de.dagere.peass.dependency.persistence.StaticTestSelection) Test(org.junit.jupiter.api.Test)

Example 10 with StaticTestSelection

use of de.dagere.peass.dependency.persistence.StaticTestSelection in project peass by DaGeRe.

the class TestMerging method testMergingStrangeDistribution.

@Test
public void testMergingStrangeDistribution() {
    List<GitCommit> commits = ParallelTestUtil.getCommits();
    VersionComparator.setVersions(commits);
    StaticTestSelection deps1 = new StaticTestSelection(), deps2 = new StaticTestSelection();
    deps1.setInitialversion(new InitialVersion());
    deps1.getInitialversion().setVersion("0");
    for (GitCommit commit : commits.subList(1, 8)) {
        deps1.getVersions().put(commit.getTag(), null);
    }
    deps2.setInitialversion(new InitialVersion());
    deps2.getInitialversion().setVersion("7");
    for (GitCommit commit : commits.subList(8, 10)) {
        deps2.getVersions().put(commit.getTag(), null);
    }
    StaticTestSelection merged = DependencyReaderUtil.mergeDependencies(deps1, deps2);
    Assert.assertEquals(9, merged.getVersions().size());
}
Also used : GitCommit(de.dagere.peass.vcs.GitCommit) InitialVersion(de.dagere.peass.dependency.persistence.InitialVersion) StaticTestSelection(de.dagere.peass.dependency.persistence.StaticTestSelection) Test(org.junit.jupiter.api.Test)

Aggregations

StaticTestSelection (de.dagere.peass.dependency.persistence.StaticTestSelection)56 File (java.io.File)24 Test (org.junit.jupiter.api.Test)22 ExecutionConfig (de.dagere.peass.config.ExecutionConfig)14 PeassFolders (de.dagere.peass.folders.PeassFolders)14 ExecutionData (de.dagere.peass.dependency.persistence.ExecutionData)12 VersionStaticSelection (de.dagere.peass.dependency.persistence.VersionStaticSelection)12 LinkedList (java.util.LinkedList)9 TestCase (de.dagere.peass.dependency.analysis.data.TestCase)8 KiekerConfig (de.dagere.peass.config.KiekerConfig)7 InitialVersion (de.dagere.peass.dependency.persistence.InitialVersion)7 EnvironmentVariables (de.dagere.peass.execution.utils.EnvironmentVariables)7 VersionIteratorGit (de.dagere.peass.vcs.VersionIteratorGit)7 ChangedEntity (de.dagere.peass.dependency.analysis.data.ChangedEntity)6 DependencyReader (de.dagere.peass.dependency.reader.DependencyReader)6 GitCommit (de.dagere.peass.vcs.GitCommit)6 TestSet (de.dagere.peass.dependency.analysis.data.TestSet)5 ResultsFolders (de.dagere.peass.folders.ResultsFolders)5 GitUtils (de.dagere.peass.vcs.GitUtils)5 ChangeManager (de.dagere.peass.dependency.ChangeManager)4