File: h2load-smp.sh

package info (click to toggle)
libwebsockets 4.3.5-3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 31,404 kB
  • sloc: ansic: 194,409; javascript: 1,550; sh: 1,387; cpp: 505; java: 461; perl: 405; xml: 118; makefile: 76; awk: 5
file content (63 lines) | stat: -rwxr-xr-x 943 bytes parent folder | download | duplicates (4)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
#
# run from the build dir

echo
echo "----------------------------------------------"
echo "-------   tests: h2load SMP"
echo

PW=`pwd`

cd ../minimal-examples/http-server/minimal-http-server-smp
$PW/bin/lws-minimal-http-server-smp -s &
R=$!
sleep 0.5s

# check h1 with various loads

h2load -n 10000 -c 1 --h1 https://127.0.0.1:7681
if [ $? -ne 0 ] ; then
	Q=$?
	kill $R
	wait $R
	exit $Q
fi
h2load -n 10000 -c 10 --h1 https://127.0.0.1:7681
if [ $? -ne 0 ] ; then
	Q=$?
	kill $R
	wait $R
	exit $Q
fi
h2load -n 100000 -c 100 --h1 https://127.0.0.1:7681
if [ $? -ne 0 ] ; then
	Q=$?
	kill $R
	wait $R
	exit $Q
fi

# check h2 with various loads

h2load -n 10000 -c 1 https://127.0.0.1:7681
if [ $? -ne 0 ] ; then
	Q=$?
	kill $R
	wait $R
	exit $Q
fi
h2load -n 10000 -c 10 https://127.0.0.1:7681
if [ $? -ne 0 ] ; then
	Q=$?
	kill $R
	wait $R
	exit $Q
fi
h2load -n 100000 -c 100 https://127.0.0.1:7681
Q=$?

kill $R
wait $R
exit $Q