Skip to content

Commit 7427ba5

Browse files
committed
docs: improve stress test doc
1 parent 1edcca3 commit 7427ba5

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

test/stress/README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1+
# Stress test
2+
3+
## Overview
4+
5+
This test is checking if any error would happen if we create, updated and delete milestones in **the same** timeline document in Elasticsearch `timelines` index at the same time. We are sending multiple Kafka events in parallel to trigger create, updated and delete milestone operations.
6+
7+
1. First, the script should create initial data in the ES index:
8+
- create one timeline in the `timeline` index with `2*STRESS_BASIC_QTY` milestones (it's important that all milestones belong to the same timeline)
9+
10+
2. After initial data is created start an actual stress test by sending `3*STRESS_BASIC_QTY` Kafka messages in parallel:
11+
- `STRESS_BASIC_QTY` Kafka messages to delete half of the initially created milestones
12+
- `STRESS_BASIC_QTY` Kafka messages to update another half of initially created milestones
13+
- `STRESS_BASIC_QTY` Kafka messages to create `STRESS_BASIC_QTY` new milestones in the same timeline
14+
115
## Configuration
216

3-
* `STRESS_BASIC_QTY`: As requested in challenge description
17+
* `STRESS_BASIC_QTY`: The basic number of objects to use in stress test.
418

519
* `STRESS_TESTER_TIMEOUT`: Number of seconds to wait after queueing create/update/delete requests and before validating data. Default is 80s, which is enough for `STRESS_BASIC_QTY=100`. This might have to be increased if `STRESS_BASIC_QTY` is higher than 100.
620

@@ -21,5 +35,3 @@
2135
```
2236
npm run test:stress
2337
```
24-
25-
I would save ids of milestones not updated/created/deleted to `test/stress/stress_test_errors.json`

0 commit comments

Comments
 (0)