Skip to content

Commit 4dee53e

Browse files
authored
Add K8s generator (#62)
Co-authored-by: Alexander Stoklasa <[email protected]>
1 parent 7cd6aa2 commit 4dee53e

File tree

20 files changed

+1039
-5
lines changed

20 files changed

+1039
-5
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44
.history/
55

66
# Built Visual Studio Code Extensions
7-
*.vsix
7+
*.vsix
8+
# Ignore local venv environment
9+
.venv
10+
# Ignore mac os x .DS_Store files
11+
.DS_Store
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
#Simulated insurance application, will register the BTs listed under the Web-frontend tier.
2+
#Note - some additional BTs will register during the first few runs, you should view # of calls and exclude accordingly.
3+
#Performance Issue 1 - 500 Error on /homepage BT will happen 10% of the time
4+
#Performance Issue 2 - Bad SQL Call & Slow execution on /processpolicy and /history BTs on 13% of calls
5+
#Performance Issue 3 - Slow web service call for selectquote on 37% of calls
6+
#TIP - You can run two versions of the script, upping the load and issues for one
7+
8+
services:
9+
web-frontend:
10+
type: java
11+
agent: yes
12+
endpoints:
13+
http:
14+
/login:
15+
- http://accountservices/account/login
16+
/homepage:
17+
- http://accountservices/account/home
18+
- cache,128
19+
/getquote:
20+
- http://accountservices/quote
21+
/submitquote:
22+
- http://accountservices/submitquote
23+
/history:
24+
- http://accountservices/policies
25+
/startclaim:
26+
- http://accountservices/startclaim
27+
/submitclaim:
28+
- http://accountservices/submitclaim
29+
/processpolicy:
30+
- http://accountservices/policies/process
31+
accountservices:
32+
type: java
33+
agent: yes
34+
endpoints:
35+
http:
36+
/account/login:
37+
- slow,323
38+
/account/home:
39+
- slow,524
40+
- call: error,500,Oops
41+
probability: 0.1
42+
/quote:
43+
- http://quotesengine/quote
44+
- http://quotesengine/query/quote
45+
/policies:
46+
- http://policymgt/query/policy
47+
/submitquote:
48+
- http://quotesengine/query/quote
49+
/startclaim:
50+
- http://claimservices/startclaim
51+
/submitclaim:
52+
- http://claimservices/submitclaim
53+
/policies/process:
54+
- http://policymgt/query/policy
55+
- http://policymgt/processpolicy
56+
claimservices:
57+
type: java
58+
agent: yes
59+
endpoints:
60+
http:
61+
/startclaim:
62+
- slow,725
63+
/submitclaim:
64+
- slow,623
65+
policymgt:
66+
type: java
67+
agent: yes
68+
port: 3007
69+
endpoints:
70+
http:
71+
/query/policy:
72+
- sql://policiesdb/policy?query=INSERT INTO policies(customer,coverage) VALUES('test',123)
73+
- call: slow,9435
74+
probability: 0.13
75+
/processpolicy:
76+
-call: slow,926
77+
policiesdb:
78+
type: mysql
79+
databases:
80+
policy:
81+
policies: [id, customer, coverage]
82+
quotesdb:
83+
type: mysql
84+
databases:
85+
quote:
86+
quotes: [id, customer, premium]
87+
quotesengine:
88+
type: java
89+
agent: yes
90+
port: 3008
91+
endpoints:
92+
http:
93+
/query/quote:
94+
- sql://quotesdb/quote?query=SELECT * FROM quotes
95+
/quote:
96+
- http://aggregator/aggregate
97+
aggregator:
98+
type: java
99+
agent: yes
100+
endpoints:
101+
http:
102+
/aggregate:
103+
- http://carinsurance/quote
104+
- http://policygenius/quote
105+
- http://selectquote/quote
106+
selectquote:
107+
type: nodejs
108+
agent: no
109+
endpoints:
110+
http:
111+
quote:
112+
- call: sleep, 4253
113+
schedule: "*/5 * * * *"
114+
probability: 0.37
115+
policygenius:
116+
type: nodejs
117+
agent: no
118+
endpoints:
119+
http:
120+
quote:
121+
- call: sleep, 75
122+
carinsurance:
123+
type: nodejs
124+
agent: no
125+
endpoints:
126+
http:
127+
quote:
128+
- call: sleep, 53
129+
130+
loaders:
131+
browser:
132+
type: curl
133+
wait: 15
134+
count: 5
135+
urls:
136+
- http://web-frontend/login
137+
- http://web-frontend/homepage
138+
- http://web-frontend/getquote
139+
- http://web-frontend/homepage
140+
- http://web-frontend/history
141+
- http://web-frontend/startclaim
142+
- http://web-frontend/submitclaim
143+
- http://web-frontend/processpolicy
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
#Simulated insurance application, will register the BTs listed under the Web-frontend tier.
2+
#Note - some additional BTs will register during the first few runs, you should view # of calls and exclude accordingly.
3+
#Performance Issue 1 - 500 Error on /homepage BT will happen 10% of the time
4+
#Performance Issue 2 - Bad SQL Call & Slow execution on /processpolicy and /history BTs on 13% of calls
5+
#Performance Issue 3 - Slow web service call for selectquote on 37% of calls
6+
#TIP - You can run two versions of the script, upping the load and issues for one
7+
apm:
8+
applicationName: AD-Insurance
9+
controller:
10+
accountName:
11+
accountAccessKey:
12+
eventsService:
13+
globalAccountName:
14+
15+
services:
16+
web-frontend:
17+
type: java
18+
port: 8888
19+
agent: yes
20+
endpoints:
21+
http:
22+
/login:
23+
- http://accountservices/account/login
24+
/homepage:
25+
- http://accountservices/account/home
26+
- cache,128
27+
/getquote:
28+
- http://accountservices/quote
29+
/submitquote:
30+
- http://accountservices/submitquote
31+
/history:
32+
- http://accountservices/policies
33+
/startclaim:
34+
- http://accountservices/startclaim
35+
/submitclaim:
36+
- http://accountservices/submitclaim
37+
/processpolicy:
38+
- http://accountservices/policies/process
39+
/healthz:
40+
- slow,524
41+
- call: error,500,Oops
42+
probability: 0.1
43+
accountservices:
44+
agent: yes
45+
type: java
46+
endpoints:
47+
http:
48+
/account/login:
49+
- slow,323
50+
/account/home:
51+
- slow,524
52+
- call: error,500,Oops
53+
probability: 0.1
54+
/quote:
55+
- http://quotesengine/quote
56+
- http://quotesengine/query/quote
57+
/policies:
58+
- http://policymgt/query/policy
59+
/submitquote:
60+
- http://quotesengine/query/quote
61+
/startclaim:
62+
- http://claimservices/startclaim
63+
/submitclaim:
64+
- http://claimservices/submitclaim
65+
/policies/process:
66+
- http://policymgt/query/policy
67+
- http://policymgt/processpolicy
68+
claimservices:
69+
type: java
70+
agent: yes
71+
endpoints:
72+
http:
73+
/startclaim:
74+
- slow,725
75+
/submitclaim:
76+
- slow,623
77+
policymgt:
78+
type: java
79+
agent: yes
80+
port: 3007
81+
endpoints:
82+
http:
83+
/query/policy:
84+
- sql://policiesdb/policy?query=INSERT INTO policies(customer,coverage) VALUES(test,123)
85+
- call: slow,9435
86+
probability: 0.13
87+
/processpolicy:
88+
-call: slow,926
89+
quotesengine:
90+
type: java
91+
agent: yes
92+
port: 3008
93+
endpoints:
94+
http:
95+
/query/quote:
96+
- sql://quotesdb/quote?query=SELECT * FROM quotes
97+
/quote:
98+
- http://aggregator/aggregate
99+
aggregator:
100+
type: java
101+
agent: yes
102+
endpoints:
103+
http:
104+
/aggregate:
105+
- http://carinsurance/quote
106+
- http://policygenius/quote
107+
- http://selectquote/quote
108+
selectquote:
109+
type: java
110+
agent: no
111+
endpoints:
112+
http:
113+
quote:
114+
- call: sleep, 4253
115+
schedule: "*/5 * * * *"
116+
probability: 0.37
117+
policygenius:
118+
type: java
119+
agent: no
120+
endpoints:
121+
http:
122+
quote:
123+
- call: sleep, 75
124+
carinsurance:
125+
type: java
126+
agent: no
127+
endpoints:
128+
http:
129+
quote:
130+
- call: sleep, 53
131+
132+
loaders:
133+
browser:
134+
type: puppeteer
135+
wait: 15
136+
count: 5
137+
urls:
138+
- http://web-frontend/login
139+
- http://web-frontend/homepage
140+
- http://web-frontend/getquote
141+
- http://web-frontend/homepage
142+
- http://web-frontend/history
143+
- http://web-frontend/startclaim
144+
- http://web-frontend/submitclaim
145+
- http://web-frontend/processpolicy
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
services:
2+
service-a:
3+
type: java
4+
endpoints:
5+
http:
6+
/call/a:
7+
- slow,256
8+
/call/b:
9+
- http://service-b/call/b
10+
/call/c:
11+
- http://service-b/call/c
12+
service-b:
13+
type: java
14+
endpoints:
15+
http:
16+
/call/error:
17+
- slow,256
18+
/call/b:
19+
- slow,256
20+
/call/c:
21+
- http://service-c/call/c
22+
service-c:
23+
type: java
24+
endpoints:
25+
http:
26+
/call/error:
27+
- slow,256
28+
- call: error,500,Oops
29+
probability: 0.5
30+
/call/c:
31+
- slow,256
32+
loaders:
33+
browser:
34+
type: curl
35+
wait: 15
36+
count: 5
37+
urls:
38+
- http://service-a/call/a
39+
- http://service-a/call/b
40+
- http://service-a/call/c
41+
- http://service-b/call/error
42+
- http://service-c/call/error

0 commit comments

Comments
 (0)