forked from PATH-Global-Health/MERindicators
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_runperf.sh
28 lines (22 loc) · 1.05 KB
/
_runperf.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
export HEADER="Content-Type: application/fhir+json"
printf "\nrun pings to see latency of overall r/t links\n"
for i in {0..4}
do
ping -c 1 http://smarthapi.intellisoftkenya.com | grep "round-trip"
done
printf "\nrun existing version of measure\n"
printf "\'real' is wall time including link latency\n"
for i in {0..9}
do
time curl -s -X GET 'http://smarthapi.intellisoftkenya.com:8080/fhir/Measure/KEMRTXCURR/$evaluate-measure?periodStart=2023-01-01&periodEnd=2023-07-31' > /dev/null
done
# printf "\npost new cql/library resources to server\n"
# post transaction bundle of PUT entries for conformance and cql/libary, measure
time curl -s -X POST -H "$HEADER" --data @output/Bundle-KEMRBundle.json http://smarthapi.intellisoftkenya.com:8080/fhir > /dev/null
printf "\nrun new version of measure\n"
printf "\'real' is wall time including link latency\n"
for i in {0..9}
do
time curl -s -X GET 'http://smarthapi.intellisoftkenya.com:8080/fhir/Measure/KEMRTXCURR/$evaluate-measure?periodStart=2023-01-01&periodEnd=2023-07-31' > /dev/null
done