Skip to content

Commit c85647a

Browse files
authored
Dotnet perf (#111)
* Changed to perf scripts and data Signed-off-by: Joe Batt <[email protected]> * Changed to perf scripts and data Signed-off-by: Joe Batt <[email protected]> Signed-off-by: Joe Batt <[email protected]>
1 parent 456d359 commit c85647a

15 files changed

+20
-29
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
*.dcm
2-
31
# Byte-compiled / optimized / DLL files
42
__pycache__/
53
*.py[cod]

performance-testing/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,12 @@ cd performance-testing/k6
169169
```
170170

171171
```bash
172-
k6 run -e CONFIG=config/benchmarkConfig.json -e URL={url} -e DICOM_MODALITY={modality} dicom/dicom_benchmark.js --insecure-skip-tls-verify
172+
k6 run -e CONFIG=config/benchmarkConfig.json -e URL={url} -e DICOM_MODALITY={modality} -e WF_AET={AET} dicom/dicom_benchmark.js --insecure-skip-tls-verify
173173
```
174174

175175
> **url** is to be replaced by dotnet-performance-app url
176176
> **modality** is to be replaced by either CT, RF, US or MR
177+
> **AET** is to be replaced by the Calling AET to be sent with the association. 1 triggers a workflow and 1 does not
177178
178179
#### Investigating Metrics ####
179180
##### MONAI Informatics Gateway #####
@@ -218,10 +219,11 @@ Average and Peak load times are displayed as below. These tests are most valuabl
218219
cd k6
219220
```
220221
```bash
221-
k6 run -e CONFIG=config/{config}.json URL={url} dicom/dicom_peak_avg.js --insecure-skip-tls-verify
222+
k6 run -e CONFIG=config/{config}.json -e URL={url} -e WF_AET={AET} -e NO_WF_AET{AET} dicom/dicom_peak_avg.js --insecure-skip-tls-verify
222223
```
223224
> **url** is to be replaced by dotnet-performance-app url
224225
> **config** is to be replaced by either avgConfig.json or peakConfig.json
226+
> **AET** is to be replaced by the Calling AET to be sent with the association. 1 triggers a workflow and 1 does not
225227
226228
#### Investigating Metrics ####
227229
##### MONAI Informatics Gateway #####
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

performance-testing/k6/dicom/config/avgConfig.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
{
2-
"remote_modalities":{
3-
"workflow_AET": "PERFWF",
4-
"no_workflow_AET": "PERFNOWF"
5-
},
62
"lowerThinkTime": 60,
73
"upperThinkTime": 120,
84
"ct": {

performance-testing/k6/dicom/config/benchmarkConfig.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
{
2-
"remote_modalities":{
3-
"workflow_AET": "PERFWF",
4-
"no_workflow_AET": "PERFNOWF"
5-
},
62
"benchmark": {
73
"vus": 1,
84
"iterations": 5,

performance-testing/k6/dicom/config/peakConfig.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
{
2-
"orthanc":{
3-
"workflow_modality": "monai",
4-
"no_workflow_modality": "monai_none"
5-
},
62
"lowerThinkTime": 60,
73
"upperThinkTime": 120,
84
"ct": {

performance-testing/k6/dicom/dicom_benchmark.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let config = getconfig();
1414

1515
const url = __ENV.URL;
1616
const dicom_modality = __ENV.DICOM_MODALITY
17-
const workflow_AET = config.remote_modalities.workflow_AET;
17+
const workflow_AET = __ENV.WF_AET;
1818

1919
export const options = {
2020
scenarios: {
@@ -29,9 +29,12 @@ export const options = {
2929
};
3030

3131
export function benchmark_workflow() {
32+
let res = http.get(`${url}/dicom?modality=${dicom_modality}&CalledAET=${workflow_AET}&CallingAET=${workflow_AET}`, { tags: { my_custom_tag: 'benchmark_workflow' } })
3233

33-
let res = http.get(`${url}/dicom?modality=${dicom_modality}&CalledAET=${workflow_AET}`, { tags: { my_custom_tag: 'benchmark_workflow' } })
34-
34+
if(res.status != 200){
35+
console.log(`status = ${res.status} and body = ${res.body}`)
36+
}
37+
3538
check(res, {
3639
'is status 200': (r) => r.status === 200
3740
})

performance-testing/k6/dicom/dicom_peak_avg.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ function getconfig() {
1414
let config = getconfig();
1515

1616
const url = __ENV.URL;
17-
const workflow_AET = config.remote_modalities.workflow_AET;
18-
const no_workflow_AET = config.remote_modalities.no_workflow_AET;
17+
const workflow_AET = __ENV.WF_AET;
18+
const no_workflow_AET = __ENV.NO_WF_AET;
1919
const lowerThinkTime = config.lowerThinkTime;
2020
const upperThinkTime = config.upperThinkTime;
2121
const ct_pacing = config.ct.pacing;
@@ -87,7 +87,7 @@ export const options = {
8787
export function ct_workflow() {
8888
var startTime = Date.now();
8989
sleep(randomIntBetween(lowerThinkTime, upperThinkTime)); // think time
90-
let res = http.get(`${url}/dicom?modality=CT&CalledAET=${workflow_AET}`, { tags: { my_custom_tag: 'ct_workflow' } })
90+
let res = http.get(`${url}/dicom?modality=CT&CalledAET=${workflow_AET}&CallingAET=${workflow_AET}`, { tags: { my_custom_tag: 'ct_workflow' } })
9191
check(res, {
9292
'is status 200': (r) => r.status === 200
9393
})
@@ -97,7 +97,7 @@ export function ct_workflow() {
9797
export function ct_no_workflow() {
9898
var startTime = Date.now();
9999
sleep(randomIntBetween(lowerThinkTime, upperThinkTime)); // think time
100-
let res = http.get(`${url}/dicom?modality=CT&CalledAET=${no_workflow_AET}`, { tags: { my_custom_tag: 'ct_no_workflow' } })
100+
let res = http.get(`${url}/dicom?modality=CT&CalledAET=${no_workflow_AET}&CallingAET=${no_workflow_AET}`, { tags: { my_custom_tag: 'ct_no_workflow' } })
101101
check(res, {
102102
'is status 200': (r) => r.status === 200
103103
})
@@ -107,7 +107,7 @@ export function ct_no_workflow() {
107107
export function mr_workflow() {
108108
var startTime = Date.now();
109109
sleep(randomIntBetween(lowerThinkTime, upperThinkTime)); // think time
110-
let res = http.get(`${url}/dicom?modality=MR&CalledAET=${workflow_AET}`, { tags: { my_custom_tag: 'mr_workflow' } })
110+
let res = http.get(`${url}/dicom?modality=MR&CalledAET=${workflow_AET}&CallingAET=${workflow_AET}`, { tags: { my_custom_tag: 'mr_workflow' } })
111111
check(res, {
112112
'is status 200': (r) => r.status === 200
113113
})
@@ -117,7 +117,7 @@ export function mr_workflow() {
117117
export function mr_no_workflow() {
118118
var startTime = Date.now();
119119
sleep(randomIntBetween(lowerThinkTime, upperThinkTime)); // think time
120-
let res = http.get(`${url}/dicom?modality=MR&CalledAET=${no_workflow_AET}`, { tags: { my_custom_tag: 'mr_no_workflow' } })
120+
let res = http.get(`${url}/dicom?modality=MR&CalledAET=${no_workflow_AET}&CallingAET=${no_workflow_AET}`, { tags: { my_custom_tag: 'mr_no_workflow' } })
121121
check(res, {
122122
'is status 200': (r) => r.status === 200
123123
})
@@ -127,7 +127,7 @@ export function mr_no_workflow() {
127127
export function us_workflow() {
128128
var startTime = Date.now();
129129
sleep(randomIntBetween(lowerThinkTime, upperThinkTime)); // think time
130-
let res = http.get(`${url}/dicom?modality=US&CalledAET=${workflow_AET}`, { tags: { my_custom_tag: 'us_workflow' } })
130+
let res = http.get(`${url}/dicom?modality=US&CalledAET=${workflow_AET}&CallingAET=${workflow_AET}`, { tags: { my_custom_tag: 'us_workflow' } })
131131
check(res, {
132132
'is status 200': (r) => r.status === 200
133133
})
@@ -137,7 +137,7 @@ export function us_workflow() {
137137
export function us_no_workflow() {
138138
var startTime = Date.now();
139139
sleep(randomIntBetween(lowerThinkTime, upperThinkTime)); // think time
140-
let res = http.get(`${url}/dicom?modality=US&CalledAET=${no_workflow_AET}`, { tags: { my_custom_tag: 'us_no_workflow' } })
140+
let res = http.get(`${url}/dicom?modality=US&CalledAET=${no_workflow_AET}&CallingAET=${no_workflow_AET}`, { tags: { my_custom_tag: 'us_no_workflow' } })
141141
check(res, {
142142
'is status 200': (r) => r.status === 200
143143
})
@@ -147,7 +147,7 @@ export function us_no_workflow() {
147147
export function rf_workflow() {
148148
var startTime = Date.now();
149149
sleep(randomIntBetween(lowerThinkTime, upperThinkTime)); // think time
150-
let res = http.get(`${url}/dicom?modality=RF&CalledAET=${workflow_AET}`, { tags: { my_custom_tag: 'rf_workflow' } })
150+
let res = http.get(`${url}/dicom?modality=RF&CalledAET=${workflow_AET}&CallingAET=${workflow_AET}`, { tags: { my_custom_tag: 'rf_workflow' } })
151151
check(res, {
152152
'is status 200': (r) => r.status === 200
153153
})
@@ -157,7 +157,7 @@ export function rf_workflow() {
157157
export function rf_no_workflow() {
158158
var startTime = Date.now();
159159
sleep(randomIntBetween(lowerThinkTime, upperThinkTime)); // think time
160-
let res = http.get(`${url}/dicom?modality=RF&CalledAET=${no_workflow_AET}`, { tags: { my_custom_tag: 'rf_no_workflow' } })
160+
let res = http.get(`${url}/dicom?modality=RF&CalledAET=${no_workflow_AET}&CallingAET=${no_workflow_AET}`, { tags: { my_custom_tag: 'rf_no_workflow' } })
161161
check(res, {
162162
'is status 200': (r) => r.status === 200
163163
})

0 commit comments

Comments
 (0)