Search in sources :

Example 11 with TestcaseStatistic

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);
}
Also used : TestcaseStatistic(de.dagere.peass.measurement.statistics.data.TestcaseStatistic) TestCase(de.dagere.peass.dependency.analysis.data.TestCase) ProjectStatistics(de.dagere.peass.analysis.measurement.ProjectStatistics) Map(java.util.Map)

Example 12 with TestcaseStatistic

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;
}
Also used : ProjectChanges(de.dagere.peass.analysis.changes.ProjectChanges) Changes(de.dagere.peass.analysis.changes.Changes) TestcaseStatistic(de.dagere.peass.measurement.statistics.data.TestcaseStatistic) MeasureVersionAction(de.dagere.peass.ci.MeasureVersionAction) ProjectChanges(de.dagere.peass.analysis.changes.ProjectChanges) ProjectStatistics(de.dagere.peass.analysis.measurement.ProjectStatistics) HistogramReader(de.dagere.peass.ci.helper.HistogramReader) File(java.io.File) HistogramValues(de.dagere.peass.ci.helper.HistogramValues)

Example 13 with TestcaseStatistic

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;
}
Also used : TestcaseStatistic(de.dagere.peass.measurement.statistics.data.TestcaseStatistic) DefaultMeasurementVisualizer(de.dagere.peass.ci.helper.DefaultMeasurementVisualizer)

Example 14 with TestcaseStatistic

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));
}
Also used : TestcaseStatistic(de.dagere.peass.measurement.statistics.data.TestcaseStatistic) TestCase(de.dagere.peass.dependency.analysis.data.TestCase) Map(java.util.Map)

Example 15 with TestcaseStatistic

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;
}
Also used : TestcaseStatistic(de.dagere.peass.measurement.statistics.data.TestcaseStatistic) BuildMeasurementValues(de.dagere.peass.ci.persistence.BuildMeasurementValues) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map) LinkedHashMap(java.util.LinkedHashMap) TestMeasurementValues(de.dagere.peass.ci.persistence.TestMeasurementValues)

Aggregations

TestcaseStatistic (de.dagere.peass.measurement.statistics.data.TestcaseStatistic)28 TestCase (de.dagere.peass.dependency.analysis.data.TestCase)7 ProjectStatistics (de.dagere.peass.analysis.measurement.ProjectStatistics)5 File (java.io.File)5 Map (java.util.Map)5 SummaryStatistics (org.apache.commons.math3.stat.descriptive.SummaryStatistics)5 Test (org.junit.Test)5 TTest (org.apache.commons.math3.stat.inference.TTest)4 Test (org.junit.jupiter.api.Test)4 BuildMeasurementValues (de.dagere.peass.ci.persistence.BuildMeasurementValues)3 TestMeasurementValues (de.dagere.peass.ci.persistence.TestMeasurementValues)3 MeasurementConfig (de.dagere.peass.config.MeasurementConfig)3 MeasuredNode (de.dagere.peass.measurement.rca.serialization.MeasuredNode)3 LinkedHashMap (java.util.LinkedHashMap)3 JsonIgnore (com.fasterxml.jackson.annotation.JsonIgnore)2 DefaultMeasurementVisualizer (de.dagere.peass.ci.helper.DefaultMeasurementVisualizer)2 TreeBuilder (de.dagere.peass.measurement.rca.helper.TreeBuilder)2 GraphNode (de.dagere.peass.visualization.GraphNode)2 NodePreparator (de.dagere.peass.visualization.NodePreparator)2 SimpleModule (com.fasterxml.jackson.databind.module.SimpleModule)1