[GRASS-SVN] r55311 - sandbox/martinl

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Mar 11 02:47:07 PDT 2013


Author: martinl
Date: 2013-03-11 02:47:07 -0700 (Mon, 11 Mar 2013)
New Revision: 55311

Added:
   sandbox/martinl/repeat_test.sh
Modified:
   sandbox/martinl/compile_grass.sh
Log:
martinl: add script for repeating test


Property changes on: sandbox/martinl/compile_grass.sh
___________________________________________________________________
Added: svn:mime-type
   + text/x-sh
Added: svn:eol-style
   + native

Added: sandbox/martinl/repeat_test.sh
===================================================================
--- sandbox/martinl/repeat_test.sh	                        (rev 0)
+++ sandbox/martinl/repeat_test.sh	2013-03-11 09:47:07 UTC (rev 55311)
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+if test -z "$1" ; then
+    echo "usage: $0 cmd [n]"
+    exit 1
+fi
+
+CMD="$1"
+
+NUM=10
+if test -n "$2" ; then
+    NUM=$2
+fi
+
+st=0
+for i in `seq 1 $NUM`; do
+    echo -n $i..
+    t=`/usr/bin/time -f "%U" $CMD --q 2>&1`
+    st=$(echo $st + $t | bc)
+done
+
+printf "\ntime=%.2f\n" `echo $st / $NUM | bc -l`
+
+exit 0


Property changes on: sandbox/martinl/repeat_test.sh
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/x-sh
Added: svn:eol-style
   + native



More information about the grass-commit mailing list