Background
I am trying to inspect my Java batch application with Flight Recorder to improve the launching performance. Now it takes about 20 seconds to launch, and I am struggling to make it less than 10 seconds.
The application is built with Spring Boot 2.2 and Spring Batch, and running on JDK 11. I am using Flight Recorder rather than VisualVM because JDK 11 does not contain VisualVM out of the box (install of additional tools to the inspection environment is not impossible, but is restricted).
Problem
I have thought I can inspect the launching process with Flight Recoder, so I have run the application like this:
java -XX:StartFlightRecording=filename=demo.jfr,settings=profile -jar .\build\libs\demo-0.0.1-SNAPSHOT.jar -spring.batch.job.names importUserJob -spring.batch.job.enabled false
But Mission Control shows only about ~100 counts in the "Method Profiling" panel. It is too little to understand the trend of the whole launching process and inspect which method spends the most time in the process.
Question
How can I take more method count with Flight Recorder and JDK Mission Control? Which parameter in .jfc
file affects the amount of the method count?