Profiling API


  JProfiler provides a profiling API that allows you to control certain aspects of profiling at run time. The profiling API is contained in bin/agent.jar in your JProfiler installation or as a Maven dependency as described in the Javadoc. If the profiling API is used during a normal execution of your application, the API calls will just quietly do nothing.

For offline profiling, you will need to save a snapshot at some point in order to evaluate the data of the profiling run with JProfiler's GUI front end later on. The saveSnapshot and saveSnapshotOnExit methods in JProfiler's profiling API do that job. For interactive use, these method calls will do nothing.

In addition, you can optionally switch on CPU profiling a a suitable point and trigger heap dumps with the profiling API.