We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 912137f commit f606179Copy full SHA for f606179
tests/performance/consumer/baseline.js
@@ -63,5 +63,16 @@ export const options = {
63
{ target: 5, duration: "1m" },
64
],
65
},
66
+ searchPostDocumentReferenceByCategory: {
67
+ exec: "searchPostDocumentReferenceByCategory",
68
+ executor: "ramping-arrival-rate",
69
+ startRate: 1,
70
+ timeUnit: "1s",
71
+ preAllocatedVUs: 5,
72
+ stages: [
73
+ { target: 5, duration: "30s" },
74
+ { target: 5, duration: "1m" },
75
+ ],
76
+ },
77
78
};
tests/performance/consumer/client.js
@@ -123,3 +123,22 @@ export function searchPostDocumentReference() {
123
);
124
checkResponse(res);
125
}
126
+
127
+export function searchPostDocumentReferenceByCategory() {
128
+ const nhsNumber = NHS_NUMBERS[Math.floor(Math.random() * NHS_NUMBERS.length)];
129
+ const category = CATEGORIES[Math.floor(Math.random() * CATEGORIES.length)];
130
131
+ const body = JSON.stringify({
132
+ "subject:identifier": `https://fhir.nhs.uk/Id/nhs-number|${nhsNumber}`,
133
+ category: `http://snomed.info/sct|${category}`,
134
+ });
135
136
+ const res = http.post(
137
+ `https://${__ENV.HOST}/consumer/DocumentReference/_search`,
138
+ body,
139
+ {
140
+ headers: getHeaders(),
141
+ }
142
+ );
143
+ checkResponse(res);
144
+}
tests/performance/consumer/soak.js
@@ -47,12 +47,13 @@ export const options = {
47
searchDocumentReferenceByCategory: {
48
exec: "searchDocumentReferenceByCategory",
49
executor: "ramping-arrival-rate",
50
- startRate: 1,
+ startRate: 0,
51
timeUnit: "1s",
52
preAllocatedVUs: 5,
53
stages: [
54
- { target: 5, duration: "30s" },
55
- { target: 5, duration: "1m" },
+ { target: 10, duration: "5m" },
+ { target: 10, duration: "30m" },
56
+ { target: 0, duration: "1m" },
57
58
59
searchPostDocumentReference: {
@@ -67,5 +68,17 @@ export const options = {
{ target: 0, duration: "1m" },
79
80
81
82
83
84
tests/performance/consumer/stress.js
@@ -37,13 +37,11 @@ export const options = {
37
38
39
40
- executor: "ramping-arrival-rate",
41
42
- timeUnit: "1s",
43
- preAllocatedVUs: 5,
+ executor: "ramping-vus",
+ startVUs: 1,
44
45
46
+ { target: 10, duration: "30s" },
+ { target: 10, duration: "1m" },
@@ -55,5 +53,14 @@ export const options = {
{ target: 10, duration: "1m" },
60
61
62
tests/performance/process_results.py
@@ -80,7 +80,7 @@ def _create_response_count_figure(data: dict, title: str):
fig_labels.add(f"Failure - Status Code {failure.status}")
for index, scenario in enumerate(data.keys()):
- axes = fig.add_subplot(2, 2, index + 1)
+ axes = fig.add_subplot(3, 3, index + 1)
scenario_data = data[scenario]
85
86
timestamps = []
@@ -149,7 +149,7 @@ def _create_response_time_figure(data: dict, title: str):
149
fig.suptitle(title)
150
151
152
153
154
155
0 commit comments