Skip to content

Commit c1bb532

Browse files
authored
passing build-time config args to Quarkus version (#111)
1 parent 9d4057e commit c1bb532

File tree

2 files changed

+58
-49
lines changed

2 files changed

+58
-49
lines changed

scripts/perf-lab/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ states:
1313

1414
config.jvm.memory: #-Xmx128m
1515
config.jvm.args: #-XX:+UseNUMA
16+
config.quarkus.build_config_args:
1617

1718
config.quarkus.native_build_options: #-Dquarkus.native.native-image-xmx=<maximum_memory>
1819
config.springboot3.native_build_options:
@@ -36,7 +37,6 @@ states:
3637
RUN.WRK_BIN: ${{LOAD_GEN_CMD_PREFIX}} jbang -R -XX:+UseNUMA wrk@hyperfoil
3738

3839
DROP_OS_FILESYSTEM_CACHES:
39-
QUARKUS_MAVEN_OPTIONS:
4040
PAUSE_TIME: 5
4141
PROFILER_JVM_ARGS:
4242
BASE_JAVA_CMD: ${{APP_CMD_PREFIX}} java ${{config.jvm.memory}} ${{config.jvm.args}} ${{PROFILER_JVM_ARGS}}
@@ -53,14 +53,14 @@ states:
5353
dir: ${{QUARKUS3_DIR}}
5454
updateScript: update-quarkus-version
5555
updateVersion: ${{config.quarkus.version}}
56-
buildCmd: "./mvnw ${{QUARKUS_MAVEN_OPTIONS}} clean package -DskipTests"
56+
buildCmd: "./mvnw ${{config.quarkus.build_config_args}} clean package -DskipTests"
5757
runCmd: "${{BASE_JAVA_CMD}} -jar ${{QUARKUS3_DIR}}/target/quarkus-app/quarkus-run.jar"
5858
- name: quarkus3-native
5959
type: native
6060
dir: ${{QUARKUS3_DIR}}
6161
updateScript: update-quarkus-version
6262
updateVersion: ${{config.quarkus.version}}
63-
buildCmd: "./mvnw ${{QUARKUS_MAVEN_OPTIONS}} clean package -DskipTests -Pnative ${{config.quarkus.native_build_options}}"
63+
buildCmd: "./mvnw ${{config.quarkus.build_config_args}} clean package -DskipTests -Pnative ${{config.quarkus.native_build_options}}"
6464
runCmd: "${{APP_CMD_PREFIX}} ${{QUARKUS3_DIR}}/target/quarkus3-runner ${{config.jvm.memory}}"
6565
- name: spring3-jvm
6666
type: jvm

scripts/perf-lab/run-benchmarks.sh

Lines changed: 55 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,53 @@ help() {
99
echo
1010
echo "Syntax: run-benchmarks.sh [options]"
1111
echo "options:"
12-
echo " --cpus <CPUS> How many CPUs to allocate to the application"
13-
echo " Default: ${CPUS}"
14-
echo " --drop-fs-caches Purge/drop OS filesystem caches between iterations"
15-
echo " --extra-qdup-args <EXTRA_QDUP_ARGS> Any extra arguments that need to be passed to qDup ahead of the qDup scripts"
16-
echo " NOTE: This is an advanced option. Make sure you know what you are doing when using it."
17-
echo " --graalvm-version <GRAALVM_VERSION> The GraalVM version to use if running any native tests (from SDKMAN)"
18-
echo " Default: ${GRAALVM_VERSION}"
19-
echo " --host <HOST> The HOST to run the benchmarks on"
20-
echo " LOCAL is a keyword that can be used to run everything on the local machine"
21-
echo " Default: ${HOST}"
22-
echo " --iterations <ITERATIONS> The number of iterations to run each test"
23-
echo " Default: ${ITERATIONS}"
24-
echo " --java-version <JAVA_VERSION> The Java version to use (from SDKMAN)"
25-
echo " Default: ${JAVA_VERSION}"
26-
echo " --jvm-args <JVM_ARGS> Any JVM args to be passed to the apps"
27-
echo " --jvm-memory <JVM_MEMORY> JVM Memory setting (i.e. -Xmx -Xmn -Xms)"
28-
echo " --native-quarkus-build-options <NATIVE_QUARKUS_OPTS> Native build options to be passed to Quarkus native build process"
29-
echo " --native-spring3-build-options <NATIVE_SPRING3_OPTS> Native build options to be passed to Spring 3.x native build process"
30-
echo " --native-spring4-build-options <NATIVE_SPRING4_OPTS> Native build options to be passed to Spring 4.x native build process"
31-
echo " --output-dir <OUTPUT_DIR> The directory containing the run output"
32-
echo " Default: ${OUTPUT_DIR}"
33-
echo " --profiler <PROFILER> Enable profiling with async profiler"
34-
echo " Accepted values: none, jfr, flamegraph"
35-
echo " Default: ${PROFILER}"
36-
echo " --quarkus-version <QUARKUS_VERSION> The Quarkus version to use"
37-
echo " Default: Whatever version is set in pom.xml of the Quarkus app"
38-
echo " NOTE: Its a good practice to set this manually to ensure proper version"
39-
echo " --repo-branch <SCM_REPO_BRANCH> The branch in the SCM repo"
40-
echo " Default: '${SCM_REPO_BRANCH}'"
41-
echo " --repo-url <SCM_REPO_URL> The SCM repo url"
42-
echo " Default: '${SCM_REPO_URL}'"
43-
echo " --runtimes <RUNTIMES> The runtimes to test, separated by commas"
44-
echo " Accepted values (1 or more of): quarkus3-jvm, quarkus3-native, spring3-jvm, spring3-jvm-aot, spring3-native"
45-
echo " Default: 'quarkus3-jvm,quarkus3-native,spring3-jvm,spring3-jvm-aot,spring3-native,spring4-jvm,spring4-jvm-aot,spring4-native'"
46-
echo " --springboot3-version <SPRING_BOOT3_VERSION> The Spring Boot 3.x version to use"
47-
echo " Default: Whatever version is set in pom.xml of the Spring Boot 3 app"
48-
echo " NOTE: Its a good practice to set this manually to ensure proper version"
49-
echo " --springboot4-version <SPRING_BOOT4_VERSION> The Spring Boot 4.x version to use"
50-
echo " Default: Whatever version is set in pom.xml of the Spring Boot 4 app"
51-
echo " NOTE: Its a good practice to set this manually to ensure proper version"
52-
echo " --tests <TESTS_TO_RUN> The tests to run, separated by commas"
53-
echo " Accepted values (1 or more of): test-build, measure-build-times, measure-time-to-first-request, measure-rss, run-load-test"
54-
echo " Default: 'test-build,measure-build-times,measure-time-to-first-request,measure-rss,run-load-test'"
55-
echo " --user <USER> The user on <HOST> to run the benchmark"
56-
echo " --wait-time <WAIT_TIME> Wait time (in seconds) to wait for things like application startup"
57-
echo " Default: ${WAIT_TIME}"
12+
echo " --cpus <CPUS> How many CPUs to allocate to the application"
13+
echo " Default: ${CPUS}"
14+
echo " --drop-fs-caches Purge/drop OS filesystem caches between iterations"
15+
echo " --extra-qdup-args <EXTRA_QDUP_ARGS> Any extra arguments that need to be passed to qDup ahead of the qDup scripts"
16+
echo " NOTE: This is an advanced option. Make sure you know what you are doing when using it."
17+
echo " --graalvm-version <GRAALVM_VERSION> The GraalVM version to use if running any native tests (from SDKMAN)"
18+
echo " Default: ${GRAALVM_VERSION}"
19+
echo " --host <HOST> The HOST to run the benchmarks on"
20+
echo " LOCAL is a keyword that can be used to run everything on the local machine"
21+
echo " Default: ${HOST}"
22+
echo " --iterations <ITERATIONS> The number of iterations to run each test"
23+
echo " Default: ${ITERATIONS}"
24+
echo " --java-version <JAVA_VERSION> The Java version to use (from SDKMAN)"
25+
echo " Default: ${JAVA_VERSION}"
26+
echo " --jvm-args <JVM_ARGS> Any runtime JVM args to be passed to the apps"
27+
echo " --jvm-memory <JVM_MEMORY> JVM Memory setting (i.e. -Xmx -Xmn -Xms)"
28+
echo " --native-quarkus-build-options <NATIVE_QUARKUS_OPTS> Native build options to be passed to Quarkus native build process"
29+
echo " --native-spring3-build-options <NATIVE_SPRING3_OPTS> Native build options to be passed to Spring 3.x native build process"
30+
echo " --native-spring4-build-options <NATIVE_SPRING4_OPTS> Native build options to be passed to Spring 4.x native build process"
31+
echo " --output-dir <OUTPUT_DIR> The directory containing the run output"
32+
echo " Default: ${OUTPUT_DIR}"
33+
echo " --profiler <PROFILER> Enable profiling with async profiler"
34+
echo " Accepted values: none, jfr, flamegraph"
35+
echo " Default: ${PROFILER}"
36+
echo " --quarkus-build-config-args <QUARKUS_BUILD_CONFIG_ARGS> Quarkus app configuration properties fixed at build time"
37+
echo " --quarkus-version <QUARKUS_VERSION> The Quarkus version to use"
38+
echo " Default: Whatever version is set in pom.xml of the Quarkus app"
39+
echo " NOTE: Its a good practice to set this manually to ensure proper version"
40+
echo " --repo-branch <SCM_REPO_BRANCH> The branch in the SCM repo"
41+
echo " Default: '${SCM_REPO_BRANCH}'"
42+
echo " --repo-url <SCM_REPO_URL> The SCM repo url"
43+
echo " Default: '${SCM_REPO_URL}'"
44+
echo " --runtimes <RUNTIMES> The runtimes to test, separated by commas"
45+
echo " Accepted values (1 or more of): quarkus3-jvm, quarkus3-native, spring3-jvm, spring3-jvm-aot, spring3-native"
46+
echo " Default: 'quarkus3-jvm,quarkus3-native,spring3-jvm,spring3-jvm-aot,spring3-native,spring4-jvm,spring4-jvm-aot,spring4-native'"
47+
echo " --springboot3-version <SPRING_BOOT3_VERSION> The Spring Boot 3.x version to use"
48+
echo " Default: Whatever version is set in pom.xml of the Spring Boot 3 app"
49+
echo " NOTE: Its a good practice to set this manually to ensure proper version"
50+
echo " --springboot4-version <SPRING_BOOT4_VERSION> The Spring Boot 4.x version to use"
51+
echo " Default: Whatever version is set in pom.xml of the Spring Boot 4 app"
52+
echo " NOTE: Its a good practice to set this manually to ensure proper version"
53+
echo " --tests <TESTS_TO_RUN> The tests to run, separated by commas"
54+
echo " Accepted values (1 or more of): test-build, measure-build-times, measure-time-to-first-request, measure-rss, run-load-test"
55+
echo " Default: 'test-build,measure-build-times,measure-time-to-first-request,measure-rss,run-load-test'"
56+
echo " --user <USER> The user on <HOST> to run the benchmark"
57+
echo " --wait-time <WAIT_TIME> Wait time (in seconds) to wait for things like application startup"
58+
echo " Default: ${WAIT_TIME}"
5859
}
5960

6061
exit_abnormal() {
@@ -97,6 +98,7 @@ print_values() {
9798
echo " NATIVE_SPRING3_BUILD_OPTIONS: $NATIVE_SPRING3_BUILD_OPTIONS"
9899
echo " NATIVE_SPRING4_BUILD_OPTIONS: $NATIVE_SPRING4_BUILD_OPTIONS"
99100
echo " PROFILER: $PROFILER"
101+
echo " QUARKUS_BUILD_CONFIG_ARGS: $QUARKUS_BUILD_CONFIG_ARGS"
100102
echo " QUARKUS_VERSION: $QUARKUS_VERSION"
101103
echo " RUNTIMES: ${RUNTIMES[@]}"
102104
echo " SPRING_BOOT3_VERSION: $SPRING_BOOT3_VERSION"
@@ -189,6 +191,7 @@ ${JBANG_CMD} qDup@hyperfoil \
189191
-S config.springboot3.version=${SPRING_BOOT3_VERSION} \
190192
-S config.springboot4.version=${SPRING_BOOT4_VERSION} \
191193
-S config.jvm.memory="${JVM_MEMORY}" \
194+
-S config.quarkus.build_config_args="${QUARKUS_BUILD_CONFIG_ARGS}" \
192195
-S config.quarkus.version=${QUARKUS_VERSION} \
193196
-S config.springboot3.native_build_options="${NATIVE_SPRING3_BUILD_OPTIONS}" \
194197
-S config.springboot4.native_build_options="${NATIVE_SPRING4_BUILD_OPTIONS}" \
@@ -218,6 +221,7 @@ NATIVE_QUARKUS_BUILD_OPTIONS=""
218221
NATIVE_SPRING3_BUILD_OPTIONS=""
219222
NATIVE_SPRING4_BUILD_OPTIONS=""
220223
PROFILER="none"
224+
QUARKUS_BUILD_CONFIG_ARGS=""
221225
QUARKUS_VERSION=""
222226
ALLOWED_RUNTIMES=("quarkus3-jvm" "quarkus3-native" "spring3-jvm" "spring3-jvm-aot" "spring3-native" "spring4-jvm" "spring4-jvm-aot" "spring4-native")
223227
RUNTIMES=${ALLOWED_RUNTIMES[@]}
@@ -316,6 +320,11 @@ while [[ $# -gt 0 ]]; do
316320
shift 2
317321
;;
318322

323+
--quarkus-build-config-args)
324+
QUARKUS_BUILD_CONFIG_ARGS="$2"
325+
shift 2
326+
;;
327+
319328
--quarkus-version)
320329
QUARKUS_VERSION="$2"
321330
shift 2

0 commit comments

Comments
 (0)