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;
}
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;
}
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);
}
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());
}
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());
}
Aggregations