Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Nov 8, 2023
1 parent e769e66 commit e12c40d
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ chmod +x k6

## Test Scripts

### Prometheus Test
This repository provides scripts to test qryn's own `Loki`, `Prometheus` and `Tempo` APIs<br>


### Prometheus

The [prometheus/qryn-loadtest.js](prometheus/qryn-loadtest.js) script can be configured using the following environment variables:

Expand All @@ -39,7 +42,7 @@ The [prometheus/qryn-loadtest.js](prometheus/qryn-loadtest.js) script can be con
| `K6_HA_CLUSTERS` | | 1 | Number of HA clusters to simulate. |
| `K6_TENANT_ID` | | '' | Tenant ID used for load test to read metrics from and write metrics to. |

For example, if qryn is running on `localhost:3100` you can run a small scale test with this command:
For example, if qryn is running on `localhost:3100` you can run a small scale Prometheus test with this command:

```sh
./k6 run prometheus/qryn-loadtest.js \
Expand All @@ -62,7 +65,7 @@ Assuming qryn is scaled up appropriately and you have enough k6 workers capacity

<br>

### Loki Test
### Loki

The [loki/qryn-loki-loadtest.js](loki/qryn-loki-loadtest.js) script can be configured using the following environment variables:

Expand All @@ -73,9 +76,28 @@ The [loki/qryn-loki-loadtest.js](loki/qryn-loki-loadtest.js) script can be confi
| `K6_VUS` | No | 10 | Number of users to simulate |
| `K6_ITERACTIONS` | No | 10 | Number of user interactions to simulate |

If qryn is running on `localhost:3100` you can run a small scale test with this command:
If qryn is running on `localhost:3100` you can run a small Loki scale test with this command:

```
./k6 run loki/qryn-loki-loadtest.js \
-e K6_LOKI_HOSTNAME="qryn:3100"
```

### Tempo

The [tempo/qryn-tempo-template.js](tempo/qryn-tempo-template.js) script can be configured using the following environment variables:

| Environment variable | Required | Default value | Description |
| ---------------------- | -------- | ------------- | ------------------------------------------------------------------------------------- |
| `K6_TEMPO_HOSTNAME` | No | `http://localhost:3100`| Hostname for the qryn instance or other Tempo API endpoint. |
| `K6_DURATION_MINUTES` | No | 1 | Test duration in minutes |
| `K6_VUS` | No | 10 | Number of users to simulate |
| `K6_ITERACTIONS` | No | 10 | Number of user interactions to simulate |

If qryn is running on `localhost:3100` you can run a small scale Tempo test with this command:

```
./k6 run loki/qryn-loki-loadtest.js \
-e K6_LOKI_HOSTNAME="qryn:3100"
```

0 comments on commit e12c40d

Please sign in to comment.