Skip to content

Demonstrates how to run load tests with containerised instances of K6, Grafana and InfluxDB

License

Notifications You must be signed in to change notification settings

SchulzWill/docker-k6-grafana-influxdb

 
 

Repository files navigation

Forked repo from: docker-k6-grafana-influxdb

Conteúdo utilizado na palestra Performance além dos testes

ORIGINAL CONTENT BELOW!

## docker-k6-grafana-influxdb
Demonstrates how to run load tests with containerised instances of K6, Grafana and InfluxDB.

#### Article
This is the accompanying source code for the following article. Please read for a detailed breakdown of the code and how K6, Grafana and InfluxDB work together using Docker Compose:

https://medium.com/swlh/beautiful-load-testing-with-k6-and-docker-compose-4454edb3a2e3

#### Dashboards
The dashboard in /dashboards is adapted from the excellent K6 / Grafana dashboard here:
https://grafana.com/grafana/dashboards/2587

There are only two small modifications:
* the data source is configured to use the docker created InfluxDB data source
* the time period is set to now-15m, which I feel is a better view for most tests

#### Scripts
The script here is an example of a low Virtual User (VU) load test of the excellent Star Wars API:
https://swapi.dev/

If you're tinkering with the script, it is just a friendly open source API, be gentle!


Run it
```
docker-compose up -d influxdb grafana
docker-compose run k6 run /scripts/ewoks.js
```

About

Demonstrates how to run load tests with containerised instances of K6, Grafana and InfluxDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 76.9%
  • PowerShell 11.9%
  • Shell 11.2%