diff options
-rw-r--r-- | src/mesh/profiler.template (renamed from src/mesh/profiler.conf) | 0 | ||||
-rwxr-xr-x | src/mesh/run_profiler.sh | 21 |
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 | |||
3 | if [ "$#" -lt "1" ]; then | ||
4 | echo "usage: $0 PEERS"; | ||
5 | exit 1; | ||
6 | fi | ||
7 | |||
8 | PEERS=$1 | ||
9 | |||
10 | if [ $PEERS -eq 1 ]; then | ||
11 | echo "cannot run 1 peer"; | ||
12 | exit 1; | ||
13 | fi | ||
14 | |||
15 | LINKS=`echo "l($PEERS) * $PEERS" | bc -l` | ||
16 | LINKS=`printf "%.0f" $LINKS` | ||
17 | echo "using $PEERS peers, $LINKS links"; | ||
18 | |||
19 | sed -e "s/%LINKS%/$LINKS/g" profiler.template > profiler.conf | ||
20 | |||
21 | ./gnunet-mesh-profiler $PEERS | ||