use of de.dagere.kopeme.generated.Result in project peass by DaGeRe.
the class DependencyTester method updateExecutions.
boolean updateExecutions(final TestCase testcase, final int vmid) throws JAXBException {
boolean shouldBreak = false;
final Result versionOldResult = getLastResult(configuration.getExecutionConfig().getVersionOld(), testcase, vmid);
final Result versionNewResult = getLastResult(configuration.getExecutionConfig().getVersion(), testcase, vmid);
if (vmid < 40) {
int reducedIterations = Math.min(shouldReduce(configuration.getExecutionConfig().getVersionOld(), versionOldResult), shouldReduce(configuration.getExecutionConfig().getVersion(), versionNewResult));
if (reducedIterations != configuration.getIterations()) {
LOG.error("Should originally run {} iterations, but did not succeed - reducing to {}", configuration.getIterations(), reducedIterations);
// final int lessIterations = testTransformer.getConfig().getIterations() / 5;
shouldBreak = reduceExecutions(shouldBreak, reducedIterations);
}
}
return shouldBreak;
}
use of de.dagere.kopeme.generated.Result in project peass by DaGeRe.
the class MeasurementAnalysationUtil method getAveragesArrayFromResults.
public static double[] getAveragesArrayFromResults(final List<Result> results) {
final double[] values = new double[results.size()];
int i = 0;
for (final Result result : results) {
final double value = result.getValue();
values[i++] = value;
}
return values;
}
use of de.dagere.kopeme.generated.Result in project peass by DaGeRe.
the class MeasurementAnalysationUtil method analyzeKopemeData.
public static List<PerformanceChange> analyzeKopemeData(final Kopemedata data) {
final Map<String, List<Result>> results = new LinkedHashMap<>();
int maxResultSize = 0;
final TestcaseType currentTestcase = data.getTestcases().getTestcase().get(0);
final String clazz = data.getTestcases().getClazz();
final String method = currentTestcase.getName();
final List<Datacollector> datacollectors = currentTestcase.getDatacollector();
if (datacollectors.size() != 1) {
LOG.warn("Mehr als ein DataCollector bei: {}", method);
}
for (final Result result : datacollectors.get(0).getResult()) {
final String gitversion = result.getVersion().getGitversion();
if (!results.containsKey(gitversion)) {
results.put(gitversion, new LinkedList<>());
}
results.get(gitversion).add(result);
if (results.get(gitversion).size() > maxResultSize) {
maxResultSize = results.get(gitversion).size();
}
}
ConfidenceInterval previous = null;
String previousVersion = null;
final List<PerformanceChange> changes = new LinkedList<>();
final ExecutorService service = Executors.newFixedThreadPool(4);
for (final Map.Entry<String, List<Result>> entry : results.entrySet()) {
final double[] values = getAveragesArrayFromResults(entry.getValue());
final ConfidenceInterval interval = getBootstrapConfidenceInterval(values, 20, 1000, 96);
LOG.trace("{}-Konfidenzintervall: {} - {}", interval.getPercentage(), interval.getMin(), interval.getMax());
if (previous != null) {
final ConfidenceInterval previousConfidenceInterval = previous;
final String previousVersion2 = previousVersion;
LOG.trace("Start " + previousVersion2);
service.execute(new Runnable() {
@Override
public void run() {
final String currentVersion = entry.getValue().get(0).getVersion().getGitversion();
final PerformanceChange change = new PerformanceChange(previousConfidenceInterval, interval, clazz, method, previousVersion2, currentVersion);
final boolean isChange = analysePotentialChange(change, previousConfidenceInterval, entry, interval);
if (isChange) {
changes.add(change);
}
}
});
}
previous = interval;
previousVersion = entry.getKey();
}
try {
service.shutdown();
service.awaitTermination(1, TimeUnit.DAYS);
} catch (final InterruptedException e) {
e.printStackTrace();
}
return changes;
}
use of de.dagere.kopeme.generated.Result in project peass by DaGeRe.
the class DummyKoPeMeDataCreator method initDummyTestfile.
public static void initDummyTestfile(final File methodFolder, final int iterations, final TestCase testcase) throws JAXBException {
XMLDataStorer storer = new XMLDataStorer(methodFolder, testcase.getClazz(), testcase.getMethod());
final Result result = new Result();
result.setValue(15);
result.setIterations(iterations);
initDummyFulldata(result, iterations);
storer.storeValue(result, testcase.getExecutable(), TimeDataCollector.class.getName());
}
use of de.dagere.kopeme.generated.Result in project peass by DaGeRe.
the class OutlierRemover method removeByValue.
private void removeByValue(DescriptiveStatistics statistics, List<Result> results, double value) {
for (Iterator<Result> it = results.iterator(); it.hasNext(); ) {
Result result = it.next();
if (result.getValue() == value) {
LOG.debug("Removing Value: {}", result.getValue());
it.remove();
break;
}
}
rebuildStatistics(statistics, results);
}
Aggregations