aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-03-21 18:44:34 +0000
committerBart Polot <bart@net.in.tum.de>2014-03-21 18:44:34 +0000
commit273044e2abef1eeebcc07165f9148fd6ea7f4192 (patch)
tree3a8102a79585417df485d2503a9cce90a1579eff
parent4fa9e976857ac1bc0206bf9a801343edac644d17 (diff)
downloadgnunet-273044e2abef1eeebcc07165f9148fd6ea7f4192.tar.gz
gnunet-273044e2abef1eeebcc07165f9148fd6ea7f4192.zip
- wrap profiler in script to alter config file
-rw-r--r--src/mesh/profiler.template (renamed from src/mesh/profiler.conf)0
-rwxr-xr-xsrc/mesh/run_profiler.sh21
2 files changed, 21 insertions, 0 deletions
diff --git a/src/mesh/profiler.conf b/src/mesh/profiler.template
index 4dec92431..4dec92431 100644
--- a/src/mesh/profiler.conf
+++ b/src/mesh/profiler.template
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