Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gavlyukovskiy/benchmark-spring-application


https://github.com/gavlyukovskiy/benchmark-spring-application

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

## Running load tests

1. Data bootstrap:
```bash
docker compose up -d postgres
./gradlew :tools:bootstrap --args="postgres"
```
2. Build docker images
```bash
./gradlew :spring-web:bootBuildImage
./gradlew :spring-webflux:bootBuildImage
./gradlew -Pjetty :spring-web:bootBuildImage
```
3. Run application
1. Docker
1. Tomcat
```bash
docker compose rm --stop --force spring-web-tomcat spring-web-tomcat-loom spring-webflux && docker compose up -d spring-web-tomcat
```
2. Tomcat + Loom
```bash
docker compose rm --stop --force spring-web-tomcat spring-web-tomcat-loom spring-webflux && docker compose up -d spring-web-tomcat-loom
```
3. Webflux
```bash
docker compose rm --stop --force spring-web-tomcat spring-web-tomcat-loom spring-webflux && docker compose up -d spring-webflux
```
2. Gradle
1. Tomcat
```bash
./gradlew :spring-web:bootRun
```
2. Tomcat + Loom
```bash
./gradlew :spring-web:bootRun --args="--spring.profiles.active=loom"
```
3. Webflux
```bash
./gradlew -Pjetty :spring-webflux:bootRun
```
4. Run **db-read-test** (reading a random item from postgres)
1. With application in Docker
```bash
docker run -e TARGET_HOST=application --network benchmark-network --rm -i grafana/k6 run --quiet - Pinned carrier threads result in degraded performance (https://github.com/pgjdbc/pgjdbc/issues/1951)
```bash
docker run -e TARGET_HOST=application --network benchmark-network --rm -i grafana/k6 run --quiet -