Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asc-lab/micronaut-spring-performance-tests
Micronaut vs Spring - build time, startup time, heap size, used heap size comparision and Gatling load tests.
https://github.com/asc-lab/micronaut-spring-performance-tests
hibernate-jpa micronaut mongodb performance-testing spring-boot
Last synced: 3 months ago
JSON representation
Micronaut vs Spring - build time, startup time, heap size, used heap size comparision and Gatling load tests.
- Host: GitHub
- URL: https://github.com/asc-lab/micronaut-spring-performance-tests
- Owner: asc-lab
- Created: 2019-06-19T06:30:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-21T23:25:55.000Z (about 3 years ago)
- Last Synced: 2023-03-05T18:05:49.178Z (almost 2 years ago)
- Topics: hibernate-jpa, micronaut, mongodb, performance-testing, spring-boot
- Language: Java
- Homepage:
- Size: 1.28 MB
- Stars: 20
- Watchers: 6
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot vs Micronaut performance tests
Few words about projects:
* **Micronaut** - Micronaut with dependencies: Web, JPA, Lombok, Validations
* **Spring** - Spring Boot with dependencies: Web, JPA, Lombok, Validations
* **Micronaut_Mongo** - Micronaut with dependencies: Web, Mongo (standard driver, not reactive), Lombok, Validations
* **Spring_Mongo** - Spring Boot with dependencies: Web, Mongo, Lombok, Validations## Project with Customer+Product+Order func
**Prerequisites**: MongoDB
A few simple endpoints have been created in the projects so that the tests are done on something more than "hello-world example".
In each app context are 180-220 beans.Build using:
```
mvn clean install
```Run using:
```
java -jar path-to-jar
```**Ubuntu on private laptop** \
Intel Core i7-8550U, 32GB RAM, SSD| | Micronaut | Spring | Micronaut_Mongo | Spring_Mongo |
| ----------------------- | ---------:| ------:| ---------------:| ------------:|
| build time | ~8s | ~7s | ~8s | ~7s |
| startup time | ~3s | ~6-8s | ~1s | ~5s |
| heap size | ~350MB | ~460MB | ~170MB | ~320MB |
| used heap | ~110MB | ~280MB | ~65MB | ~160MB |**Jenkins** \
Intel Xeon E5-2640 v2 @ 2.00GHz, 16GB RAM, HDD| | Micronaut | Spring | Micronaut_Mongo | Spring_Mongo |
| ----------------------- | ---------:| ------:| ---------------:| ------------:|
| build time | ~14s | ~6s | ~7s | ~6s |## Project with Customer+Product+Order func & 1000 beans auto-generated
In each app context are circa 1200 beans.
If you want check exactly number, change property `beans.counter` (in `application.properties` for Spring and `application.yml` for Micronaut) to `true`.**Ubuntu on private laptop** \
Intel Core i7-8550U, 32GB RAM, SSD| | Micronaut | Spring | Micronaut_Mongo | Spring_Mongo |
| ----------------------- | ---------:| ------:| ---------------:| ------------:|
| build time | ~25s | ~14s | ------ | ------ |
| startup time | ~6s | ~16s | ------ | ------ |
| heap size | ~500MB | ~590MB | ------ | ------ |
| used heap | ~130MB | ~300MB | ------ | ------ |**Jenkins** \
Intel Xeon E5-2640 v2 @ 2.00GHz, 16GB RAM, HDD| | Micronaut | Spring | Micronaut_Mongo | Spring_Mongo |
| ----------------------- | ---------:| ------:| ---------------:| ------------:|
| build time | ~28s | ~9s | ------ | ------ |## Run performance tests
**Prerequisites**: ScalaGo to `gatling-performance-tests` and run all simulations:
```
mvn gatling:test
```
Only for Spring Boot:
```
mvn gatling:test -Dgatling.simulationClass=simulations.SpringSimulation
```
Only for Micronaut:
```
mvn gatling:test -Dgatling.simulationClass=simulations.MicronautSimulation
```
Only for Mongo Spring Boot:
```
mvn gatling:test -Dgatling.simulationClass=simulations.MongoSpringSimulation
```
Only for Mongo Micronaut:
```
mvn gatling:test -Dgatling.simulationClass=simulations.MongoMicronautSimulation
```
## Beans generator
We use [Lusk](https://github.com/musketyr/lusk) to generate some example beans for apps.Generate 1000 beans in `generated` package:
```
lusk -c1000 -fmicronaut -p "pl.altkomsoftware.micronaut.perftest.generated" [path-to-repo]\micronaut-1-1-0lusk -c1000 -fspring -p "pl.altkomsoftware.spring.perftest.generated" [path-to-repo]\spring-boot-2-1-4
```## TODO
- Create WebFlux Spring version