[Enhancement](profile format) Print fragment and instance in a better format (#11671)

This commit is contained in:
Henry2SS
2022-08-11 14:05:41 +08:00
committed by GitHub
parent 180cc35815
commit 7e828ad85b

View File

@ -35,6 +35,7 @@ public class ProfileTreePrinter {
public static String printFragmentTree(ProfileTreeNode root) {
SimpleTreeNode rootNode = buildNode(root, PrintLevel.FRAGMENT);
StringBuilder sb = new StringBuilder();
sb.append("\n");
new TraditionalTreePrinter().print(new BorderTreeNodeDecorator(rootNode), sb);
return sb.toString();
}
@ -43,6 +44,7 @@ public class ProfileTreePrinter {
public static String printInstanceTree(ProfileTreeNode root) {
SimpleTreeNode rootNode = buildNode(root, PrintLevel.INSTANCE);
StringBuilder sb = new StringBuilder();
sb.append("\n");
new TraditionalTreePrinter().print(new BorderTreeNodeDecorator(rootNode), sb);
return sb.toString();
}