Skip to content

Commit 9dee403

Browse files
committed
Simplified the provider names in example
1 parent 3e25a9a commit 9dee403

File tree

1 file changed

+33
-40
lines changed

1 file changed

+33
-40
lines changed

examples/provider_spread.yaml

+33-40
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
vars:
44
port: "${PORT}"
5-
createName: 'test:loadtest-'
65
groupRate: 1
76
imagesPerGroup: 10
87

@@ -13,23 +12,19 @@ load_pattern:
1312
over: 5s
1413

1514
providers:
16-
group_range: # Counter for creating groups
15+
a: # Counter for creating groups
1716
range: {}
18-
image_range: # counter for creating images to put in groups
17+
x: # counter for creating images to put in groups
1918
range: {}
20-
group_created: # to continue the group APIs
19+
b: # to continue the group APIs
2120
response: {}
22-
group_created_for_images: # to create images
21+
b2: # to create images
2322
response: {}
24-
image_created: # to continue the image APIs
23+
y: # to continue the image APIs
2524
response: {}
26-
group_create_data:
25+
c:
2726
response: {}
28-
image_create_data:
29-
response: {}
30-
group_update_data:
31-
response: {}
32-
image_update_data:
27+
z:
3328
response: {}
3429

3530
loggers:
@@ -42,15 +37,14 @@ endpoints:
4237
tags:
4338
type: create group
4439
body: '{
45-
"id":"${createName}${start_pad(group_range, 6, "0")}",
46-
"name":"TEST-GROUP"
40+
"a":"${start_pad(a, 6, "0")}"
4741
}'
4842
provides:
49-
group_created:
50-
select: response.body.id
43+
b:
44+
select: response.body.a
5145
where: response.status == 200 || response.status == 409
52-
group_created_for_images:
53-
select: response.body.id
46+
b2:
47+
select: response.body.a
5448
for_each:
5549
- repeat(imagesPerGroup) # We need to create X copies so each image will have one
5650
where: response.status == 200 || response.status == 409
@@ -61,15 +55,14 @@ endpoints:
6155
tags:
6256
type: create image
6357
body: '{
64-
"id":"${createName}${start_pad(image_range, 8, "0")}",
65-
"groupId":"${group_created_for_images}",
66-
"name":"TEST-IMAGE"
58+
"x":"${start_pad(x, 8, "0")}",
59+
"b":"${b2}"
6760
}'
6861
provides:
69-
image_created:
62+
y:
7063
select:
71-
id: response.body.id
72-
groupId: response.body.groupId
64+
x: response.body.x
65+
b: response.body.b
7366
where: response.status == 200 || response.status == 409
7467
peak_load: ${groupRate * imagesPerGroup}hps # Needs to be a higher rate to keep up with groups
7568

@@ -78,14 +71,14 @@ endpoints:
7871
tags:
7972
type: create group data
8073
body: '{
81-
"id":"${group_created}",
74+
"b":"${b}",
8275
"data":{
83-
"subdata":"TEST-DATA"
76+
"subdata":"A-DATA"
8477
}
8578
}'
8679
provides:
87-
group_create_data:
88-
select: group_created
80+
c:
81+
select: response.body.b
8982
where: response.status == 200
9083
peak_load: ${groupRate}hps
9184

@@ -94,41 +87,41 @@ endpoints:
9487
tags:
9588
type: create image
9689
body: '{
97-
"id":"${image_created.id}",
98-
"groupId":"${image_created.groupId}",
90+
"x":"${y.x}",
91+
"b":"${y.b}",
9992
"data":{
100-
"subdata":"TEST-DATA"
93+
"subdata":"X-DATA"
10194
}
10295
}'
10396
provides:
104-
image_create_data:
105-
select: image_created # Puts in the whole object (id and groupId)
97+
z:
98+
select: y # Puts in the whole object (id and groupId)
10699
where: response.status == 200
107100
peak_load: ${groupRate * imagesPerGroup}hps # Needs to be a higher rate to keep up with groups
108101

109102
- method: PUT
110103
url: http://localhost:${port}
111104
body: '{
112-
"id":"${group_create_data}",
105+
"c":"${c}",
113106
"data":{
114-
"subdata":"UPDATED-TEST-DATA"
107+
"subdata":"UPDATED-A-DATA"
115108
}
116109
}'
117110
peak_load: ${groupRate}hps
118111
logs:
119112
test:
120-
select: response.body.id
113+
select: response.body.c
121114

122115
- method: PUT
123116
url: http://localhost:${port}
124117
body: '{
125-
"id":"${image_create_data.id}",
126-
"groupId":"${image_create_data.groupId}",
118+
"x":"${z.x}",
119+
"b":"${z.b}",
127120
"data":{
128-
"subdata":"UPDATED-TEST-DATA"
121+
"subdata":"UPDATED-X-DATA"
129122
}
130123
}'
131124
peak_load: ${groupRate * imagesPerGroup}hps # Needs to be a higher rate to keep up with groups
132125
logs:
133126
test:
134-
select: response.body.id
127+
select: response.body.x

0 commit comments

Comments
 (0)