Showing posts with label performance. Show all posts
Showing posts with label performance. Show all posts

Sunday, April 15, 2012

YourKit profiler APIs

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