Allow interval at which benchmark results are printed to be controlled.
[bluesky.git] / microbench / setup / run-benchmark
index 4b590e3..2942f48 100755 (executable)
@@ -13,6 +13,7 @@ BENCH_WRITERATIO=1.0
 BENCH_THREADS=8
 BENCH_DURATION=120
 BENCH_OPS=100
+BENCH_INTERVALS=4
 
 # Export any environment variables specified on the command line
 for e in "$@"; do
@@ -26,11 +27,11 @@ done
 # Prepare to run the benchmark
 mount -t nfs -o vers=3,tcp,rw,soft,intr $SERVER:/export $MNTDIR
 
-pushd $MNTDIR
+pushd $MNTDIR >/dev/null
 
 for t in $(seq 0 $(($BENCH_THREADS - 1))); do
     mkdir t$t
-    for i in {0..$(($BENCH_FILECOUNT - 1))}; do
+    for i in $(seq 0 $(($BENCH_FILECOUNT - 1))); do
         dd if=/dev/zero of=t$t/$i bs=$BENCH_FILESIZE count=1
     done
 done
@@ -41,8 +42,9 @@ done
     $BENCH_WRITERATIO \
     $BENCH_THREADS \
     $BENCH_DURATION \
-    $BENCH_OPS
+    $BENCH_OPS \
+    $BENCH_INTERVALS
 
-popd
+popd >/dev/null
 
 umount -f $MNTDIR