-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbehch.sh
executable file
·49 lines (42 loc) · 919 Bytes
/
behch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
SCOPE=$1
RESTRICTION=$2
SERVER_PORT=0
RESTRICT_MODE=''
set ex;
case $SCOPE in
spring)
SERVER_PORT=61004
shift
;;
vanilla)
SERVER_PORT=62004
shift
;;
*)
echo "Unknown test scope: $SCOPE"
exit 1
;;
esac
case $RESTRICTION in
1)
RESTRICT_MODE='--cpus=1 --concurrency=1 '
echo "Run with restriction by --cpus=1 --concurrency=1"
shift
;;
*)
echo "Run without restriction by CPU"
shift
;;
esac
echo "Run ghz in scope ${SCOPE} with port ${SERVER_PORT} ---- "
echo "Benchmark will be stopped after 1 minute ---- "
docker run --rm --network=host \
--volume "${PWD}/proto/src/main/proto:/ghz/protos" \
obvionaoe/ghz \
--insecure \
--duration=1m \
--proto=/ghz/protos/comrade.proto \
--name=${SCOPE} \
--call=comrade.test.proto.Comrade.isComrade \
${RESTRICT_MODE} 0.0.0.0:${SERVER_PORT}