From 3b43e3d21f5850d0a620aa6f79bd732cd7f126a1 Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Wed, 1 Oct 2025 09:09:44 +0200 Subject: [PATCH 1/3] Add building instructions --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 743c654..d1f5187 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ This project contains the following modules: - A Quarkus 3.x version of the application - [quarkus3-spring-compatibility](quarkus3-spring-compatibility) - A Quarkus 3.x version of the application using the Spring compatibility layer + +## Building + +`./mvnw clean verify -Dquarkus.hibernate-orm.sql-load-script=import.sql` ## Application requirements/dependencies From 1a92b94c627cd4bded6b89e382041c99eb175ced Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Wed, 1 Oct 2025 09:41:14 +0200 Subject: [PATCH 2/3] Add timeout instructions for macOS --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index d1f5187..6dd438e 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,11 @@ This project contains the following modules: `./mvnw clean verify -Dquarkus.hibernate-orm.sql-load-script=import.sql` ## Application requirements/dependencies + +- (macOS) You need to have a `timeout` compatible command: + - Via `coreutils` (installed via Homebrew): `brew install coreutils` but note that this will install lots of GNU utils that will duplicate native commands and prefix them with `g` (e.g. `gdate`) + - Use [this implementation](https://github.com/aisk/timeout) via Homebrew: `brew install aisk/homebrew-tap/timeout` + - More options at https://stackoverflow.com/questions/3504945/timeout-command-on-mac-os-x - Base JVM Version: 21 From 84d38b44af0b909b3cb0473eff6bdcaaec681f45 Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Wed, 1 Oct 2025 09:41:33 +0200 Subject: [PATCH 3/3] Make things more install-independent --- scripts/1strequest.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/1strequest.sh b/scripts/1strequest.sh index 265bb29..e01fd66 100755 --- a/scripts/1strequest.sh +++ b/scripts/1strequest.sh @@ -18,6 +18,14 @@ NUM_ITERATIONS=1 TOTAL_RSS=0 TOTAL_TTFR=0 +function _date() { + current=$(date +%s%N) + if [ $? -ne 0 ]; then + current=$(gdate +%s%N) + fi + echo "$current" +} + if [ "$#" -eq 2 ]; then NUM_ITERATIONS=$2 fi @@ -30,7 +38,7 @@ do # Start the infra ./infra.sh -s - ts=$(gdate +%s%N) + ts=$(_date) $COMMAND & CURRENT_PID=$! @@ -40,7 +48,7 @@ do : done - TTFR=$((($(gdate +%s%N) - $ts)/1000000)) + TTFR=$((($(_date) - ts)/1000000)) RSS=`ps -o rss= -p $CURRENT_PID | sed 's/^ *//g'` kill $CURRENT_PID wait $CURRENT_PID 2> /dev/null @@ -62,4 +70,4 @@ echo echo "-------------------------------------------------" printf "AVG RSS (after 1st request): %.1f MB\n" $(echo "$TOTAL_RSS / $NUM_ITERATIONS / 1024" | bc -l) printf "AVG time to first request: %.3f sec\n" $(echo "$TOTAL_TTFR / $NUM_ITERATIONS / 1000" | bc -l) -echo "-------------------------------------------------" \ No newline at end of file +echo "-------------------------------------------------"