|
@@ -32,22 +32,25 @@ BENCH_TIME=`(/usr/bin/time -f "%e" ./run-$TYPE) 2>&1 > /dev/zero | tail -1`
|
|
# Stop power measurement
|
|
# Stop power measurement
|
|
kill -SIGUSR1 $PID_POWER
|
|
kill -SIGUSR1 $PID_POWER
|
|
|
|
|
|
-# Add an additional SIGKILL to avoid zombie processes in case of a faulty measurement
|
|
|
|
-kill -SIGKILL $PID_POWER
|
|
|
|
-
|
|
|
|
# Wait until the Smartpower utility has received the kill signal and force a sync on the disk to avoid reading the previous result
|
|
# Wait until the Smartpower utility has received the kill signal and force a sync on the disk to avoid reading the previous result
|
|
|
|
|
|
sleep 5 && sync
|
|
sleep 5 && sync
|
|
|
|
|
|
|
|
|
|
# Save execution time in the log
|
|
# Save execution time in the log
|
|
-echo "$BENCH_NAME $BENCH_TIME" >> $BASE_PATH/results/$TYPE/$2
|
|
|
|
|
|
+echo "$BENCH_NAME, $BENCH_TIME" >> $BASE_PATH/results/$TYPE/$2
|
|
|
|
|
|
# Prepare a log that contains all the info relative to a benchmark
|
|
# Prepare a log that contains all the info relative to a benchmark
|
|
# To retrieve the power measurement we take the third column of the last row from the file where the measurement utility has saved the results
|
|
# To retrieve the power measurement we take the third column of the last row from the file where the measurement utility has saved the results
|
|
BENCH_CONSUMPTION=`tail -1 $BASE_PATH/results/$TYPE/power-usage.csv | awk '{print $3}' | cut -d, -f2`
|
|
BENCH_CONSUMPTION=`tail -1 $BASE_PATH/results/$TYPE/power-usage.csv | awk '{print $3}' | cut -d, -f2`
|
|
-echo "$BENCH_NAME $BENCH_TIME $BENCH_CONSUMPTION" >> $BASE_PATH/results/$TYPE/total.dat
|
|
|
|
|
|
+echo "$BENCH_NAME, $BENCH_TIME, $BENCH_CONSUMPTION" >> $BASE_PATH/results/$TYPE/total.dat
|
|
|
|
|
|
|
|
|
|
# Sleep in order to give time to the power measurement script to reset.
|
|
# Sleep in order to give time to the power measurement script to reset.
|
|
sleep 3
|
|
sleep 3
|
|
|
|
+
|
|
|
|
+# Add an additional SIGKILL to avoid zombie processes in case of a faulty measurement, we ignore the standard output/error and we always succeed, otherwise make will complain
|
|
|
|
+kill -SIGKILL $PID_POWER 2>&1 > /dev/null || true
|
|
|
|
+
|
|
|
|
+# Sleep in order to give time to the power measurement script to reset and to dissipate the heat accumuled in the previous benchmark.
|
|
|
|
+sleep 3
|