Search in sources :

Example 1 with CauseSearchData

use of de.dagere.peass.measurement.rca.data.CauseSearchData in project peass by DaGeRe.

the class GetGraphs method main.

public static void main(final String[] args) throws JsonParseException, JsonMappingException, IOException {
    File file = new File(args[0]);
    CauseSearchData data = Constants.OBJECTMAPPER.readValue(file, CauseSearchData.class);
    MeasuredValues values = data.getNodes().getValues();
    printValues(data, values);
}
Also used : MeasuredValues(de.dagere.peass.measurement.rca.serialization.MeasuredValues) CauseSearchData(de.dagere.peass.measurement.rca.data.CauseSearchData) File(java.io.File)

Example 2 with CauseSearchData

use of de.dagere.peass.measurement.rca.data.CauseSearchData in project peass by DaGeRe.

the class TestVersionPair method getChangedNodes.

public List<MeasuredNode> getChangedNodes() {
    final MeasuredNode[] nodes = new MeasuredNode[datas.size()];
    int i = 0;
    for (final CauseSearchData data : datas) {
        nodes[i++] = data.getNodes();
    }
    final List<MeasuredNode> changed = getChangedNodes(nodes);
    return changed;
}
Also used : MeasuredNode(de.dagere.peass.measurement.rca.serialization.MeasuredNode) CauseSearchData(de.dagere.peass.measurement.rca.data.CauseSearchData)

Example 3 with CauseSearchData

use of de.dagere.peass.measurement.rca.data.CauseSearchData in project peass by DaGeRe.

the class TreeAnalysis method getAllTreeData.

private static void getAllTreeData(final File treesFolder, final TestVersionPairManager manager) throws IOException, JsonParseException, JsonMappingException {
    for (final File resultFolder : treesFolder.listFiles()) {
        File treeFolder = new File(resultFolder, "peass" + File.separator + "rca" + File.separator + "tree");
        final File treeFolder2 = new File(resultFolder, File.separator + "rca" + File.separator + "tree");
        if (treeFolder2.isDirectory()) {
            treeFolder = treeFolder2;
        }
        if (treeFolder.isDirectory()) {
            final File versionFolder = treeFolder.listFiles()[0];
            if (versionFolder.getName().startsWith("4ed")) {
                final File testcaseFolder = versionFolder.listFiles()[0];
                for (final File treeJson : testcaseFolder.listFiles((FileFilter) new WildcardFileFilter("*.json"))) {
                    if (treeJson.getName().contains("testFoldedHeaders")) {
                        System.out.println("Folder: " + treeJson.getAbsolutePath());
                        final CauseSearchData data = Constants.OBJECTMAPPER.readValue(treeJson, CauseSearchData.class);
                        manager.addData(data);
                    }
                }
            }
        } else {
            System.out.println("Not analyzable: " + treeFolder.getAbsolutePath());
        }
    }
}
Also used : CauseSearchData(de.dagere.peass.measurement.rca.data.CauseSearchData) File(java.io.File) WildcardFileFilter(org.apache.commons.io.filefilter.WildcardFileFilter)

Example 4 with CauseSearchData

use of de.dagere.peass.measurement.rca.data.CauseSearchData in project peass by DaGeRe.

the class VisualizeRegularMeasurement method createEmptyData.

private CauseSearchData createEmptyData(final List<String> versions, final TestCase testcase) {
    CauseSearchData data2 = new CauseSearchData();
    data2.setCauseConfig(new CauseSearcherConfig(testcase, false, 1.0, false, false, null, 1));
    data2.setConfig(new MeasurementConfig(2, versions.get(0), versions.get(1)));
    return data2;
}
Also used : MeasurementConfig(de.dagere.peass.config.MeasurementConfig) CauseSearchData(de.dagere.peass.measurement.rca.data.CauseSearchData) CauseSearcherConfig(de.dagere.peass.measurement.rca.CauseSearcherConfig)

Example 5 with CauseSearchData

use of de.dagere.peass.measurement.rca.data.CauseSearchData in project peass by DaGeRe.

the class VisualizeRegularMeasurement method visualizeNode.

private void visualizeNode(final List<String> versions, final TestCase testcase, final GraphNode node) throws IOException, JsonProcessingException, FileNotFoundException, JAXBException {
    File destFolder = new File(resultFolder, versions.get(0));
    GraphNode emptyNode = new GraphNode(testcase.getExecutable(), "void " + testcase.getExecutable().replace("#", ".") + "()", CauseSearchData.ADDED);
    emptyNode.setName(testcase.getExecutable());
    CauseSearchData data2 = createEmptyData(versions, testcase);
    HTMLWriter htmlWriter = new HTMLWriter(emptyNode, data2, destFolder, null, node);
    htmlWriter.writeHTML();
}
Also used : HTMLWriter(de.dagere.peass.visualization.html.HTMLWriter) CauseSearchData(de.dagere.peass.measurement.rca.data.CauseSearchData) File(java.io.File)

Aggregations

CauseSearchData (de.dagere.peass.measurement.rca.data.CauseSearchData)21 File (java.io.File)13 CallTreeNode (de.dagere.peass.measurement.rca.data.CallTreeNode)6 MeasuredNode (de.dagere.peass.measurement.rca.serialization.MeasuredNode)6 LinkedList (java.util.LinkedList)6 MeasurementConfig (de.dagere.peass.config.MeasurementConfig)5 LevelManager (de.dagere.peass.measurement.rca.LevelManager)5 BothTreeReader (de.dagere.peass.measurement.rca.kieker.BothTreeReader)5 Test (org.junit.Test)5 TestCase (de.dagere.peass.dependency.analysis.data.TestCase)4 CauseSearchFolders (de.dagere.peass.folders.CauseSearchFolders)3 CauseSearcherConfig (de.dagere.peass.measurement.rca.CauseSearcherConfig)3 HTMLWriter (de.dagere.peass.visualization.html.HTMLWriter)3 Test (org.junit.jupiter.api.Test)3 CauseSearcherConfigMixin (de.dagere.peass.measurement.rca.CauseSearcherConfigMixin)2 Change (de.dagere.peass.analysis.changes.Change)1 RCALevel (de.dagere.peass.ci.logs.rca.RCALevel)1 EnvironmentVariables (de.dagere.peass.execution.utils.EnvironmentVariables)1 CausePersistenceManager (de.dagere.peass.measurement.rca.CausePersistenceManager)1 CauseTester (de.dagere.peass.measurement.rca.CauseTester)1