Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@ 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

- (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

Expand Down
14 changes: 11 additions & 3 deletions scripts/1strequest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,7 +38,7 @@ do
# Start the infra
./infra.sh -s

ts=$(gdate +%s%N)
ts=$(_date)
$COMMAND &
CURRENT_PID=$!

Expand All @@ -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
Expand All @@ -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 "-------------------------------------------------"
echo "-------------------------------------------------"