Add initial locustfile for load testing#380
Merged
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #380 +/- ##
=======================================
Coverage 98.51% 98.51%
=======================================
Files 33 33
Lines 1948 1948
=======================================
Hits 1919 1919
Misses 29 29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ericbuckley
approved these changes
May 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds an initial
locustfilefor running load testing initially. It will need to be modified as the load testing plan develops but this gives you an idea of how load testing might work locally.How to run the load test:
For now (eventually will make this a single script):
./scripts/local_server.shlocust -f ./tests/load/locustfile.py --headless -u1 -r 1 --run-time 3s --host http://localhost:8000Interpreting the output:
You will get two sets out output after the load test has completed:
of requests, # fails, and time for each endpoint that is hit
We can save the output as a CSV for easier sharing with
--csv exampleDetails about locustfile:
/linkendpoint. In future iterations, the record will be duplicated a random number of times and randomized once I have updatedexpand_test_datato work withPIIRecords(ticket Refactorexpand_test_data.pyto accept PIIRecords #376)Related Issues
Closes #377
Additional Notes
There are likely lots of iterations we can make on this file as we learn more about how locust works so let me know if you find something neat!