]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Moved shell commands for running matinv to a separate file.
authorBart Van Assche <bvanassche@acm.org>
Sun, 8 Jun 2008 08:09:50 +0000 (08:09 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 8 Jun 2008 08:09:50 +0000 (08:09 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8202

exp-drd/Testing.txt
exp-drd/scripts/run-matinv [new file with mode: 0755]

index d2d0ded40a5c951674339fa08d664133a4d73bf0..2664147d677d171ddaa045f95ee57cacaaf5b245 100644 (file)
@@ -4,16 +4,11 @@ How to test DRD
 1. Run the regression tests. After having compiled DRD, run the following
    command:
      perl tests/vg_regtest exp-drd
-2. Test the slowdown for matinv for various matrix sizes (must be about 45
-   for i == 1 and about 50 for i == 10):
-     time exp-drd/tests/matinv 200
-     for ((i=1;i<=10;i++))
-     do
-       echo "==== $i ===="
-       time ./vg-in-place --tool=exp-drd exp-drd/tests/matinv 200 -t$i
-     done
+2. Test the slowdown for matinv for various matrix sizes via the script
+   exp-drd/scripts/run-matinv (must be about 27 for i == 1 and about
+   36 for i == 10).
 3. Test whether DRD works with standard KDE applications and whether it does
-   not print any error messages:
+   not print any false positives:
      ./vg-in-place --tool=exp-drd kate
      ./vg-in-place --trace-children=yes --tool=exp-drd knode
      ./vg-in-place --trace-children=yes --tool=exp-drd amarokapp
diff --git a/exp-drd/scripts/run-matinv b/exp-drd/scripts/run-matinv
new file mode 100755 (executable)
index 0000000..496986b
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+########################
+# Function definitions #
+########################
+
+source "$(dirname $0)/measurement-functions"
+
+########################
+# Script body          #
+########################
+
+DRD_SCRIPTS_DIR="$(dirname $0)"
+if [ "${DRD_SCRIPTS_DIR:0:1}" != "/" ]; then
+  DRD_SCRIPTS_DIR="$PWD/$DRD_SCRIPTS_DIR"
+fi
+
+VG="${DRD_SCRIPTS_DIR}/../../vg-in-place"
+MATINV="${DRD_SCRIPTS_DIR}/../../exp-drd/tests/matinv"
+
+
+for n in 200 400
+do
+  tmp="/tmp/test-timing.$$"
+  rm -f "${tmp}"
+
+  measure_runtime ${MATINV} $n | avgstddev > "$tmp"
+  read avg1 stddev1 < "$tmp"
+  echo "Average time: ${avg1} +/- ${stddev1} seconds"
+
+  for ((i=1;i<=10;i++))
+  do
+    print_runtime_ratio ${VG} --tool=exp-drd ${MATINV} $n -t$i
+  done
+done