YourKit provides API for capturing CPU profiling (sampling/tracing). Some thing like below...
import com.yourkit.api.Controller;
import java.awt.*;
import java.io.File;
/**
* to understand yourkit api.....
*/
public class AppMain {
public static void main(String[] args) throws Exception {
Controller yourKitController = new Controller();
yourKitController.startCPUSampling(null);
AnApplication anApplication = new AnApplication();
anApplication.count(1000090);
yourKitController.stopCPUProfiling();
String savedFilePath = yourKitController.captureSnapshot(Controller.SNAPSHOT_WITHOUT_HEAP);
File savedFile = new File(savedFilePath);
Desktop.getDesktop().open(savedFile);
}
}
I could not find API for analysing the captured data. Is there a yourkit API for analyzing captured data?