mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:25:49 +00:00
add cpu & mem measurements
This commit is contained in:
parent
eae4ee007b
commit
47fead7795
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,8 @@ function bench () {
|
||||||
echo "Application not started correctly!"
|
echo "Application not started correctly!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pidstat -r -C java 1 > mem-${TAG}-${JDK}-${I}.txt &
|
||||||
echo "$(date +%H:%M:%S) Sending requests..."
|
echo "$(date +%H:%M:%S) Sending requests..."
|
||||||
pids=()
|
pids=()
|
||||||
for FORK in $(seq $THREADS);
|
for FORK in $(seq $THREADS);
|
||||||
|
@ -52,12 +54,16 @@ function bench () {
|
||||||
pid=${pids[$FORK]}
|
pid=${pids[$FORK]}
|
||||||
wait $pid
|
wait $pid
|
||||||
done
|
done
|
||||||
|
# grab user & sys cpu ticks
|
||||||
|
cat /proc/$java_pid/stat | cut -d " " -f 14 > cpu_ticks_${TAG}-${JDK}-${I}_${FORK}.txt
|
||||||
|
# merge all request sender threads
|
||||||
for FORK in $(seq $THREADS);
|
for FORK in $(seq $THREADS);
|
||||||
do
|
do
|
||||||
cat results_${TAG}-${JDK}-${I}_${FORK}.csv >> results_${TAG}-${JDK}-${I}.csv
|
cat results_${TAG}-${JDK}-${I}_${FORK}.csv >> results_${TAG}-${JDK}-${I}.csv
|
||||||
done
|
done
|
||||||
echo "Killing $PID"
|
echo "Killing $PID"
|
||||||
pkill -P $PID
|
pkill -P $PID
|
||||||
|
pkill pidstat
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
python percentiles.py ${TAG}-${JDK}.csv results_${TAG}-${JDK}-?.csv
|
python percentiles.py ${TAG}-${JDK}.csv results_${TAG}-${JDK}-?.csv
|
||||||
|
|
Loading…
Reference in a new issue