{"id":19766226,"url":"https://github.com/akaliutau/microservice-profiling","last_synced_at":"2026-05-26T16:03:01.406Z","repository":{"id":120056122,"uuid":"458888233","full_name":"akaliutau/microservice-profiling","owner":"akaliutau","description":"Profiling approaches for java-based micro-services","archived":false,"fork":false,"pushed_at":"2022-02-13T18:04:01.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T10:55:25.308Z","etag":null,"topics":["jdk","jvm","profiling","visualvm"],"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/akaliutau.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,"publiccode":null,"codemeta":null}},"created_at":"2022-02-13T17:58:22.000Z","updated_at":"2022-02-13T18:04:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"0bfa6734-6cc6-46fa-9ba5-5dcd144e4241","html_url":"https://github.com/akaliutau/microservice-profiling","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akaliutau/microservice-profiling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fmicroservice-profiling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fmicroservice-profiling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fmicroservice-profiling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fmicroservice-profiling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akaliutau","download_url":"https://codeload.github.com/akaliutau/microservice-profiling/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akaliutau%2Fmicroservice-profiling/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33528089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["jdk","jvm","profiling","visualvm"],"created_at":"2024-11-12T04:23:27.369Z","updated_at":"2026-05-26T16:03:01.375Z","avatar_url":"https://github.com/akaliutau.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nThis project describes various techniques to tune up and profile Spring Boot - based (and essentially any Java) applications\n\n# VisualVM\n\nDownload, unpack and run VisualVM app:\n\n```\n./bin/visualvm\n```\n\n## Profiling local application\n\nIn other terminal run Spring Boot application with max memory heap 256MB:\n\n```\njava  -Xmx256m -jar ./target/worker-0.0.1.jar\n```\n\nIn VisualVM go to the Applications -\u003e Local -\u003e worker-0.0.1.jar and open it, getting in such way the access to all \nJVM parameters, including CPU, Heap/Metaspace, loaded classes and threading information.\n\n## Profiling applications running inside Docker container\n\nBuild an image with app and push it to GCloud private docker registry, f.e. :\n\n```\nmvn clean package -DskipTests\nsudo docker build -t worker:0.0.1 .\n```\n\nDocker image can be tested with the help of command (`ctrl+shift+c` to stop):\n```\nsudo docker run -p 8080:8080 -p 9010:9010 worker:0.0.1\n```\n\nGo to File -\u003e Add JMX Connection and create a new connection for localhost:9010, no authentication. The access to application \ncan be got the same way as for local running JVM\n\n## Profiling applications running at GCE\n\n(1) Prepare your application for GCE. Tag the image and push it to the registry:\n\n```\nsource set_env.sh\nsudo docker tag worker:0.0.1 eu.gcr.io/$GOOGLE_CLOUD_PROJECT/worker:v1\nsudo docker push eu.gcr.io/$GOOGLE_CLOUD_PROJECT/worker:v1\n```\nGo to https://console.cloud.google.com/gcr/images/ and check the image does exist, or use the command:\n\n```\ndocker pull eu.gcr.io/$GOOGLE_CLOUD_PROJECT/worker:v1\n```\n\n(2) Create a simple VM Instance on the basis of pushed Docker image:\n\n```\ngcloud compute instances create-with-container worker-instance-1 \\\n  --project=$GOOGLE_CLOUD_PROJECT \\\n  --zone=europe-west2-c \\\n  --machine-type=e2-micro \\\n  --network-interface=network-tier=PREMIUM,subnet=default \\\n  --maintenance-policy=MIGRATE \\\n  --provisioning-model=STANDARD \\\n  --service-account=362163460144-compute@developer.gserviceaccount.com \\\n  --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append \\\n  --tags=http-server,https-server \\\n  --image=projects/cos-cloud/global/images/cos-stable-93-16623-102-8 \\\n  --boot-disk-size=10GB \\\n  --boot-disk-type=pd-balanced \\\n  --boot-disk-device-name=worker-instance-1 \\\n  --container-image=eu.gcr.io/$GOOGLE_CLOUD_PROJECT/worker:v1 \\\n  --container-restart-policy=always \\\n  --container-tty \\\n  --no-shielded-secure-boot \\\n  --shielded-vtpm \\\n  --shielded-integrity-monitoring \\\n  --labels=container-vm=cos-stable-93-16623-102-8\n```\nNote, that some arguments can change over time, for example, the version of COS, or can be different, as the id of default\ncompute service account\n\nThe command should show the instance was created:\n\n```\nCreated [https://www.googleapis.com/compute/v1/projects/GOOGLE_CLOUD_PROJECT/zones/europe-west2-c/instances/worker-instance-1].\nNAME               ZONE            MACHINE_TYPE  PREEMPTIBLE  INTERNAL_IP    EXTERNAL_IP    STATUS\nworker-instance-1  europe-west2-c  e2-micro                   10.154.15.219  34.142.95.167  RUNNING\n```\n\n(3) Use port-forwarding for port=9010:\n\n```\ngcloud compute ssh https://www.googleapis.com/compute/v1/projects/$GOOGLE_CLOUD_PROJECT/zones/europe-west2-c/instances/worker-instance-1 -- -L 9010:localhost:9010\n```\n\n(4) Go to File -\u003e Add JMX Connection and create a new connection for localhost:9010, no authentication. \nThe access to application can be got the same way as for local running JVM\n\n# References\n\n[1] [VisualVM](https://visualvm.github.io/) - a profiling standalone tool which runs on any compatible JDK","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakaliutau%2Fmicroservice-profiling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakaliutau%2Fmicroservice-profiling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakaliutau%2Fmicroservice-profiling/lists"}