diff --git a/README.md b/README.md index 39901131df..be9bf9df32 100644 --- a/README.md +++ b/README.md @@ -150,11 +150,35 @@ npx playwright test all-scenarios --grep @search_for_a_subway_line ## Load Tests +### Full load test + ``` npm install --ignore-scripts npx artillery run ./integration/load_tests/all-scenarios.yml --target http://localhost:4001 ``` +### Light load test / performance test + +``` +npm install --ignore-scripts +npx artillery run ./integration/load_tests/homepage-light-load.yml +``` + +This is unlikely to stress your locally-running instance, but it will present output that includes something like + +``` +http.response_time.2xx: + min: ......................................................................... 287 + max: ......................................................................... 558 + mean: ........................................................................ 416.7 + median: ...................................................................... 424.2 + p95: ......................................................................... 507.8 + p99: ......................................................................... 539.2 +``` + +This can be useful for comparing homepage load times across different commits or releases. + + ## Monitoring ``` diff --git a/integration/load_tests/homepage-heavy-load.yml b/integration/load_tests/homepage-heavy-load.yml new file mode 100644 index 0000000000..884d9491c0 --- /dev/null +++ b/integration/load_tests/homepage-heavy-load.yml @@ -0,0 +1,22 @@ +config: + target: "http://localhost:4001" + http: + timeout: 300 + maxSockets: 500 + phases: + - name: "Sustained high-load test" + duration: 300 + arrivalRate: 100 + environments: + green: + target: "http://dev-green.mbtace.com" + blue: + target: "http://dev-blue.mbtace.com" +scenarios: + - name: "Stress test single page" + flow: + - loop: + - get: + url: "/" + - think: 1 + count: 100 diff --git a/integration/load_tests/homepage-light-load.yml b/integration/load_tests/homepage-light-load.yml new file mode 100644 index 0000000000..6517c04c49 --- /dev/null +++ b/integration/load_tests/homepage-light-load.yml @@ -0,0 +1,22 @@ +config: + target: "http://localhost:4001" + http: + timeout: 300 + maxSockets: 500 + phases: + - name: "Warm Up" + duration: 30 + arrivalRate: 3 + - name: "Measure page-load times" + duration: 60 + arrivalRate: 3 + environments: + green: + target: "http://dev-green.mbtace.com" + blue: + target: "http://dev-blue.mbtace.com" +scenarios: + - name: "Stress test single page" + flow: + - get: + url: "/"