Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
Expand Down
22 changes: 22 additions & 0 deletions integration/load_tests/homepage-heavy-load.yml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions integration/load_tests/homepage-light-load.yml
Original file line number Diff line number Diff line change
@@ -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: "/"
Loading