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

aldettinger pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new 10e54c9cb0 perf-regression: add --use-mandrel-native-builder option 
#4436
10e54c9cb0 is described below

commit 10e54c9cb072f216a3ffa07c2b6282713daa149e
Author: aldettinger <aldettin...@gmail.com>
AuthorDate: Thu Jan 26 21:03:55 2023 +0100

    perf-regression: add --use-mandrel-native-builder option #4436
---
 .../performance/regression/PerfRegressionCommand.java   | 17 +++++++++++++----
 .../performance/regression/it/PerfRegressionIT.java     |  1 +
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git 
a/tooling/perf-regression/src/main/java/org/apache/camel/quarkus/performance/regression/PerfRegressionCommand.java
 
b/tooling/perf-regression/src/main/java/org/apache/camel/quarkus/performance/regression/PerfRegressionCommand.java
index 983ef77185..d8674e6752 100644
--- 
a/tooling/perf-regression/src/main/java/org/apache/camel/quarkus/performance/regression/PerfRegressionCommand.java
+++ 
b/tooling/perf-regression/src/main/java/org/apache/camel/quarkus/performance/regression/PerfRegressionCommand.java
@@ -61,6 +61,10 @@ public class PerfRegressionCommand implements Runnable {
             "--also-run-native-mode" }, description = "Tells whether the 
throughput test should also be run in native mode. By default, run in JVM mode 
only.")
     private boolean alsoRunNativeMode;
 
+    @Option(names = { "-umnb",
+            "--use-mandrel-native-builder" }, description = "Tells whether 
mandrel should be used to build native images. Can be used with camel-quarkus 
>= 2.8.0 only.")
+    private boolean useMandrelNativeBuilder;
+
     @Override
     public void run() {
         PerformanceRegressionReport report = new 
PerformanceRegressionReport(singleScenarioDuration);
@@ -100,8 +104,9 @@ public class PerfRegressionCommand implements Runnable {
         FileEditionHelper.instantiatePomFile(cqVersionUnderTestFolder, 
cqVersion, cqStagingRepository, camelStagingRepository);
 
         // Locally sets the right maven version in the maven wrapper
-        // camel-quarkus >= 2.6.0.CR1 => maven 3.8.4
-        // camel-quarkus >= 2.1.0     => maven 3.8.1
+        // camel-quarkus >= 2.11.0.CR1 => maven 3.8.6
+        // camel-quarkus >= 2.6.0.CR1  => maven 3.8.4
+        // camel-quarkus >= 2.1.0      => maven 3.8.1
         String targetMavenVersion = 
getTargetMavenVersion(cqVersionUnderTestFolder);
         setMvnwMavenVersion(cqVersionUnderTestFolder, targetMavenVersion);
 
@@ -111,8 +116,12 @@ public class PerfRegressionCommand implements Runnable {
 
         // Run performance regression test in native mode
         if (alsoRunNativeMode) {
-            double nativeThroughput = 
runPerfRegression(cqVersionUnderTestFolder,
-                    "integration-test -Dnative 
-Dquarkus.native.container-build=true");
+            String nativeCommandArgs = "integration-test -Dnative 
-Dquarkus.native.container-build=true";
+            if (useMandrelNativeBuilder) {
+                nativeCommandArgs += " -Dquarkus.native.builder-image=mandrel";
+            }
+            double nativeThroughput = 
runPerfRegression(cqVersionUnderTestFolder, nativeCommandArgs);
+
             report.setCategoryMeasureForVersion(cqVersion, "Native", 
nativeThroughput);
         }
     }
diff --git 
a/tooling/perf-regression/src/test/java/org/apache/camel/quarkus/performance/regression/it/PerfRegressionIT.java
 
b/tooling/perf-regression/src/test/java/org/apache/camel/quarkus/performance/regression/it/PerfRegressionIT.java
index a436c885ab..4e6ef84f5f 100644
--- 
a/tooling/perf-regression/src/test/java/org/apache/camel/quarkus/performance/regression/it/PerfRegressionIT.java
+++ 
b/tooling/perf-regression/src/test/java/org/apache/camel/quarkus/performance/regression/it/PerfRegressionIT.java
@@ -55,6 +55,7 @@ public class PerfRegressionIT {
             assertThat(processOutput, containsString("-cqs, 
--camel-quarkus-staging-repository=<cqStagingRepository>"));
             assertThat(processOutput, containsString("-cs, 
--camel-staging-repository=<camelStagingRepository>"));
             assertThat(processOutput, containsString("-d, 
--duration=<singleScenarioDuration>"));
+            assertThat(processOutput, containsString("-umnb, 
--use-mandrel-native-builder"));
         } catch (InvalidExitValueException ievex) {
             fail("The perf-regression process has finished with an unexpected 
exit value", ievex);
         }

Reply via email to