Finding Specific orgUnits / Location by area and SubArea
Searching for specific outlets or locations that exists in the specific area and subareas.
Summary of test results
DHIS2 | FHIR | DHIS2 vs FHIR % | ||
---|---|---|---|---|
Average | 0.460583 | 0.305799 | 33.6063 |
Test detailed results
logged on Nov 29/ 2022 UTC-7 09:07:00
Performance Testing for finding | Attempt | DHIS2 API (s) | FHIR API (s) | Improvement (%) |
---|---|---|---|---|
El Salvador, Santa Ana, Santa Ana | Attempt 1 | 0.500818 | 0.359716 | 28.1743 |
Attempt 2 | 0.491777 | 0.353378 | 28.1426 | |
Attempt 3 | 0.501194 | 0.364875 | 27.1988 | |
Kenya, Nairobi, Dagoretti North | Attempt 1 | 0.514793 | 0.285152 | 44.6084 |
Attempt 2 | 0.501061 | 0.278943 | 44.3295 | |
Attempt 3 | 0.505827 | 0.28871 | 42.9232 | |
Nigeria, Kaduna State, Ifedayo LGA | Attempt 1 | 0.345526 | 0.291971 | 15.4996 |
Attempt 2 | 0.326727 | 0.275393 | 15.7116 | |
Attempt 3 | 0.330137 | 0.296474 | 10.1967 | |
Nepal, Banepa, Banepa | Attempt 1 | 0.503351 | 0.301019 | 40.197 |
Attempt 2 | 0.505373 | 0.285749 | 43.4578 | |
Attempt 3 | 0.500418 | 0.288203 | 42.4075 | |
Overall Average | 0.460583 | 0.305799 | 33.6063 |
Testing Script
## Case #4 results4 = [{"description": "Performance Testing for finding","attempt": "Attempt", "dhis2": "DHIS2 API (s)", "fhir": "FHIR API (s)", "improvement": "Improvement (%)"}] print("Case #4 - Measuring time taken to find outlets in area & subArea") improvements = [] dhis2_performances = [] fhir_performances = [] for country in countries: if country['name'] != "Cameroon": for i in range (1,4): result4 = {} if i == 1: result4['description'] = "{}, {}, {}".format(country['name'], country['area'], country['subArea']) result4['attempt'] = "Attempt {}".format(i) dhis2_url = dhis2_base_url+'area={}&areaSub={}'.format(country['area'], country['subArea']) result = requests.get(dhis2_url, auth=dhis2_auth) if result.status_code == 200: dhis2_performances.append(result.elapsed.total_seconds()) result4['dhis2'] = dhis2_performances[-1] request_url = fhir_location_url+'address={}&address-city={}&_count=500'.format(country['area'], country['subArea']) fhirResult = requests.get(request_url, auth=fhir_auth) if fhirResult.status_code == 200: fhir_performances.append(fhirResult.elapsed.total_seconds()) result4['fhir'] = fhir_performances[-1] improvements.append(((dhis2_performances[-1] - fhir_performances[-1])/dhis2_performances[-1])*100) result4['improvement'] = improvements[-1] results4.append(result4) time.sleep(0.01) result4 = {} result4['description'] = "Overall Average" result4['dhis2'] = Average(dhis2_performances) result4['fhir'] = Average(fhir_performances) result4['improvement'] = ((result4['dhis2'] - result4['fhir'])/result4['dhis2'])*100 results4.append(result4) print(tabulate(results4, headers='firstrow', tablefmt='pipe'))