updates to locustfile#394
Merged
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #394 +/- ##
=======================================
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
reviewed
May 30, 2025
ericbuckley
left a comment
Collaborator
There was a problem hiding this comment.
Looking good, you can just pin mypy to 1.15.0 in pyproject.toml to get around the type checking issue.
ericbuckley
reviewed
Jun 2, 2025
ericbuckley
approved these changes
Jun 2, 2025
…/CDCgov/RecordLinker into local-load-testing
…cal-load-testing
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 updates the locustfile for load testing to:
Related Issues
Closes #393
Additional Notes
If you have better ideas for randomly selecting records from the original data, I'm all ears, because I'm worried it will make seeding artificially slow. Right now, the
original_datafile is too large to load into memory to allow for random indexing so it loops through the records and randomly decides if they should be linked. It seems unlikely that we'd test all 1.5M records so the first records would be more heavily tested. This probably doesn't matter for load testing but I wanted to point it out.The other option I considered (but ruled out) was to create the list of records that would be linked during the seeding process, i.e., when looping through the
clusters_iterin theon_startsection, you could also randomize whether a cluster gets added to arecord_to_linklist. However, we'd likely run into the same issue with the list being too large to hold in memory. We could write the list to file and then read from that in thelinktask, but it would only remove line 85if random.random() < 0.5.Curious to hear other ideas!