Search in sources :

Example 1 with Datacollector

use of de.dagere.kopeme.generated.TestcaseType.Datacollector in project peass by DaGeRe.

the class TestResultOrganizer method testXMLFileIsCorrect.

private void testXMLFileIsCorrect() throws JAXBException {
    File kopemefile = new File(getVersionMeasurementFolder(), searchedTest.getMethod() + "_0_" + VERSION_NAME + ".xml");
    Kopemedata data = XMLDataLoader.loadData(kopemefile);
    final Datacollector datacollector = data.getTestcases().getTestcase().get(0).getDatacollector().get(0);
    final Fulldata fulldata = datacollector.getResult().get(0).getFulldata();
    Assert.assertNotNull(fulldata.getFileName());
    File fulldataFile = new File(getVersionMeasurementFolder(), fulldata.getFileName());
    Assert.assertTrue(fulldataFile.exists());
}
Also used : Datacollector(de.dagere.kopeme.generated.TestcaseType.Datacollector) Kopemedata(de.dagere.kopeme.generated.Kopemedata) File(java.io.File) Fulldata(de.dagere.kopeme.generated.Result.Fulldata)

Example 2 with Datacollector

use of de.dagere.kopeme.generated.TestcaseType.Datacollector in project peass by DaGeRe.

the class TestResultOrganizerParallel method testXMLFileIsCorrect.

private void testXMLFileIsCorrect() throws JAXBException {
    File kopemefile = new File(getVersionMeasurementFolder(TestResultOrganizer.VERSION_NAME, PARALLEL_VERSION), TestResultOrganizer.searchedTest.getMethod() + "_0_" + PARALLEL_VERSION + ".xml");
    Kopemedata data = XMLDataLoader.loadData(kopemefile);
    final Datacollector datacollector = data.getTestcases().getTestcase().get(0).getDatacollector().get(0);
    final Fulldata fulldata = datacollector.getResult().get(0).getFulldata();
    Assert.assertNotNull(fulldata.getFileName());
    File fulldataFile = new File(getVersionMeasurementFolder(TestResultOrganizer.VERSION_NAME, PARALLEL_VERSION), fulldata.getFileName());
    Assert.assertTrue(fulldataFile.exists());
}
Also used : Datacollector(de.dagere.kopeme.generated.TestcaseType.Datacollector) Kopemedata(de.dagere.kopeme.generated.Kopemedata) File(java.io.File) Fulldata(de.dagere.kopeme.generated.Result.Fulldata)

Example 3 with Datacollector

use of de.dagere.kopeme.generated.TestcaseType.Datacollector 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());
}
Also used : Datacollector(de.dagere.kopeme.generated.TestcaseType.Datacollector) Kopemedata(de.dagere.kopeme.generated.Kopemedata) Chunk(de.dagere.kopeme.generated.TestcaseType.Datacollector.Chunk) File(java.io.File)

Example 4 with Datacollector

use of de.dagere.kopeme.generated.TestcaseType.Datacollector in project peass by DaGeRe.

the class MeasurementFileFinder method getDataCollector.

public static Datacollector getDataCollector(final String method, final List<TestcaseType> testcaseList) {
    Datacollector datacollector = null;
    for (final TestcaseType testcase : testcaseList) {
        if (testcase.getName().equals(method)) {
            datacollector = testcase.getDatacollector().get(0);
        }
    }
    if (datacollector == null) {
        final TestcaseType testcase = new TestcaseType();
        testcaseList.add(testcase);
        testcase.setName(method);
        datacollector = new Datacollector();
        testcase.getDatacollector().add(datacollector);
    }
    return datacollector;
}
Also used : Datacollector(de.dagere.kopeme.generated.TestcaseType.Datacollector) TestcaseType(de.dagere.kopeme.generated.TestcaseType)

Example 5 with Datacollector

use of de.dagere.kopeme.generated.TestcaseType.Datacollector 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;
}
Also used : DescriptiveStatistics(org.apache.commons.math3.stat.descriptive.DescriptiveStatistics) Datacollector(de.dagere.kopeme.generated.TestcaseType.Datacollector) XMLDataLoader(de.dagere.kopeme.datastorage.XMLDataLoader) Kopemedata(de.dagere.kopeme.generated.Kopemedata) Result(de.dagere.kopeme.generated.Result)

Aggregations

Datacollector (de.dagere.kopeme.generated.TestcaseType.Datacollector)15 Kopemedata (de.dagere.kopeme.generated.Kopemedata)10 File (java.io.File)8 Result (de.dagere.kopeme.generated.Result)5 Chunk (de.dagere.kopeme.generated.TestcaseType.Datacollector.Chunk)5 Fulldata (de.dagere.kopeme.generated.Result.Fulldata)3 TestcaseType (de.dagere.kopeme.generated.TestcaseType)3 XMLDataLoader (de.dagere.kopeme.datastorage.XMLDataLoader)2 TestCase (de.dagere.peass.dependency.analysis.data.TestCase)2 JAXBException (javax.xml.bind.JAXBException)2 Testcases (de.dagere.kopeme.generated.Kopemedata.Testcases)1 Versioninfo (de.dagere.kopeme.generated.Versioninfo)1 MeasurementFileFinder (de.dagere.peass.measurement.dataloading.MeasurementFileFinder)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Map (java.util.Map)1 ExecutorService (java.util.concurrent.ExecutorService)1 DescriptiveStatistics (org.apache.commons.math3.stat.descriptive.DescriptiveStatistics)1