aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/run_profiler.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/run_profiler.sh')
-rwxr-xr-xsrc/mesh/run_profiler.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesh/run_profiler.sh b/src/mesh/run_profiler.sh
new file mode 100755
index 000000000..fe5dbbd14
--- /dev/null
+++ b/src/mesh/run_profiler.sh
@@ -0,0 +1,21 @@
1#!/bin/sh
2
3if [ "$#" -lt "1" ]; then
4 echo "usage: $0 PEERS";
5 exit 1;
6fi
7
8PEERS=$1
9
10if [ $PEERS -eq 1 ]; then
11 echo "cannot run 1 peer";
12 exit 1;
13fi
14
15LINKS=`echo "l($PEERS) * $PEERS" | bc -l`
16LINKS=`printf "%.0f" $LINKS`
17echo "using $PEERS peers, $LINKS links";
18
19sed -e "s/%LINKS%/$LINKS/g" profiler.template > profiler.conf
20
21./gnunet-mesh-profiler $PEERS