Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Update tile load test script and add scripts for hompage load, facility download, and facility POST #1857

Merged
merged 8 commits into from
May 23, 2022

Conversation

jwalgran
Copy link
Contributor

@jwalgran jwalgran commented May 20, 2022

Update tile load test script and add scripts for hompage load, facility download, and facility POST

Connects #1776
Same content as #1777 but targeted at ogr/develop

Checklist

  • fixup! commits have been squashed
  • CI passes after rebase
  • CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines
  • This PR is targeted at the correct branch (develop vs. ogr/develop)
  • If this PR applies to both OAR and OGR a companion PR has been created

Allows for testing tile requests for different facility filters, some of which
may be more expensive than others.
Ensures that the requests in parallel runs using VU_MULTIPLIER do not line up.
Attempting to make a more realistic test.
The tile load test uses virtual users and iterations to chunk and run requests
read from a HAR file and exists after one set of tile requests is done. This
helper loops a run of the scripts with a different CACHE_KEY_SUFFIX for each run
to allow for testing sustained continuous load.
This script was initially created by browsing the home page, exporting the
requests as a HAR file, converting the HAR file to a script using k6.io, then
modifying the script to simulate the parallel request behavior of a browser.

Making API requests requires a CLIENT_KEY so we update the load testing compose
file to pass through an appropriate environment variable.
Mimics the process used by the application to load a page of facilities at a
time. Calling the API requires setting the CLIENT_KEY environment variable.
FILTERS can be set to change the query string arguments passed to each page
request.
Includes definitions of all supported env vars and examples of how to run each
of the load test scripts.
To simulate API partners POSTing a list of facilities to the API.

`addresses.csv` was generated by downloading facility addresses from the staging
data set.

Portions of the random-ish facility name generator were adapted from
https://github.com/joke2k/faker/blob/5b98d2ab877e414b51e76abc8fdde2fb2dad6710/faker/providers/company/__init__.py
@jwalgran
Copy link
Contributor Author

Merging without a second review because all of the code is the same as #1777 and it is all within the load-tests directory which is not used at runtime.

@jwalgran jwalgran merged commit 85f6da6 into ogr/develop May 23, 2022
@jwalgran jwalgran deleted the ogr/jcw/load-testing branch May 23, 2022 14:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant