You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2021/02/23 11:54:59 UTC

[lucene-solr] branch master updated: Fix tests.profile output to not run many many times (#2417)

This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new 7d3f3d6  Fix tests.profile output to not run many many times (#2417)
7d3f3d6 is described below

commit 7d3f3d61ce7da3f8e6799421ae34388782c00bae
Author: Robert Muir <rm...@apache.org>
AuthorDate: Tue Feb 23 06:54:39 2021 -0500

    Fix tests.profile output to not run many many times (#2417)
    
    The profiler should only be invoked once at the end of the build. During
    refactoring the buildFinished() hook became nested underneath stuff such
    as allProjects which causes it to run too many times.
---
 gradle/testing/profiling.gradle | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/gradle/testing/profiling.gradle b/gradle/testing/profiling.gradle
index 6655df7..34b3efe 100644
--- a/gradle/testing/profiling.gradle
+++ b/gradle/testing/profiling.gradle
@@ -42,16 +42,16 @@ allprojects {
           }
         }
       }
-
-      gradle.buildFinished {
-        if (!recordings.isEmpty()) {
-          ProfileResults.printReport(recordings.getFiles().collect { it.toString() },
-              propertyOrDefault(ProfileResults.MODE_KEY, ProfileResults.MODE_DEFAULT) as String,
-              Integer.parseInt(propertyOrDefault(ProfileResults.STACKSIZE_KEY, ProfileResults.STACKSIZE_DEFAULT)),
-              Integer.parseInt(propertyOrDefault(ProfileResults.COUNT_KEY, ProfileResults.COUNT_DEFAULT)),
-              Boolean.parseBoolean(propertyOrDefault(ProfileResults.LINENUMBERS_KEY, ProfileResults.LINENUMBERS_DEFAULT)))
-        }
-      }
     }
   }
-}
\ No newline at end of file
+}
+
+gradle.buildFinished {
+  if (!recordings.isEmpty()) {
+    ProfileResults.printReport(recordings.getFiles().collect { it.toString() },
+        propertyOrDefault(ProfileResults.MODE_KEY, ProfileResults.MODE_DEFAULT) as String,
+        Integer.parseInt(propertyOrDefault(ProfileResults.STACKSIZE_KEY, ProfileResults.STACKSIZE_DEFAULT)),
+        Integer.parseInt(propertyOrDefault(ProfileResults.COUNT_KEY, ProfileResults.COUNT_DEFAULT)),
+        Boolean.parseBoolean(propertyOrDefault(ProfileResults.LINENUMBERS_KEY, ProfileResults.LINENUMBERS_DEFAULT)))
+  }
+}