use of de.dagere.peass.measurement.statistics.data.TestcaseStatistic in project peass-ci-plugin by jenkinsci.
the class TrendFileUtil method addFakePredecessorStatistics.
private static void addFakePredecessorStatistics(final Run<?, ?> run, final ProjectStatistics statistics, final BuildMeasurementValues values) {
final ProjectStatistics fakePredecessorStatistics = new ProjectStatistics();
final Entry<String, Map<TestCase, TestcaseStatistic>> currentEntry = statistics.getStatistics().entrySet().iterator().next();
final String version = currentEntry.getKey();
for (Entry<TestCase, TestcaseStatistic> entry : currentEntry.getValue().entrySet()) {
TestcaseStatistic predecessor = new TestcaseStatistic();
predecessor.setCalls(entry.getValue().getCallsOld());
predecessor.setMeanCurrent(entry.getValue().getMeanOld());
predecessor.setDeviationCurrent(entry.getValue().getDeviationOld());
predecessor.setVMs(entry.getValue().getVMs());
fakePredecessorStatistics.addMeasurement(version + "~1", entry.getKey(), predecessor);
}
values.addMeasurement(fakePredecessorStatistics, run.getNumber() - 1);
}
use of de.dagere.peass.measurement.statistics.data.TestcaseStatistic in project peass-ci-plugin by jenkinsci.
the class LocalPeassProcessManager method visualizeMeasurementResults.
public ProjectChanges visualizeMeasurementResults(final Run<?, ?> run) throws JAXBException, IOException, JsonParseException, JsonMappingException, JsonGenerationException {
File dataFolder = results.getVersionFullResultsFolder(peassConfig.getMeasurementConfig());
final HistogramReader histogramReader = new HistogramReader(peassConfig.getMeasurementConfig(), dataFolder);
final Map<String, HistogramValues> measurements = histogramReader.readMeasurements();
final ProjectChanges changes = getChanges();
final ProjectStatistics statistics = readStatistics();
TrendFileUtil.persistTrend(run, localWorkspace, statistics);
Map<String, TestcaseStatistic> noWarmupStatistics = createPureMeasurementVisualization(run, dataFolder, measurements);
Changes versionChanges = changes.getVersion(peassConfig.getMeasurementConfig().getExecutionConfig().getVersion());
final MeasureVersionAction action = new MeasureVersionAction(peassConfig.getMeasurementConfig(), versionChanges, statistics, noWarmupStatistics, measurements, histogramReader.getUpdatedConfigurations());
run.addAction(action);
return changes;
}
use of de.dagere.peass.measurement.statistics.data.TestcaseStatistic in project peass-ci-plugin by jenkinsci.
the class LocalPeassProcessManager method createPureMeasurementVisualization.
private Map<String, TestcaseStatistic> createPureMeasurementVisualization(final Run<?, ?> run, final File dataFolder, final Map<String, HistogramValues> measurements) {
DefaultMeasurementVisualizer visualizer = new DefaultMeasurementVisualizer(dataFolder, peassConfig.getMeasurementConfig().getExecutionConfig().getVersion(), run, visualizationFolders, measurements.keySet());
visualizer.visualizeMeasurements();
Map<String, TestcaseStatistic> noWarmupStatistics = visualizer.getNoWarmupStatistics();
return noWarmupStatistics;
}
use of de.dagere.peass.measurement.statistics.data.TestcaseStatistic in project peass-ci-plugin by jenkinsci.
the class MeasureVersionAction method getTestcaseStatistic.
public TestcaseStatistic getTestcaseStatistic(final String testcase) {
Entry<String, Map<TestCase, TestcaseStatistic>> testcaseStatisticEntry = statistics.getStatistics().entrySet().iterator().next();
Map<TestCase, TestcaseStatistic> testcaseStatistic = testcaseStatisticEntry.getValue();
return testcaseStatistic.get(new TestCase(testcase));
}
use of de.dagere.peass.measurement.statistics.data.TestcaseStatistic in project peass-ci-plugin by jenkinsci.
the class TrendAction method getLowerBound.
public LinkedHashMap<Integer, Double> getLowerBound(final String testcase) throws JsonParseException, JsonMappingException, InterruptedException, IOException {
final LinkedHashMap<Integer, Double> deviationMap = new LinkedHashMap<>();
BuildMeasurementValues values = readValues();
TestMeasurementValues testMeasurementValues = values.getValues().get(testcase);
for (Map.Entry<Integer, TestcaseStatistic> vals : testMeasurementValues.getStatistics().entrySet()) {
deviationMap.put(vals.getKey(), vals.getValue().getMeanCurrent() - vals.getValue().getDeviationCurrent());
}
return deviationMap;
}
Aggregations