You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/09/12 23:13:20 UTC

[GitHub] [lucene] markrmiller commented on a change in pull request #295: LUCENE-10099: Add -Ptests.asyncprofile option.

markrmiller commented on a change in pull request #295:
URL: https://github.com/apache/lucene/pull/295#discussion_r706926916



##########
File path: buildSrc/src/main/java/org/apache/lucene/gradle/ProfileResults.java
##########
@@ -156,42 +156,42 @@ public static void printReport(List<String> files, String mode, int stacksize, i
     if (!"cpu".equals(mode) && !"heap".equals(mode)) {
       throw new IllegalArgumentException("tests.profile.mode must be one of (cpu,heap)");
     }
-    if (stacksize < 1) {
-      throw new IllegalArgumentException("tests.profile.stacksize must be positive");
-    }
-    if (count < 1) {
-      throw new IllegalArgumentException("tests.profile.count must be positive");
-    }
-    Map<String, SimpleEntry<String, Long>> histogram = new HashMap<>();
-    int totalEvents = 0;
-    long sumValues = 0;
-    String framePadding = " ".repeat(COLUMN_SIZE * 2);
-    for (String file : files) {
-      try (RecordingFile recording = new RecordingFile(Paths.get(file))) {
-        while (recording.hasMoreEvents()) {
-          RecordedEvent event = recording.readEvent();
-          if (!isInteresting(mode, event)) {
-            continue;
-          }
-          RecordedStackTrace trace = event.getStackTrace();
-          if (trace != null) {
-            StringBuilder stack = new StringBuilder();
-            for (int i = 0; i < Math.min(stacksize, trace.getFrames().size()); i++) {
-              if (stack.length() > 0) {
-                stack.append("\n")
-                     .append(framePadding)
-                     .append("  at ");
-              }
+      if (stacksize < 1) {

Review comment:
       whoops, some auto-formatting seems to have kicked in.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org