Skip to content

Commit

Permalink
Adding load test info to the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Feb 28, 2024
1 parent 8ca6f99 commit e93c4a4
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,28 @@ Delete the store:

```
curl -X DELETE http://localhost:9200/_plugins/ubi/awesome
```
```

## Load Test

The `load-test` directory contains a basic load testing example. The purpose of the files under `load-test` are to provide a means of testing the plugin's ability to receive and store a large number of events over time. To use the load test, first start OpenSearch on `localhost:9200`, and then:

```
cd load-test
source ./venv/bin/activate
./run.sh
```

The test will run for 10 seconds. The number of events sent will be shown along with the `_count` of events in the store:

```
Type Name # reqs # fails | Avg Min Max Med | req/s failures/s
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
POST /_plugins/ubi/mystore 8 0(0.00%) | 8 6 9 8 | 0.81 0.00
--------|----------------------------------------------------------------------------|-------|-------------|-------|-------|-------|-------|--------|-----------
Aggregated 8 0(0.00%) | 8 6 9 8 | 0.81 0.00
Found 8 indexed
```

This shows 8 total requests made by locust, and 8 events are in the index. The idea being we can assert that the number of events sent matches the events stored in the index.

0 comments on commit e93c4a4

Please sign in to comment.