summaryrefslogtreecommitdiffstats
path: root/fwbench.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2012-03-08 03:45:16 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2012-03-08 03:45:16 +0100
commitd8a59c319f553b1d1ec0d4a4ee47e8a832c5e235 (patch)
tree95bb912c1be053060044face5a8de933ee03a8ed /fwbench.sh
parent6f85ec4f1e41b802cd517cc57dacb5a604d73e8a (diff)
downloadfwbench-d8a59c319f553b1d1ec0d4a4ee47e8a832c5e235.tar.gz
fwbench-d8a59c319f553b1d1ec0d4a4ee47e8a832c5e235.tar.bz2
fwbench-d8a59c319f553b1d1ec0d4a4ee47e8a832c5e235.tar.xz
fwbench-d8a59c319f553b1d1ec0d4a4ee47e8a832c5e235.zip
Benchmarking script
Diffstat (limited to 'fwbench.sh')
-rwxr-xr-xfwbench.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/fwbench.sh b/fwbench.sh
new file mode 100755
index 0000000..e8014ef
--- /dev/null
+++ b/fwbench.sh
@@ -0,0 +1,41 @@
+#! /bin/bash
+
+function fwbench {
+ if [ -f ../configure.sh -a -f fwbench ]; then
+ ../configure.sh ./fwbench $*
+ else
+ fwbench $*
+ fi
+}
+
+
+if [ -n "$1" ]; then
+ out=$1
+else
+ out="/dev/null"
+fi
+
+if [ -n "$2" ]; then
+ size=$2
+else
+ size=1024
+fi
+
+if [ -n "$3" ]; then
+ speed=$3
+else
+ speed=1500
+fi
+
+
+speed=$((speed + 50))
+res=1
+while [ $res -ne 0 ]; do
+ speed=$((speed - 50))
+ fwbench -b 1024 -m 0 -r $speed -s $size -o $out
+ res=$?
+done
+
+echo "Maximal speed: $speed"
+echo
+