Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to attach VisualVM and start profiling immediatedly with application start?

I can attach VisualVM to a running application, then start profiling.

All this time while I am performing manual operations, the target application is running and statistics is loosing.

How to begin collecting statistic exactly at the same moment application starts?

UPDATE

With Profile Startup what is the way to set which class to run?

enter image description here

Very small cell for application setup says

-agentpath:D:/Apps/visualvm_138/profiler/lib/deployed/jdk16/windows-amd64/profilerinterface.dll=D:\Apps\visualvm_138\profiler\lib,5140

i.e. contains no clues to application location.

like image 499
Suzan Cioc Avatar asked Nov 01 '22 14:11

Suzan Cioc


1 Answers

You can try the startup profiler plugin:

https://visualvm.java.net/startupprofiler.html

like image 89
rafalopez79 Avatar answered Nov 15 '22 04:11

rafalopez79