{"id":18646461,"url":"https://github.com/ammbra/performance-glance","last_synced_at":"2025-04-11T12:31:51.449Z","repository":{"id":87339183,"uuid":"602975869","full_name":"ammbra/performance-glance","owner":"ammbra","description":"Repository containing simple springboot todo app with JFR, prometheus and grafana enabled","archived":false,"fork":false,"pushed_at":"2024-04-06T07:31:02.000Z","size":79,"stargazers_count":48,"open_issues_count":0,"forks_count":17,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-04T13:08:47.828Z","etag":null,"topics":["grafana","java20","jfr","prometheus","springboot","tools"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ammbra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-02-17T10:54:23.000Z","updated_at":"2025-02-28T09:24:11.000Z","dependencies_parsed_at":"2024-04-05T09:39:14.863Z","dependency_job_id":null,"html_url":"https://github.com/ammbra/performance-glance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammbra%2Fperformance-glance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammbra%2Fperformance-glance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammbra%2Fperformance-glance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammbra%2Fperformance-glance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ammbra","download_url":"https://codeload.github.com/ammbra/performance-glance/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248401984,"owners_count":21097328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grafana","java20","jfr","prometheus","springboot","tools"],"created_at":"2024-11-07T06:20:00.612Z","updated_at":"2025-04-11T12:31:50.973Z","avatar_url":"https://github.com/ammbra.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# perfomance-glance\n\n## How to find out the modules needed by jlink\n\nUncomment the `maven-dependency-plugin` plugin in `pom.xml`:\n\n```xml\n            \u003cplugin\u003e\n                \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n                \u003cartifactId\u003emaven-dependency-plugin\u003c/artifactId\u003e\n                \u003cversion\u003e${maven.dependency.plugin.version}\u003c/version\u003e\n                \u003cexecutions\u003e\n                    \u003cexecution\u003e\n                        \u003cid\u003ecopy-dependencies\u003c/id\u003e\n                        \u003cphase\u003epackage\u003c/phase\u003e\n                        \u003cgoals\u003e\n                            \u003cgoal\u003ecopy-dependencies\u003c/goal\u003e\n                        \u003c/goals\u003e\n                        \u003cconfiguration\u003e\n                            \u003coutputDirectory\u003e${project.build.directory}/libs\u003c/outputDirectory\u003e\n                            \u003coverWriteReleases\u003efalse\u003c/overWriteReleases\u003e\n                            \u003coverWriteSnapshots\u003efalse\u003c/overWriteSnapshots\u003e\n                            \u003coverWriteIfNewer\u003etrue\u003c/overWriteIfNewer\u003e\n                        \u003c/configuration\u003e\n                    \u003c/execution\u003e\n                \u003c/executions\u003e\n            \u003c/plugin\u003e\n```\nThen run the following commands in a terminal window:\n\n```shell\nmvn verify\njdeps --ignore-missing-deps -q -recursive --multi-release 21 \\\n  --print-module-deps --class-path 'target/libs/*' target/spring-todo-app.jar\n```\n\n## How to start the setup\n\nPlace yourself in the root directory and run :\n```shell\ndocker-compose up --build\n```\nYou can access the following endpoints:\n \n| Application | Local Endpoint        |\n|-------------|-----------------------|\n| Todo App    | http://localhost:8080 |\n| Prometheus  | http://localhost:9090 |\n| Grafana     | http://localhost:300  |\n\nNow create some requests by running:\n\n```shell\nsh scripts/load.sh\n```\n\n### How to detect missing JVM NativeMemoryTracking flag\n\nPlease take a look at /scripts/flag.sh and:\n\n```shell\nsh scripts/flag.sh\n```\n\n### How to track Native Memory Used \nRun\n\n```shell\nsh scripts/track.sh\n```\n### How to query stats\nRun\n\n```shell\nsh scripts/query.sh\n```\n\n## Prometheus\n### Look at CPU Load Machine Total vs HTTP server requests\n\n```shell\nrate(jdk_CPULoadmachineTotal[1m]) \nor rate(http_server_requests_seconds_sum{method=\"POST\", uri=\"/api/todo\"}[1m]) \nor rate(http_server_requests_seconds_sum{method=\"GET\", uri=\"/api/todo\"}[1m]) \nor rate(http_server_requests_seconds_sum{method=\"PUT\", uri=\"/api/todo\"}[1m])\nor rate(http_server_requests_seconds_sum{method=\"DELETE\"}[1m]) \n```\n\n### Look at Garbage Collection Longest Pause vs HTTP server requests\n\n```shell\nrate(jdk_GarbageCollectionlongestPause[1m]) \nor rate(http_server_requests_seconds_sum{method=\"POST\", uri=\"/api/todo\"}[1m]) \nor rate(http_server_requests_seconds_sum{method=\"GET\", uri=\"/api/todo\"}[1m]) \nor rate(http_server_requests_seconds_sum{method=\"PUT\", uri=\"/api/todo\"}[1m])\nor rate(http_server_requests_seconds_sum{method=\"DELETE\"}[1m]) \n```\n\n### Look at Garbage Collection Sum of Pauses vs HTTP server requests\n\n```shell\nrate(jdk_GarbageCollectionsumOfPauses[1m]) \nor rate(http_server_requests_seconds_sum{method=\"POST\", uri=\"/api/todo\"}[1m]) \nor rate(http_server_requests_seconds_sum{method=\"GET\", uri=\"/api/todo\"}[1m]) \nor rate(http_server_requests_seconds_sum{method=\"PUT\", uri=\"/api/todo\"}[1m])\nor rate(http_server_requests_seconds_sum{method=\"DELETE\"}[1m]) \n```\n### Look at GCHeapSummary Heap Used\n\n```shell\nrate(jdk_GCHeapSummaryheapUsed[1m]) \nor rate(http_server_requests_seconds_sum{method=\"POST\", uri=\"/api/todo\"}[1m]) \nor rate(http_server_requests_seconds_sum{method=\"GET\", uri=\"/api/todo\"}[1m]) \nor rate(http_server_requests_seconds_sum{method=\"PUT\", uri=\"/api/todo\"}[1m])\nor rate(http_server_requests_seconds_sum{method=\"DELETE\"}[1m]) \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fammbra%2Fperformance-glance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fammbra%2Fperformance-glance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fammbra%2Fperformance-glance/lists"}