Skip to content

Instantly share code, notes, and snippets.

@bcarlin
Last active July 3, 2020 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcarlin/ce083e8c6305269b6d733ab7c8603aab to your computer and use it in GitHub Desktop.
Save bcarlin/ce083e8c6305269b6d733ab7c8603aab to your computer and use it in GitHub Desktop.
Waarp R66 JVM benchmarks
#!/usr/bin/env bash
images=(
#openjdk:7-jre-slim
#openjdk:7-jdk-slim
openjdk:8-jre-slim
openjdk:8-jdk-slim
store/oracle/serverjre:8
amazoncorretto:8
amazoncorretto:8-al2-jdk
adoptopenjdk:8-jre-openj9
adoptopenjdk:8-jre-hotspot
adoptopenjdk:8-jdk-openj9
adoptopenjdk:8-jdk-hotspot
ibmjava:8-jre
)
pullimg() {
local image="$1"
#podman command
podman pull "$image"
}
runimg() {
local image="$1"
#podman command
podman run --name r66test --rm -v "$(pwd)":/opt/waarp -w /opt/waarp \
"$image" \
./bin/waarp-r66client.sh server2 msend -property \
-to server1 -rule pull -file 'foo.*'
}
rm ./*.csv
for image in "${images[@]}"; do
csv=${image}.csv
echo "$image" > "$csv"
pullimg "$image"
# run docker image
runimg "$image" &
sleep 1
# get pid
pid=$(podman top r66test hpid args | grep MultipleDirect | cut -d' ' -f1)
while awk '/VmRSS:/ { print $2 }' "/proc/$pid/status" >> "$csv"; do
sleep 0.5
done
wait
done
paste -d, ./*.csv > all.csv
awk '{print NR "," $s}' all.csv > complete.csv
graph complete.csv --markersize 0 --ylabel "Process RSS" --figsize 1600x1000 -o bench.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment