3 ########################
4 # Function definitions #
5 ########################
7 source "$(dirname $0)/measurement-functions"
9 ########################
11 ########################
13 DRD_SCRIPTS_DIR
="$(dirname $0)"
14 if [ "${DRD_SCRIPTS_DIR:0:1}" != "/" ]; then
15 DRD_SCRIPTS_DIR
="$PWD/$DRD_SCRIPTS_DIR"
18 VG
="${DRD_SCRIPTS_DIR}/../../vg-in-place"
19 MATINV
="${DRD_SCRIPTS_DIR}/../../drd/tests/matinv"
24 tmp
="/tmp/test-timing.$$"
27 measure_runtime
${MATINV} $n | avgstddev
> "$tmp"
28 read avg1 stddev1 vsz1 vszdev1
< "$tmp"
29 echo "Average time: ${avg1} +/- ${stddev1} seconds." \
30 " VSZ: ${vsz1} +/- ${vszdev1} KB"
34 print_runtime_ratio
${avg1} ${stddev1} ${vsz1} ${vszdev1} \
35 ${VG} --tool=none
${MATINV} $n -t$i
36 print_runtime_ratio
${avg1} ${stddev1} ${vsz1} ${vszdev1} \
37 ${VG} --tool=drd
${MATINV} $n -t$i