Performance & stress testing for your FHIR server.
This is the first release to gauge the community interest and we'd love to hear your feedback on it. For feedback and known issues, see here.
First, prepare the server under test with sample data. Either upload all Synthea bundles yourself or do:
- Zip up all of the resource to upload with atool:
apack upload.zip performance-data/
- Upload zip with Vonkloader:
vonkloader -file:upload.zip -collectionHandling:Split -server:http://<my server>
- Install Python dependencies using
pip
(if you don't have it, install first):pip install influxdb jsonpath_rw statistics psutil pathlib fhirclient numpy monotonic
It's also possible to setup your own, private dashboard by hosting your own InfluxDB+Grafana and importing the dashboard used.
Run start_performance_test.sh
- parameters supported are:
--backend
(required): backend in use by target host (mongo
,postgres
,memory
,sqlite
, orsqlserver
)--host
(optional): system under test (eg.http://localhost
)--influxdb
(required): InfluxDB intake to sends results to (eg.http://grafana-locust-firely.westeurope.cloudapp.azure.com:9086
)--duration
(optional): customise how long to run each test for. By default, each test is run for 5mins. The format is that of the --run-time option of Locust itself, e.g. like '1h30m'
# example: run performance tests against localhost:4080
./start_performance_test.sh --backend mongo --host http://localhost:4080 --influxdb http://grafana-locust-firely.westeurope.cloudapp.azure.com:9086
Results are available on online:
- Go to inspect-particular-test-run
- In the
Select run
dropdown, select your particular test run - Copy the year+time timestamp and paste it into the
From:
field in the time range top-right - Paste the timestamp plus two hours into the
To:
field
See gif of the process.
Aggregated results are available at overview-of-all-runs-results.
Stress testing is different from performance testing: whereas performance testing will help you see how better (or worse) you're doing in different scenarios, stress testing will push your configuration to the max to see what you can handle.
Run start_stress_test.sh
- parameters supported are:
--host
(required): system under test (eg.http://localhost
)--ignore-lock
(optional): allow stress test to run even while another performance or stress test is running
./start_stress_test.sh --host http://localhost
Open up the results on http://localhost:8089.
- Python
- Locust - An open source load testing tool
- InfluxDB - Scalable datastore for metrics, events, and real-time analytics
- Grafana - The tool for beautiful monitoring and metric analytics & dashboards for Graphite, InfluxDB & Prometheus & More
- Lilian Minne
- Vadim Peretokin
BSD 3-clause.