use of de.dagere.kopeme.datastorage.XMLDataLoader 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.datastorage.XMLDataLoader 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.datastorage.XMLDataLoader in project peass by DaGeRe.
the class TestSummaryFileSaving method testSummaryFileSaving.
@Test
public void testSummaryFileSaving() throws JAXBException {
DummyKoPeMeDataCreator.initDummyTestfile(testFolder, TestResult.BOUNDARY_SAVE_FILE / 2, testcase);
final XMLDataLoader loader = new XMLDataLoader(oneResultFile);
loader.readFulldataValues();
Kopemedata oneRunFullData = loader.getFullData();
TestcaseType oneRunData = oneRunFullData.getTestcases().getTestcase().get(0);
final File resultFile = new File(testFolder, "result.xml");
MultipleVMTestUtil.saveSummaryData(resultFile, oneResultFile, oneRunData.getDatacollector().get(0).getResult().get(0), testcase, "1", 0, TimeDataCollector.class.getName());
Assert.assertTrue(resultFile.exists());
}
use of de.dagere.kopeme.datastorage.XMLDataLoader in project peass by DaGeRe.
the class TestMearementFileFinder method testClazzName.
public void testClazzName(String expectedName, MeasurementFileFinder finderOtherPackage) throws JAXBException {
XMLDataLoader loader = new XMLDataLoader(finderOtherPackage.getMeasurementFile());
Assert.assertEquals(loader.getFullData().getTestcases().getClazz(), expectedName);
}
use of de.dagere.kopeme.datastorage.XMLDataLoader in project peass by DaGeRe.
the class MultipleVMTestUtil method getStatistics.
public static DescriptiveStatistics getStatistics(final File resultFile) throws JAXBException {
final XMLDataLoader fullDataLoader = new XMLDataLoader(resultFile);
final Kopemedata fullResultData = fullDataLoader.getFullData();
final Datacollector oneRunDatacollector = getTimeDataCollector(fullResultData);
final DescriptiveStatistics st = new DescriptiveStatistics();
for (final Result r : oneRunDatacollector.getResult()) {
st.addValue(r.getValue());
}
return st;
}
Aggregations