In 2015, as part of a “measure and improve performance” initiative, MDN staff configured Locust for performance testing of MDN. The locust test files simulate read traffic to MDN, fetching the top pages in roughly the same ratios as they were fetched on MDN, and can be run against test environments to measure changes in code, caching and settings.
These tests are not maintained or run during the current development process. Some of the common URLs are not included in the sample database.
DO NOT RUN LOCUST TESTS AGAINST PRODUCTION
Create a file
docker-compose.locust.ymlin the root folder (same folder as
docker-compose.yml) with the contents:
version: "2.1" services: locust: build: ./tests/performance depends_on: - web environment: - LOCUST_MODE=standalone - TARGET_URL=http://web:8000 volumes: - ./tests/performance/:/tests ports: - "8089:8089"
.envto update docker-compose:
Load the Locust UI at http://localhost:8089, and select:
- number of users to simulate
- users spawned per second
See Start locust for more.