This is T.O. of GMO Ad Marketing.
I tried using the profiler with IntelliJ IDEA Ultimate, so I will introduce the usage procedure. Easy to use: grinning:
● Premise We will use the mac version of IntelliJ IDEA Ultimate 2019.3 as the development environment. Note 1) IntelliJ profiler can be used only in the Ultimate version. Note 2) At this time, the profiler function cannot be used for application servers such as tomcat.
Select "Preference-> Build, Execution, Deployment-> Profilers-> Java Profiler" from the IntelliJ menu. Press the "+" button to add "CPU Profiler" and "Allocation Profiler".
A button is added to run the profiler.
Select "Run'xxxxx' with CPU Profiler" from the buttons to run the profiler. After the program has run, select the Profiler tab on the screen to display the Profiler Tools window. The collected data is displayed in three tabs: frame graph, call tree, and method list.
The frame of the called stack is displayed with a width proportional to the percentage of CPU time spent. It seems that the orange part is consumed by calling the part written in the program, and the blue part is consumed by the compile time etc. If you want to investigate where the percentage of time spent is high, you can move to the program source corresponding to the part of the frame by displaying the menu with the frame selected and selecting "Jump To Source".
Information about the program's call stack (method name, percentage of total CPU time spent, etc.) is displayed. The arrow on the far left is a hierarchical display, and you can check it in more detail by selecting it.
The executed methods are displayed in descending order of cumulative CPU time consumption. If you select "Back Traces" at the bottom with each method selected, you can check the method that is calling.
Select "Run'xxxxx' with Allocation Profiler" from the buttons to run the profiler. After the program has run, select the Profiler tab on the screen to display the Profiler Tools window. The collected data is displayed in three tabs: frame graph, call tree, and method list.
The frame of the called stack is displayed with a width proportional to the percentage of memory consumption. If you want to investigate where the memory consumption is high, you can move to the program source corresponding to the part of the frame by displaying the menu with the frame selected and selecting "Jump To Source" from the menu.
Information about the program's call stack (method name, percentage of total memory consumption, etc.) is displayed. The arrow on the far left is a hierarchical display, and you can check it in more detail by selecting it.
The executed methods are displayed in descending order of cumulative memory amount. If you select "Back Traces" at the bottom with each method selected, you can check the method that is calling.
In writing, I referred to the following. [Profiling Tool-Official Help | IntelliJ IDEA] (https://pleiades.io/help/idea/cpu-profiler.html)
Tomorrow is "How to deal with missing values by machine learning" by @CodeDiggerM. Please continue to enjoy GMO Advent Calendar 2019!
Recommended Posts