Skip to content

Commit

Permalink
Update SJSW version
Browse files Browse the repository at this point in the history
  • Loading branch information
terahidro2003 committed Feb 5, 2025
1 parent 2379943 commit 2fba6d7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion measurement/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<dependency>
<groupId>io.github.terahidro2003</groupId>
<artifactId>sjsw</artifactId>
<version>0.1.3-SNAPSHOT</version>
<version>0.1.4-SNAPSHOT</version>
</dependency>

<!-- For execution, it is assumed that the kieker aspectJ-jar is in the local .m2 directory; no need for inclusion in jar, therefore scope runtime -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import de.dagere.peass.measurement.rca.treeanalysis.AllDifferingDeterminer;
import de.dagere.peass.measurement.utils.sjsw.SjswCctConverter;
import de.dagere.peass.vcs.GitUtils;
import io.github.terahidro2003.result.tree.StackTraceTreeBuilder;
import io.github.terahidro2003.result.tree.StackTraceTreeNode;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down Expand Up @@ -151,9 +152,13 @@ public static void printCallTreeNode(CallTreeNode root) {
}

public static void printCallTreeNodeTreeRecursive(CallTreeNode node, String prefix, boolean isLast) {
if (node.getMethod() != null) {
System.out.println(prefix + (isLast ? "└────── " : "├────── ") + node.getMethod() +
" Keys: [" + node.getKeys());
List<String> measurements = new LinkedList<>();
node.getData().forEach((commit, value) -> {
measurements.add(commit + "---" + value.getResults().size());
});
if (node.getCall() != null) {
System.out.println(prefix + (isLast ? "└────── " : "├────── ") + node.getCall() +
" Measurements: " + measurements);
}

List<CallTreeNode> children = node.getChildren();
Expand Down Expand Up @@ -243,11 +248,15 @@ private List<CallTreeNode> getAnalysableNodes(final List<CallTreeNode> predecess

private StackTraceTreeNode retrieveBatForCommit(String commit, SamplerResultsProcessor processor, Path resultsPath) {
List<File> commitJfrs = processor.listJfrMeasurementFiles(resultsPath, List.of(commit));
StackTraceTreeNode tree = processor.getTreeFromJfr(commitJfrs, commit);
String normalizedMethodName = testcase.getMethod().substring(testcase.getMethod().lastIndexOf('#') + 1);
StackTraceTreeNode filteredTestcaseTree = processor.filterTestcaseSubtree(normalizedMethodName, tree);
filteredTestcaseTree.printTree();
return filteredTestcaseTree;
String normalizedMethodName = testcase.getMethodWithParams().substring(testcase.getMethod().lastIndexOf('#') + 1);

StackTraceTreeBuilder builder = new StackTraceTreeBuilder();
StackTraceTreeNode mergedTree = builder.buildTree(commitJfrs, commit, configuration.getVms(), normalizedMethodName, true);

System.out.println();
mergedTree.printTree();
System.out.println();
return mergedTree;
}

private File retrieveSamplingResultsDirectory(MeasurementIdentifier identifier) {
Expand Down

0 comments on commit 2fba6d7

Please sign in to comment.