use of de.dagere.kopeme.generated.TestcaseType.Datacollector.Chunk in project peass by DaGeRe.
the class MissingExecutionFinder method removeXMLExecutions.
private void removeXMLExecutions(final File folder) throws JAXBException {
for (final File measurementFile : folder.listFiles()) {
if (measurementFile.getName().endsWith(".xml")) {
LOG.info("File:" + measurementFile);
final Kopemedata data = new XMLDataLoader(measurementFile).getFullData();
for (final TestcaseType testcase : data.getTestcases().getTestcase()) {
final String testmethod = testcase.getName();
for (final Chunk c : testcase.getDatacollector().get(0).getChunk()) {
final String version = findVersion(c);
LOG.debug("Removing {}", version);
final TestSet versionsTests = tests.getVersions().get(version);
if (versionsTests != null) {
removeTestFromTestSet(data.getTestcases().getClazz(), testmethod, versionsTests);
}
}
}
}
}
}
use of de.dagere.kopeme.generated.TestcaseType.Datacollector.Chunk in project peass by DaGeRe.
the class IsThereTimeReductionVM method checkFolder.
private static void checkFolder(final File contentFolder) throws JAXBException {
for (final File xmlFile : contentFolder.listFiles()) {
if (xmlFile.getName().endsWith(".xml")) {
final XMLDataLoader loader = new XMLDataLoader(xmlFile);
final Set<String> versions = new LinkedHashSet<>();
for (Chunk chunk : loader.getFullData().getTestcases().getTestcase().get(0).getDatacollector().get(0).getChunk()) {
final Map<String, List<Result>> data = new HashMap<>();
String version = chunk.getResult().get(1).getVersion().getGitversion();
String versionOld = chunk.getResult().get(0).getVersion().getGitversion();
for (Result r : chunk.getResult()) {
List<Result> current = data.get(r.getVersion().getGitversion());
if (current == null) {
current = new LinkedList<>();
data.put(r.getVersion().getGitversion(), current);
}
current.add(r);
vms++;
}
testSpeedup(xmlFile, data, versionOld, version);
}
}
}
}
use of de.dagere.kopeme.generated.TestcaseType.Datacollector.Chunk in project peass by DaGeRe.
the class CopyFromFull method checkFileMerging.
public static void checkFileMerging(final File goal, final ExecutionData tests, final File source) throws JAXBException {
Kopemedata kopemeData = XMLDataLoader.loadData(source);
Testcases testcase = kopemeData.getTestcases();
TestcaseType testcaseType = testcase.getTestcase().get(0);
String clazz = testcase.getClazz();
String method = testcaseType.getName();
TestCase testcase2 = new TestCase(testcase);
List<Chunk> chunks = testcaseType.getDatacollector().get(0).getChunk();
if (!goal.exists()) {
goal.mkdirs();
}
for (Chunk chunk : chunks) {
checkChunkMerging(goal, tests, testcase2, chunk);
}
}
use of de.dagere.kopeme.generated.TestcaseType.Datacollector.Chunk in project peass by DaGeRe.
the class TestDependencyTester method checkResult.
public static void checkResult(final PeassFolders folders) throws JAXBException {
final File expectedSummaryResultFile = folders.getSummaryFile(EXAMPLE_TESTCASE);
Assert.assertTrue(expectedSummaryResultFile.exists());
final Kopemedata data = XMLDataLoader.loadData(expectedSummaryResultFile);
final Datacollector collector = data.getTestcases().getTestcase().get(0).getDatacollector().get(0);
final Chunk chunk = collector.getChunk().get(0);
Assert.assertEquals(105, chunk.getResult().get(0).getValue(), 0.1);
Assert.assertEquals(5, chunk.getResult().get(0).getRepetitions());
Assert.assertEquals(11, chunk.getResult().get(0).getIterations());
Assert.assertEquals(10, chunk.getResult().get(0).getWarmup());
}
use of de.dagere.kopeme.generated.TestcaseType.Datacollector.Chunk in project peass by DaGeRe.
the class ResultLoader method loadData.
public void loadData(PeassFolders folders, final TestCase testcase, final long currentChunkStart) throws JAXBException {
final File kopemeFile = folders.getSummaryFile(testcase);
final XMLDataLoader loader = new XMLDataLoader(kopemeFile);
if (loader.getFullData().getTestcases().getTestcase().size() > 0) {
final Datacollector dataCollector = loader.getFullData().getTestcases().getTestcase().get(0).getDatacollector().get(0);
final Chunk realChunk = MultipleVMTestUtil.findChunk(currentChunkStart, dataCollector);
loadChunk(realChunk);
}
}
Aggregations