aboutsummaryrefslogtreecommitdiffstats
path: root/stress.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.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.sh')
-rwxr-xr-xstress.sh76
1 files changed, 0 insertions, 76 deletions
diff --git a/stress.sh b/stress.sh
deleted file mode 100755
index f4a78bbe..00000000
--- a/stress.sh
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/bash
-
-ROOT=$(dirname $0)
-
-AFB=$ROOT/build/src/afb-daemon
-CLI=$ROOT/build/src/afb-client-demo
-HELLO=$ROOT/build/bindings/samples/helloWorld.so
-PORT=12345
-TEST=$ROOT/test
-TOKEN=knock-knock-knoc
-OUT=$ROOT/stress-out
-
-rm $OUT*
-
-echo -n launch afb...
-$AFB --session-max=100 --port=$PORT --rootdir=$ROOT --roothttp=$TEST --tracereq=all --token=$TOKEN --ldpaths=/tmp --binding=$HELLO --verbose --verbose --verbose > $OUT.0 2>&1 &
-afbpid=$!
-strace -tt -f -o $OUT-strace.0 -p $afbpid &
-echo done
-
-sleep 3
-
-CMDS='
-hello ping true
-HELLO PING false
-hello pIngNull true
-hello PingBug true
-hello PiNgJsOn {"well":"formed","json":[1,2,3,4.5,true,false,null,"oups"]}
-hello subcall {"api":"hello","verb":"pingjson","args":[{"key1":"value1"}]}
-hello subcall {"api":"hello","verb":"subcall","args":{"api":"hello","verb":"pingjson","args":[{"key1":"value1"}]}}
-hello subcallsync {"api":"hello","verb":"pingjson","args":[{"key1":"value1"}]}
-hello subcallsync {"api":"hello","verb":"subcall","args":{"api":"hello","verb":"pingjson","args":[{"key1":"value1"}]}}
-hello subcall {"api":"hello","verb":"subcallsync","args":{"api":"hello","verb":"pingjson","args":[{"key1":"value1"}]}}
-hello subcallsync {"api":"hello","verb":"subcallsync","args":{"api":"hello","verb":"pingjson","args":[{"key1":"value1"}]}}
-hello eventadd {"tag":"ev1","name":"event-A"}
-hello eventadd {"tag":"ev2","name":"event-B"}
-hello eventpush {"tag":"ev1","data":[1,2,"hello"]}
-hello eventpush {"tag":"ev2","data":{"item":0}}
-hello eventsub {"tag":"ev2"}
-hello eventpush {"tag":"ev1","data":[1,2,"hello"]}
-hello eventpush {"tag":"ev2","data":{"item":0}}
-hello eventsub {"tag":"ev1"}
-hello subcall {"api":"hello","verb":"eventpush","args":{"tag":"ev1","data":[1,2,"hello"]}}
-hello subcall {"api":"hello","verb":"eventpush","args":{"tag":"ev2","data":{"item":0}}}
-hello subcallsync {"api":"hello","verb":"eventpush","args":{"tag":"ev1","data":[1,2,"hello"]}}
-hello subcallsync {"api":"hello","verb":"eventpush","args":{"tag":"ev2","data":{"item":0}}}
-hello eventunsub {"tag":"ev2"}
-hello eventpush {"tag":"ev1","data":[1,2,"hello"]}
-hello eventpush {"tag":"ev2","data":{"item":0}}
-hello eventdel {"tag":"ev1"}
-hello eventpush {"tag":"ev1","data":[1,2,"hello"]}
-hello eventpush {"tag":"ev2","data":{"item":0}}
-'
-
-r() {
- while :; do echo "$CMDS"; done | while read x; do echo $x; sleep 0.005; done | strace -tt -f -o $OUT-strace.$1 $CLI "localhost:$PORT/api?token=$TOKEN" > $OUT.$1 2>&1 &
-}
-
-echo -n launch clients...
-r 1
-r 2
-r 3
-r 4
-r 5
-r 7
-r 8
-r 9
-r a
-r b
-r c
-echo done
-
-sleep 3
-
-kill $afbpid
-