mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 23:05:50 +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!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pidstat -r -C java 1 > mem-${TAG}-${JDK}-${I}.txt &
|
||||
echo "$(date +%H:%M:%S) Sending requests..."
|
||||
pids=()
|
||||
for FORK in $(seq $THREADS);
|
||||
|
@ -52,12 +54,16 @@ function bench () {
|
|||
pid=${pids[$FORK]}
|
||||
wait $pid
|
||||
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);
|
||||
do
|
||||
cat results_${TAG}-${JDK}-${I}_${FORK}.csv >> results_${TAG}-${JDK}-${I}.csv
|
||||
done
|
||||
echo "Killing $PID"
|
||||
pkill -P $PID
|
||||
pkill pidstat
|
||||
sleep 1
|
||||
done
|
||||
python percentiles.py ${TAG}-${JDK}.csv results_${TAG}-${JDK}-?.csv
|
||||
|
|
Loading…
Reference in a new issue