Monday, October 2, 2017

JVM Profiling

JVM profiling in highly useful in identifying what in happening in JVM.

There are many tools available for profiling.
-Visual VM
-JProfiler

Profiling with VisualVM

-Open VisualVM
-Select the processId
-Click 'Sampler' tab
-Click settings. Select profile only package, com.thetechiehouse.*
-Click CPU
-Hit the URL on browser
-Once we get the response, Stop the CPU profiling.

Profiling with Jprofiler:
- It will provide  CPU Views, Heap Walker, Live Memory, recording capability, saving Snapshot etc.

We should be seeing the profiling details along with method level/self/CPU/ total execution time.
Snapshot can be downloaded, nps file will have all the profiling details captured.
Click the combined tab to view the overall method execution time.

No comments:

Post a Comment