You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by kb...@apache.org on 2023/11/13 08:32:58 UTC
(incubator-kie-kogito-benchmarks) 31/38: BAQE-2214 - Prepare kogito benchmarks for running with Quarkus Platform
This is an automated email from the ASF dual-hosted git repository.
kbowers pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-benchmarks.git
commit 9dde0e7821fa47ceb2fc8345f7d600dc4a6ca161
Author: Marián Macik <mm...@redhat.com>
AuthorDate: Thu Jan 6 17:30:18 2022 +0100
BAQE-2214 - Prepare kogito benchmarks for running with Quarkus Platform
---
.../kie/kogito/benchmarks/framework/Commands.java | 36 +++++++++++++++++-----
.../smarthouse-02-springboot/threshold.properties | 2 +-
.../smarthouse-03-springboot/threshold.properties | 2 +-
.../threshold.properties | 2 +-
kogito-benchmarks-tests/pom.xml | 4 +++
5 files changed, 35 insertions(+), 11 deletions(-)
diff --git a/kogito-benchmarks-framework/src/main/java/org/kie/kogito/benchmarks/framework/Commands.java b/kogito-benchmarks-framework/src/main/java/org/kie/kogito/benchmarks/framework/Commands.java
index a9c3cd1..41e6e6d 100644
--- a/kogito-benchmarks-framework/src/main/java/org/kie/kogito/benchmarks/framework/Commands.java
+++ b/kogito-benchmarks-framework/src/main/java/org/kie/kogito/benchmarks/framework/Commands.java
@@ -57,6 +57,8 @@ public class Commands {
public static final String BASE_DIR = getBaseDir();
public static final String APPS_DIR = getAppsDir();
public static final String ARCHIVED_LOGS_DIR = getArchivedLogsDir();
+ public static final boolean USE_CUSTOM_MAVEN_REPO = getUseCustomMavenRepo();
+ public static final boolean USE_MAIN_BUILD_SETTINGS = getUseMainBuildSettings();
public static final String MVNW = Commands.isThisWindows ? "mvnw.cmd" : "./mvnw";
public static final boolean isThisWindows = System.getProperty("os.name").matches(".*[Ww]indows.*");
private static final Pattern numPattern = Pattern.compile("[ \t]*[0-9]+[ \t]*");
@@ -150,18 +152,32 @@ public class Commands {
return getSystemPropertyOrEnvVarValue("archivedLogsDir");
}
- private static String getSystemPropertyOrEnvVarValue(String name) {
+ public static boolean getUseCustomMavenRepo() {
+ String value = getSystemPropertyOrEnvVarValueSilent("useCustomMavenRepo");
+ return !"false".equalsIgnoreCase(value);
+ }
+
+ public static boolean getUseMainBuildSettings() {
+ String value = getSystemPropertyOrEnvVarValueSilent("useMainBuildSettings");
+ return !"false".equalsIgnoreCase(value);
+ }
+
+ private static String getSystemPropertyOrEnvVarValueSilent(String name) {
String systemPropertyValue = System.getProperty(name);
if (StringUtils.isNotBlank(systemPropertyValue)) {
return systemPropertyValue;
}
- String envPropertyValue = System.getenv(name);
+ return System.getenv(name);
+ }
- if (StringUtils.isBlank(envPropertyValue)) {
+ private static String getSystemPropertyOrEnvVarValue(String name) {
+ String value = getSystemPropertyOrEnvVarValueSilent(name);
+ if (StringUtils.isBlank(value)) {
throw new IllegalArgumentException("Unable to determine the value of the property " + name);
}
- return envPropertyValue;
+
+ return value;
}
public static void cleanTarget(App app) {
@@ -270,10 +286,14 @@ public class Commands {
buildCmd.add("/C");
}
buildCmd.addAll(Arrays.asList(baseCommand));
- buildCmd.add("-Dmaven.repo.local=" + getLocalMavenRepoDir());
- // use the same settings.xml as the main build
- buildCmd.add("-s");
- buildCmd.add(System.getProperty("maven.settings"));
+
+ if (USE_CUSTOM_MAVEN_REPO) {
+ buildCmd.add("-Dmaven.repo.local=" + getLocalMavenRepoDir());
+ }
+ if (USE_MAIN_BUILD_SETTINGS) {
+ buildCmd.add("-s");
+ buildCmd.add(System.getProperty("maven.settings"));
+ }
return Collections.unmodifiableList(buildCmd);
}
diff --git a/kogito-benchmarks-framework/src/main/resources/smarthouse-02-springboot/threshold.properties b/kogito-benchmarks-framework/src/main/resources/smarthouse-02-springboot/threshold.properties
index c541e43..91cd28f 100644
--- a/kogito-benchmarks-framework/src/main/resources/smarthouse-02-springboot/threshold.properties
+++ b/kogito-benchmarks-framework/src/main/resources/smarthouse-02-springboot/threshold.properties
@@ -1,5 +1,5 @@
linux.jvm.time.to.first.ok.request.threshold.ms=6000
-linux.jvm.RSS.threshold.kB=750000
+linux.jvm.RSS.threshold.kB=800000
linux.native.time.to.first.ok.request.threshold.ms=35
linux.native.RSS.threshold.kB=90000
windows.jvm.time.to.first.ok.request.threshold.ms=2000
diff --git a/kogito-benchmarks-framework/src/main/resources/smarthouse-03-springboot/threshold.properties b/kogito-benchmarks-framework/src/main/resources/smarthouse-03-springboot/threshold.properties
index c541e43..91cd28f 100644
--- a/kogito-benchmarks-framework/src/main/resources/smarthouse-03-springboot/threshold.properties
+++ b/kogito-benchmarks-framework/src/main/resources/smarthouse-03-springboot/threshold.properties
@@ -1,5 +1,5 @@
linux.jvm.time.to.first.ok.request.threshold.ms=6000
-linux.jvm.RSS.threshold.kB=750000
+linux.jvm.RSS.threshold.kB=800000
linux.native.time.to.first.ok.request.threshold.ms=35
linux.native.RSS.threshold.kB=90000
windows.jvm.time.to.first.ok.request.threshold.ms=2000
diff --git a/kogito-benchmarks-framework/src/main/resources/stp-smarthouse-03-springboot/threshold.properties b/kogito-benchmarks-framework/src/main/resources/stp-smarthouse-03-springboot/threshold.properties
index 91cd28f..47f90f9 100644
--- a/kogito-benchmarks-framework/src/main/resources/stp-smarthouse-03-springboot/threshold.properties
+++ b/kogito-benchmarks-framework/src/main/resources/stp-smarthouse-03-springboot/threshold.properties
@@ -1,5 +1,5 @@
linux.jvm.time.to.first.ok.request.threshold.ms=6000
-linux.jvm.RSS.threshold.kB=800000
+linux.jvm.RSS.threshold.kB=820000
linux.native.time.to.first.ok.request.threshold.ms=35
linux.native.RSS.threshold.kB=90000
windows.jvm.time.to.first.ok.request.threshold.ms=2000
diff --git a/kogito-benchmarks-tests/pom.xml b/kogito-benchmarks-tests/pom.xml
index e1d993e..44852cf 100644
--- a/kogito-benchmarks-tests/pom.xml
+++ b/kogito-benchmarks-tests/pom.xml
@@ -19,6 +19,8 @@
<!-- Framework -->
<appsDir>apps-dir-needs-to-be-specified</appsDir>
<archivedLogsDir>${project.basedir}/archived-logs</archivedLogsDir>
+ <useCustomMavenRepo>false</useCustomMavenRepo> <!-- Generated apps use their own .mvn/maven.config -->
+ <useMainBuildSettings>false</useMainBuildSettings>
<!-- Test Suite -->
<cpuAffinity>4</cpuAffinity> <!-- Positive number sets the CPU affinity explicitly -->
@@ -62,6 +64,8 @@
<appsDir>${appsDir}</appsDir>
<archivedLogsDir>${archivedLogsDir}</archivedLogsDir>
<cpuAffinity>${cpuAffinity}</cpuAffinity>
+ <useCustomMavenRepo>${useCustomMavenRepo}</useCustomMavenRepo>
+ <useMainBuildSettings>${useMainBuildSettings}</useMainBuildSettings>
</systemPropertyVariables>
</configuration>
</plugin>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org