summaryrefslogtreecommitdiffstats
path: root/stress-server.sh
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-04-11 15:40:44 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-04-11 15:40:44 +0200
commit237cf9c6c05616c20726175406d0855a8d0d4233 (patch)
tree908acbd80357b1cd557b4e58779a6250f6ef6a07 /stress-server.sh
parenta274ae1502b257511298bd6a01cf1b7b69ade468 (diff)
Refactor stress test
Stress test now has 2 parts: the server part and the client part. Change-Id: I24e46060a1a710381476157f4fb4e8ad32370a5e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'stress-server.sh')
-rwxr-xr-xstress-server.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/stress-server.sh b/stress-server.sh
new file mode 100755
index 00000000..16a376e3
--- /dev/null
+++ b/stress-server.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+ROOT=$(dirname $0)
+echo ROOT=$ROOT
+
+AFB=$ROOT/build/src/afb-daemon
+HELLO=build/bindings/samples/helloWorld.so
+PORT=12345
+TEST=test
+TOKEN=knock-knock-knoc
+OUT=$ROOT/stress-out-server
+
+rm $OUT*
+
+ARGS="-q --session-max=100 --port=$PORT --workdir=$ROOT --roothttp=$TEST --token=$TOKEN --ldpaths=/tmp --binding=$HELLO"
+
+echo -n launch afb...
+case "$1" in
+ gdb) gdb $AFB -ex "run $ARGS";;
+ valgrind) valgrind --leak-check=full $AFB $ARGS 2>&1 | tee $OUT;;
+ strace) strace -tt -f -o $OUT.strace $AFB $ARGS 2>&1 | tee $OUT;;
+ *) $AFB $ARGS 2>&1 | tee $OUT;;
+esac
+#$AFB -q --session-max=100 --port=$PORT --workdir=$ROOT --roothttp=$TEST --token=$TOKEN --ldpaths=/tmp --binding=$HELLO > $OUT.0 2>&1 &
+#afbpid=$!
+#strace -tt -f -o $OUT-strace.0 -p $afbpid &
+wait