...
DHIS2 | FHIR | DHIS2 vs FHIR % | ||
---|---|---|---|---|
Average | 0.552877 559433 | 0.552823559633 | 100-5.84614751 |
Test detailed results
logged on Nov 2229/ 2022 UTC-7 2008:5035:00
Performance Testing for | Attempt | DHIS2 API | FHIR API | FHIR API (with HealthcareServices), | Improvement |
---|
% |
---|
El Salvador | Attempt - 1 | 0. |
519845 | 0. |
49418 | 0. |
562221 |
4. |
93705 | ||
Attempt - 2 | 0. |
57532 | 0. |
424411 | 0. |
454275 |
26. |
2304 | ||
Attempt - 3 | 0. |
54541 | 0. |
4306 | 0. |
445373 |
112.765
Average
0.526901
0.463208
0.491861
113.856
21.0502 | ||
Kenya | Attempt - 1 | 0. |
649501 | 0. |
616995 | 0. |
613571 |
5. |
00477 | ||
Attempt - 2 | 0. |
681508 | 0. |
559262 | 0. |
577607 |
17. |
9376 | ||
Attempt - 3 | 0. |
663324 | 0. |
57675 | 0. |
61023 |
115.895
Average
0.668913
0.566106
0.665437
13.0515 | ||
Nigeria | Attempt - 1 | 0. |
52902 | 0. |
599715 | 0. |
629629 |
-13. |
3634 | ||
Attempt - 2 | 0. |
536094 | 0. |
579989 | 0. |
68599 |
-8. |
18793 | ||
Attempt - 3 | 0. |
588082 | 0. |
579535 | 0. |
60863 |
89.0077
Average
0.537195
0.583614
0.739619
1.45337 | ||
Cameroon | Attempt - 1 | 0. |
371575 | 0. |
63747 | 0. |
606542 |
-71. |
5589 | ||
Attempt - 2 | 0. |
371396 | 0. |
566286 | 0. |
588483 |
-52. |
475 | ||
Attempt - 3 | 0. |
363826 | 0. |
571734 | 0. |
582228 |
61.3056
Average
0.370299
0.583081
0.705694
-57.1449 | ||
Nepal | Attempt - 1 | 0. |
675976 | 0. |
604182 | 0. |
593038 |
10. |
6208 | ||
Attempt - 2 | 0. |
651016 | 0. |
590685 | 0. |
672721 |
9. |
26721 | ||
Attempt - 3 | 0. |
669601 | 0. |
562703 | 0. |
57227 |
112.048
Average
0.66108
0.568108
0.717514
116.481
15.9644 | ||
Overall Average | 0. |
559433 | 0. |
559633 | 0. |
586854 |
100.846
...
-5.14751 |
Code Block | ||||
---|---|---|---|---|
| ||||
##Case 1
case_1_results = [{"description": "Performance Testing for", "attempt": "Attempt", "dhis2": "DHIS2 API", "fhir": "FHIR API", "fhir_with_healthcareServices": "FHIR API (with HealthcareServices),", "improvement":"Improvement %"}]
print("Case #1 - Getting 500 orgUnits/Location in the country (by ISO)")
|
...
improvements = |
...
[] |
...
dhis2_ |
...
performances = |
...
[] fhir_ |
...
hsc_ |
...
performances = |
...
[] |
...
fhir_ |
...
performances = |
...
[] for country in countries: |
...
|
...
|
...
|
...
for i in range(1,4): case_1_result = {} if i == 1: case_1_result['description'] = "{}".format(country['name']) case_1_result['attempt'] = "Attempt - {}".format(i) dhis2_url = dhis2_base_url+'iso2={}&number=500'.format(country['code']) result = requests.get(dhis2_url, auth=dhis2_auth) if result.status_code == 200: dhis2_performances.append(result.elapsed.total_seconds()) case_1_result['dhis2'] = |
...
dhis2_performances[-1] request_url = fhir_location_url+'address-country={}&_count=500'.format(country['name']) fhirResult = requests.get(request_url, auth=fhir_auth) if fhirResult.status_code == 200: fhir_performances.append(fhirResult.elapsed.total_seconds()) case_1_result['fhir'] = |
...
fhir_performances[-1] request_healthcare_url = fhir_location_url+'address-country={}&_count=500&_revinclude=HealthcareService:location'.format(country['name']) fhirHealthcareServicesResult = requests.get(request_healthcare_url, auth=fhir_auth) if fhirHealthcareServicesResult.status_code == 200: |
...
fhir_ |
...
hsc_performances.append(fhirHealthcareServicesResult.elapsed.total_seconds()) |
...
|
...
case_1_result[' |
...
fhir_with_healthcareServices'] = fhir_hsc_performances[-1] |
...
|
...
|
...
improvements. |
...
append(((case_1_result[' |
...
dhis2'] |
...
- case_1_result[' |
...
fhir'] |
...
) / case_1_result[' |
...
dhis2'])*100) |
...
|
...
|
...
|
...
case_1_result[' |
...
improvement'] = |
...
improvements[-1] case_1_results.append(case_1_result) |
...
|
...
|
...
|
...
|
...
time.sleep(0.01) case_1_result = {} case_1_result['description'] = "Overall Average" case_1_result['dhis2'] = Average(dhis2_ |
...
performances) case_1_result['fhir'] = Average(fhir_ |
...
performances) case_1_result['fhir_with_healthcareServices'] = Average(fhir_ |
...
hsc_performances) case_1_result['improvement'] = |
...
Average(improvements) case_1_results.append(case_1_result) print(tabulate(case_1_results, headers='firstrow', tablefmt=' |
...
pipe')) |