RSS

(root)/alps/fwbench : /fwbench.sh (revision 19)

To get this branch, use:
bzr branch /webbzr/alps/fwbench
Line Revision Contents
1 5
#! /bin/bash
2
3
function fwbench {
4
    if [ -f ../configure.sh -a -f fwbench ]; then
5
	../configure.sh ./fwbench $*
6 8
    elif [ -f fwbench ]; then
7
	./fwbench $*
8 5
    else
9 8
	`which fwbench` $*
10 5
    fi
11
}
12
13
14
if [ -n "$1" ]; then
15
    out=$1
16
else
17
    out="/dev/null"
18
fi
19
20
if [ -n "$2" ]; then
21
    size=$2
22
else
23
    size=1024
24
fi
25
26
if [ -n "$3" ]; then
27
    speed=$3
28
else
29
    speed=1500
30
fi
31
32
33
speed=$((speed + 50))
34
res=1
35
while [ $res -ne 0 ]; do
36
    speed=$((speed - 50))
37 14
    fwbench -b 1024 -m 0 -u 512 -r $speed -s $size -o $out
38 5
    res=$?
39 6
    usleep 500000
40 5
done
41
42
echo "Maximal speed: $speed"

Loggerhead 1.18.1 is a web-based interface for Bazaar branches