iprithv commented on code in PR #15983:
URL: https://github.com/apache/lucene/pull/15983#discussion_r3150287896
##########
build-tools/build-infra/src/main/java/org/apache/lucene/gradle/plugins/java/ProfileResults.java:
##########
@@ -173,6 +199,11 @@ public static void printReport(
if (count < 1) {
throw new IllegalArgumentException("tests.profile.count must be
positive");
}
+
+ // Pre-scan to detect if CPU-time samples (Java 25+, JEP 509) are
available.
+ // If so, prefer them over legacy execution samples to avoid
double-counting.
+ boolean hasCPUTimeSamples = "cpu".equals(mode) &&
detectCPUTimeSamples(files);
Review Comment:
Sure, updated so now throws IllegalStateException if both CPU-time and
legacy execution samples appear anywhere. ShowJfrProfileSummaryTask catches
that and rethrows as GradleException so the failure message is obvious from
Gradle.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]