YourKit provides APIs to start and stop measuring from within your application, e.g.
com.yourkit.api.Controller controller = new com.yourkit.api.Controller();To use these APIs include <Profiler Installation Directory>/lib/yjp-controller-api-redist.jar in the classpath. Read more about YourKit APIs here.
controller.startCPUProfiling (com.yourkit.api.ProfilingModes.CPU_TRACING , null);
controller.stopCPUProfiling();
controller.captureSnapshot (com.yourkit.api.ProfilingModes.SNAPSHOT_WITHOUT_HEAP);
No comments:
Post a Comment