Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ammbra/performance-glance
Repository containing simple springboot todo app with JFR, prometheus and grafana enabled
https://github.com/ammbra/performance-glance
grafana java20 jfr prometheus springboot tools
Last synced: about 2 months ago
JSON representation
Repository containing simple springboot todo app with JFR, prometheus and grafana enabled
- Host: GitHub
- URL: https://github.com/ammbra/performance-glance
- Owner: ammbra
- License: mit
- Created: 2023-02-17T10:54:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-06T07:31:02.000Z (9 months ago)
- Last Synced: 2024-04-06T09:30:30.687Z (9 months ago)
- Topics: grafana, java20, jfr, prometheus, springboot, tools
- Language: Java
- Homepage:
- Size: 77.1 KB
- Stars: 43
- Watchers: 3
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# perfomance-glance
## How to find out the modules needed by jlink
Uncomment the `maven-dependency-plugin` plugin in `pom.xml`:
```xml
org.apache.maven.plugins
maven-dependency-plugin
${maven.dependency.plugin.version}
copy-dependencies
package
copy-dependencies
${project.build.directory}/libs
false
false
true
```
Then run the following commands in a terminal window:```shell
mvn verify
jdeps --ignore-missing-deps -q -recursive --multi-release 21 \
--print-module-deps --class-path 'target/libs/*' target/spring-todo-app.jar
```## How to start the setup
Place yourself in the root directory and run :
```shell
docker-compose up --build
```
You can access the following endpoints:
| Application | Local Endpoint |
|-------------|-----------------------|
| Todo App | http://localhost:8080 |
| Prometheus | http://localhost:9090 |
| Grafana | http://localhost:300 |Now create some requests by running:
```shell
sh scripts/load.sh
```### How to detect missing JVM NativeMemoryTracking flag
Please take a look at /scripts/flag.sh and:
```shell
sh scripts/flag.sh
```### How to track Native Memory Used
Run```shell
sh scripts/track.sh
```
### How to query stats
Run```shell
sh scripts/query.sh
```## Prometheus
### Look at CPU Load Machine Total vs HTTP server requests```shell
rate(jdk_CPULoadmachineTotal[1m])
or rate(http_server_requests_seconds_sum{method="POST", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="GET", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="PUT", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="DELETE"}[1m])
```### Look at Garbage Collection Longest Pause vs HTTP server requests
```shell
rate(jdk_GarbageCollectionlongestPause[1m])
or rate(http_server_requests_seconds_sum{method="POST", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="GET", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="PUT", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="DELETE"}[1m])
```### Look at Garbage Collection Sum of Pauses vs HTTP server requests
```shell
rate(jdk_GarbageCollectionsumOfPauses[1m])
or rate(http_server_requests_seconds_sum{method="POST", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="GET", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="PUT", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="DELETE"}[1m])
```
### Look at GCHeapSummary Heap Used```shell
rate(jdk_GCHeapSummaryheapUsed[1m])
or rate(http_server_requests_seconds_sum{method="POST", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="GET", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="PUT", uri="/api/todo"}[1m])
or rate(http_server_requests_seconds_sum{method="DELETE"}[1m])
```