1
1
#! /bin/bash
2
+ # shellcheck disable=SC2086,SC2178,SC1091,SC2004
3
+
4
+ # VM: ubuntu-s-1vcpu-2gb-fra1-01
5
+
6
+ # SETUP
7
+ sudo apt-get update
8
+ sudo apt-get install \
9
+ apt-transport-https \
10
+ ca-certificates \
11
+ curl \
12
+ gnupg-agent \
13
+ software-properties-common
14
+ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
15
+ sudo apt-key fingerprint 0EBFCD88
16
+ sudo add-apt-repository \
17
+ " deb [arch=amd64] https://download.docker.com/linux/ubuntu \
18
+ $( lsb_release -cs) \
19
+ stable"
20
+ sudo apt-get update
21
+ sudo apt-get install docker-ce docker-ce-cli containerd.io
22
+ sudo curl -L " https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$( uname -s) -$( uname -m) " -o /usr/local/bin/docker-compose
23
+ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
24
+ sudo apt-get install -y nodejs
25
+
26
+ # RUN
2
27
npm install artillery
3
- docker-compose -f docker-compose.test.yml up
28
+ docker-compose -f docker-compose.test.yml up -d
29
+
4
30
echo " ARTILLERY - NGINX"
5
- ./node_modules/.bin/artillery run test/artillery-nginx.yml
31
+ ./node_modules/.bin/artillery run test/artillery-nginx.yml > artillery.nginx.1.txt
6
32
echo " ARTILLERY - NGINX-LUA"
7
- ./node_modules/.bin/artillery run test/artillery-nginx-lua.yml
33
+ ./node_modules/.bin/artillery run test/artillery-nginx-lua.yml > artillery.nginx-lua.1.txt
8
34
echo " ARTILLERY - OPENRESTY"
9
- ./node_modules/.bin/artillery run test/artillery-openresty.yml
35
+ ./node_modules/.bin/artillery run test/artillery-openresty.yml > artillery.openresty.1.txt
36
+
37
+ echo " ARTILLERY - NGINX"
38
+ ./node_modules/.bin/artillery run test/artillery-nginx.yml > artillery.nginx.2.txt
39
+ echo " ARTILLERY - NGINX-LUA"
40
+ ./node_modules/.bin/artillery run test/artillery-nginx-lua.yml > artillery.nginx-lua.2.txt
41
+ echo " ARTILLERY - OPENRESTY"
42
+ ./node_modules/.bin/artillery run test/artillery-openresty.yml > artillery.openresty.2.txt
43
+
44
+ echo " ARTILLERY - NGINX"
45
+ ./node_modules/.bin/artillery run test/artillery-nginx.yml > artillery.nginx.3.txt
46
+ echo " ARTILLERY - NGINX-LUA"
47
+ ./node_modules/.bin/artillery run test/artillery-nginx-lua.yml > artillery.nginx-lua.3.txt
48
+ echo " ARTILLERY - OPENRESTY"
49
+ ./node_modules/.bin/artillery run test/artillery-openresty.yml > artillery.openresty.3.txt
50
+
51
+ echo " ARTILLERY - NGINX"
52
+ ./node_modules/.bin/artillery run test/artillery-nginx.yml > artillery.nginx.4.txt
53
+ echo " ARTILLERY - NGINX-LUA"
54
+ ./node_modules/.bin/artillery run test/artillery-nginx-lua.yml > artillery.nginx-lua.4.txt
55
+ echo " ARTILLERY - OPENRESTY"
56
+ ./node_modules/.bin/artillery run test/artillery-openresty.yml > artillery.openresty.4.txt
57
+
58
+ echo " ARTILLERY - NGINX"
59
+ ./node_modules/.bin/artillery run test/artillery-nginx.yml > artillery.nginx.5.txt
60
+ echo " ARTILLERY - NGINX-LUA"
61
+ ./node_modules/.bin/artillery run test/artillery-nginx-lua.yml > artillery.nginx-lua.5.txt
62
+ echo " ARTILLERY - OPENRESTY"
63
+ ./node_modules/.bin/artillery run test/artillery-openresty.yml > artillery.openresty.5.txt
64
+
65
+ # ####
66
+
67
+ echo " ARTILLERY - ALPINE"
68
+ ./node_modules/.bin/artillery run test/artillery-alpine.yml > artillery.alpine.1.txt
69
+ echo " ARTILLERY - UBUNTU"
70
+ ./node_modules/.bin/artillery run test/artillery-ubuntu.yml > artillery.ubuntu.1.txt
71
+ echo " ARTILLERY - DEBIAN"
72
+ ./node_modules/.bin/artillery run test/artillery-debian.yml > artillery.debian.1.txt
73
+ echo " ARTILLERY - FEDORA"
74
+ ./node_modules/.bin/artillery run test/artillery-fedora.yml > artillery.fedora.1.txt
75
+ echo " ARTILLERY - CENTOS"
76
+ ./node_modules/.bin/artillery run test/artillery-centos.yml > artillery.centos.1.txt
77
+
78
+ echo " ARTILLERY - ALPINE"
79
+ ./node_modules/.bin/artillery run test/artillery-alpine.yml > artillery.alpine.2.txt
80
+ echo " ARTILLERY - UBUNTU"
81
+ ./node_modules/.bin/artillery run test/artillery-ubuntu.yml > artillery.ubuntu.2.txt
82
+ echo " ARTILLERY - DEBIAN"
83
+ ./node_modules/.bin/artillery run test/artillery-debian.yml > artillery.debian.2.txt
84
+ echo " ARTILLERY - FEDORA"
85
+ ./node_modules/.bin/artillery run test/artillery-fedora.yml > artillery.fedora.2.txt
86
+ echo " ARTILLERY - CENTOS"
87
+ ./node_modules/.bin/artillery run test/artillery-centos.yml > artillery.centos.2.txt
88
+
89
+ echo " ARTILLERY - ALPINE"
90
+ ./node_modules/.bin/artillery run test/artillery-alpine.yml > artillery.alpine.3.txt
91
+ echo " ARTILLERY - UBUNTU"
92
+ ./node_modules/.bin/artillery run test/artillery-ubuntu.yml > artillery.ubuntu.3.txt
93
+ echo " ARTILLERY - DEBIAN"
94
+ ./node_modules/.bin/artillery run test/artillery-debian.yml > artillery.debian.3.txt
95
+ echo " ARTILLERY - FEDORA"
96
+ ./node_modules/.bin/artillery run test/artillery-fedora.yml > artillery.fedora.3.txt
97
+ echo " ARTILLERY - CENTOS"
98
+ ./node_modules/.bin/artillery run test/artillery-centos.yml > artillery.centos.3.txt
99
+
100
+ echo " ARTILLERY - ALPINE"
101
+ ./node_modules/.bin/artillery run test/artillery-alpine.yml > artillery.alpine.4.txt
102
+ echo " ARTILLERY - UBUNTU"
103
+ ./node_modules/.bin/artillery run test/artillery-ubuntu.yml > artillery.ubuntu.4.txt
104
+ echo " ARTILLERY - DEBIAN"
105
+ ./node_modules/.bin/artillery run test/artillery-debian.yml > artillery.debian.4.txt
106
+ echo " ARTILLERY - FEDORA"
107
+ ./node_modules/.bin/artillery run test/artillery-fedora.yml > artillery.fedora.4.txt
108
+ echo " ARTILLERY - CENTOS"
109
+ ./node_modules/.bin/artillery run test/artillery-centos.yml > artillery.centos.4.txt
110
+
111
+ echo " ARTILLERY - ALPINE"
112
+ ./node_modules/.bin/artillery run test/artillery-alpine.yml > artillery.alpine.5.txt
113
+ echo " ARTILLERY - UBUNTU"
114
+ ./node_modules/.bin/artillery run test/artillery-ubuntu.yml > artillery.ubuntu.5.txt
115
+ echo " ARTILLERY - DEBIAN"
116
+ ./node_modules/.bin/artillery run test/artillery-debian.yml > artillery.debian.5.txt
117
+ echo " ARTILLERY - FEDORA"
118
+ ./node_modules/.bin/artillery run test/artillery-fedora.yml > artillery.fedora.5.txt
119
+ echo " ARTILLERY - CENTOS"
120
+ ./node_modules/.bin/artillery run test/artillery-centos.yml > artillery.centos.5.txt
121
+
122
+ echo Nginx
123
+ TESTS=$( grep -r virtual docs/benchmark/reports/different_images/* nginx.* -A10 | grep ' median' | sed ' s/.*: //' | sort -n | tail -n4 | head -n3 | tr ' \n' ' +' )
124
+ echo " scale=2; (${TESTS% ?} )/3" | bc
125
+ echo Nginx-Lua
126
+ TESTS=$( grep -r virtual docs/benchmark/reports/different_images/* nginx-lua* -A10 | grep ' median' | sed ' s/.*: //' | sort -n | tail -n4 | head -n3 | tr ' \n' ' +' )
127
+ echo " scale=2; (${TESTS% ?} )/3" | bc
128
+ echo OpenResty
129
+ TESTS=$( grep -r virtual docs/benchmark/reports/different_images/* openresty* -A10 | grep ' median' | sed ' s/.*: //' | sort -n | tail -n4 | head -n3 | tr ' \n' ' +' )
130
+ echo " scale=2; (${TESTS% ?} )/3" | bc
131
+
132
+ echo Alpine
133
+ TESTS=$( grep -r virtual docs/benchmark/reports/distros/* alpine* -A10 | grep ' median' | sed ' s/.*: //' | sort -n | tail -n4 | head -n3 | tr ' \n' ' +' )
134
+ echo " scale=2; (${TESTS% ?} )/3" | bc
135
+ echo Ubuntu
136
+ TESTS=$( grep -r virtual docs/benchmark/reports/distros/* ubuntu* -A10 | grep ' median' | sed ' s/.*: //' | sort -n | tail -n4 | head -n3 | tr ' \n' ' +' )
137
+ echo " scale=2; (${TESTS% ?} )/3" | bc
138
+ echo Debian
139
+ TESTS=$( grep -r virtual docs/benchmark/reports/distros/* debian* -A10 | grep ' median' | sed ' s/.*: //' | sort -n | tail -n4 | head -n3 | tr ' \n' ' +' )
140
+ echo " scale=2; (${TESTS% ?} )/3" | bc
141
+ echo Fedora
142
+ TESTS=$( grep -r virtual docs/benchmark/reports/distros/* fedora* -A10 | grep ' median' | sed ' s/.*: //' | sort -n | tail -n4 | head -n3 | tr ' \n' ' +' )
143
+ echo " scale=2; (${TESTS% ?} )/3" | bc
144
+ echo Centos
145
+ TESTS=$( grep -r virtual docs/benchmark/reports/distros/* centos* -A10 | grep ' median' | sed ' s/.*: //' | sort -n | tail -n4 | head -n3 | tr ' \n' ' +' )
146
+ echo " scale=2; (${TESTS% ?} )/3" | bc
0 commit comments