use of de.dagere.kopeme.generated.Result in project peass by DaGeRe.
the class ChangeReader method writeRunCommands.
private void writeRunCommands(final String[] versions, final DescribedChunk describedChunk, final TestCase testcase) {
if (runCommandWriter != null) {
final Result exampleResult = describedChunk.getCurrent().get(0);
final int iterations = (int) exampleResult.getIterations();
final int repetitions = (int) exampleResult.getRepetitions();
final int vms = describedChunk.getCurrent().size();
final int versionIndex = Arrays.binarySearch(dependencies.getVersionNames(), versions[1]);
runCommandWriter.createSingleMethodCommand(versionIndex, versions[1], testcase.getExecutable(), (int) exampleResult.getWarmup(), iterations, repetitions, vms);
runCommandWriterSlurm.createSingleMethodCommand(versionIndex, versions[1], testcase.getExecutable(), iterations, repetitions, vms);
}
}
use of de.dagere.kopeme.generated.Result in project peass by DaGeRe.
the class MeanCoVData method printTestcaseData.
public void printTestcaseData(final File folder) throws IOException {
for (final Result result : results) {
final File csvFile = new File(folder, "result_" + testMethodName + "_" + result.getDate() + ".csv");
printResult(result, csvFile);
}
System.out.println();
}
use of de.dagere.kopeme.generated.Result in project peass by DaGeRe.
the class IsThereTimeReductionIterations method getMeasurements.
private List<double[]> getMeasurements(final List<Result> previusValues) {
final List<double[]> beforeMeasurements = new LinkedList<>();
for (final Result result : previusValues) {
final double[] vals = new double[result.getFulldata().getValue().size()];
int index = 0;
for (final Value value : result.getFulldata().getValue()) {
vals[index] = value.getValue();
index++;
}
beforeMeasurements.add(vals);
}
return beforeMeasurements;
}
use of de.dagere.kopeme.generated.Result 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.Result in project peass by DaGeRe.
the class TestResultOrganizerParams method testReading.
@Test
public void testReading() throws JAXBException, IOException {
TestCase testcase = new TestCase("de.dagere.peass.ExampleBenchmarkClazz#calleeMethod");
PeassFolders folders = mockFolders(testcase);
for (int i = 0; i < 3; i++) {
ResultOrganizer organizer = new ResultOrganizer(folders, VERSION, 15 + i, false, false, testcase, 10);
organizer.saveResultFiles(VERSION, i);
organizer.saveResultFiles(VERSION_OLD, i);
}
File expectedResultFile1 = new File(TEMP_FULL_DIR, "calleeMethod(parameter-1).xml");
File expectedResultFile2 = new File(TEMP_FULL_DIR, "calleeMethod(parameter-2).xml");
Assert.assertTrue(expectedResultFile1.exists());
Assert.assertTrue(expectedResultFile2.exists());
Kopemedata data = XMLDataLoader.loadData(expectedResultFile1);
List<Result> results = data.getTestcases().getTestcase().get(0).getDatacollector().get(0).getChunk().get(0).getResult();
MatcherAssert.assertThat(results, IsIterableWithSize.iterableWithSize(2));
File expectedFulldataFile = new File(TEMP_FULL_DIR, "calleeMethod(parameter-2)_0_d77cb2ff2a446c65f0a63fd0359f9ba4dbfdb9d9.xml");
Kopemedata fulldata = XMLDataLoader.loadData(expectedFulldataFile);
Assert.assertEquals(1, fulldata.getTestcases().getTestcase().get(0).getDatacollector().get(0).getResult().size());
File expectedFulldataFile1 = new File(TEMP_FULL_DIR, "calleeMethod(parameter-1)_2_d77cb2ff2a446c65f0a63fd0359f9ba4dbfdb9d9.xml");
Kopemedata fulldata1 = XMLDataLoader.loadData(expectedFulldataFile1);
Assert.assertEquals(1, fulldata1.getTestcases().getTestcase().get(0).getDatacollector().get(0).getResult().size());
}
Aggregations