-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0882027
commit f8c6c1e
Showing
6 changed files
with
1,610 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Performance testing the IPS implementation | ||
|
||
## Setup details | ||
|
||
The performance runner utilizes K6 along with custom extensions for generating fake data. | ||
|
||
To include additional extensions, refer to the following resources to build your desired binary: | ||
|
||
- [Build a K6 Binary using Docker](https://k6.io/docs/extensions/guides/build-a-k6-binary-using-docker/) | ||
- [K6 Extensions Documentation](https://k6.io/docs/extensions/) | ||
- Faker Extension: | ||
- [GitHub Repository](https://github.com/szkiba/xk6-faker) | ||
- [Documentation](https://ivan.szkiba.hu/xk6-faker/index.html) | ||
|
||
Example command to build a binary with the Faker extension: | ||
|
||
``` | ||
docker run --rm -u "$(id -u):$(id -g)" -v "${PWD}:/xk6" grafana/xk6 build --with github.com/szkiba/xk6-faker --with github.com/grafana/xk6-output-prometheus-remote@latest | ||
``` | ||
|
||
## Run a specific performance test | ||
|
||
Different types of performance testing can be implemented to verify various aspects of the system. Refer to the [Testing Guides](https://grafana.com/docs/k6/latest/testing-guides/test-types/) for an example guide. | ||
|
||
#### Volume test | ||
|
||
Ensure that all systems are connected and responding as intended. | ||
|
||
``` | ||
./k6 run scripts/smoke.js | ||
``` | ||
|
||
#### Load test | ||
|
||
Run the system under load by gradually increasing the number of Virtual Users (VUs) and maintaining this load for a specified duration before ramping down. | ||
|
||
``` | ||
./k6 run scripts/load.js | ||
``` | ||
|
||
#### Stress test | ||
|
||
Apply a high load to the system by rapidly increasing the number of VUs and pushing the system to its limits. | ||
|
||
``` | ||
./k6 run scripts/stress.js | ||
``` | ||
|
||
#### Soak test | ||
|
||
Run the system under a sustained load for an extended period to identify any potential performance degradation or resource leaks. | ||
|
||
``` | ||
./k6 run scripts/soak.js | ||
``` |
Binary file not shown.
Oops, something went wrong.