JavaPerformance analysis toolsProfiler provides two completely different methods for profiling applicationsProgram. By default, you can useJprofiler GuiFor application performance analysis. The jprofiler GUI provides a button for you to start and close records and displays all analysis data for you. If you do not want to use the jprofiler GUI profiling program, you can useJprofilerProvidedOffline profilingFunction. Offline profiling allows you to use profiling agents to analyze applications. Instead of connecting to the jprofiler GUI.
Profiling API
With the offline profiling API, you canCodeTo call the profiling operation. The disadvantage of this method is that you must add the jprofiler agent Library to the class path of the application during the development process and add the temporary profiling codeSource codeAnd the source code needs to be re-compiled every time the profiling operation is changed.
Triggers
With a trigger, you can specify all profiling operations in the jprofiler GUI without modifying the source code. Triggers is saved in the jprofiler configuration file. When you enable the offline profiling mode, the configuration file and session ID are transferred to the profiling proxy on the command line. Therefore, the profiling proxy can read the trigger definitions.