Package com.yourkit.api

Examples of com.yourkit.api.Controller


    private final Controller controller;
    private final AtomicBoolean capturing = new AtomicBoolean(false);

    public YourKitProfilerService() throws Exception
    {
        controller = new Controller();
    }
View Full Code Here


    private final Controller controller;
    private final AtomicBoolean capturing = new AtomicBoolean(false);

    public YourKitProfilerService() throws Exception
    {
        controller = new Controller();
    }
View Full Code Here

  }

  @Nullable
  private static Controller initController() {
    try {
      return new Controller();
    }
    catch (Exception ex) {
      LOG.info("Profiling agent is not enabled. Add -agentlib:yjpagent to idea.vmoptions if necessary to profile IDEA.");
      return null;
    }
View Full Code Here

  public static MongoDatabase db = new MongoDatabase("junit");

  @BeforeClass
  public static void globalSetUp() throws Exception
  {
    controller = new Controller();
    filters = new StringBuilder();
    filters.append("java.*\n");
    filters.append("javax.*\n");
    filters.append("sun.*\n");
    filters.append("sunw.*\n");
 
View Full Code Here

   * @return profiler context, or null if controller cannot be created
   */
  public static YourKitContext startProfile(boolean enableStackTelemetry,
                                            boolean enableCPUProfilling,
                                            boolean enableAllocationRecording) {
    Controller controller;
    try {
      controller = new Controller();
      // CHECKSTYLE: stop IllegalCatch
    } catch (Exception e) {
      // CHECKSTYLE: resume IllegalCatch
      LOG.info("Failed to set up YourKit controller", e);
      return null;
    }

    try {
      if (enableStackTelemetry) {
        controller.enableStackTelemetry();
        LOG.info("Enabled Yourkit stack telemetry");
      }
      // CHECKSTYLE: stop IllegalCatch
    } catch (Exception e) {
      // CHECKSTYLE: resume IllegalCatch
      LOG.info("Failed to enable YourKit stack telemetry", e);
    }

    try {
      if (enableCPUProfilling) {
        controller.startCPUProfiling(ProfilingModes.CPU_SAMPLING,
          Controller.DEFAULT_FILTERS, Controller.DEFAULT_WALLTIME_SPEC);
        LOG.info("Started YourKit CPU profiling");
      }
      // CHECKSTYLE: stop IllegalCatch
    } catch (Exception e) {
      // CHECKSTYLE: resume IllegalCatch
      LOG.info("Failed to start YourKit CPU profiling", e);
    }

    try {
      if (enableAllocationRecording) {
        controller.startAllocationRecording(true, ALLOCATION_RECORDING_INTERVAL,
            false, -1, true, false);
        LOG.info("Started YourKit allocation recording");
      }
      // CHECKSTYLE: stop IllegalCatch
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of com.yourkit.api.Controller

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.