1
Fork 0
mirror of https://github.com/Steffo99/unimore-hpc-assignments.git synced 2024-11-26 01:54:22 +00:00

Create bench target for calculating the average of 9 runs

This commit is contained in:
Steffo 2022-11-16 17:39:09 +01:00
parent 8cb741d24d
commit e23d565fd2
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1,14 @@
#!/bin/bash
runs=9
totalt=0.0
for i in $(seq $runs)
do
exet=$(./atax_acc)
totalt=$(awk "BEGIN{print $totalt+$exet}")
echo " Run #$i: $exet seconds"
done
avgt=$(awk "BEGIN{print $totalt/$runs}")
echo "Average: $avgt seconds"

View file

@ -21,4 +21,4 @@ MAKEFLAGS+= --silent
bench:
make clean all
./atax_acc
./.bench.sh