Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy to use performance and memory .NET profiler for Windows and Linux.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

CPU profiling

When the profiler is connected to the profiled application, the toolbar contains the following CPU profiling controls:

  • Start/Stop CPU profiling (1)
  • Clear CPU profiling results and continue profiling (2)

CPU profiling modes

You can choose either of four available measurement modes:

Start CPU profiling

You can start and stop CPU profiling during the execution of your application as many times as you want. When CPU profiling is not running, the profiler adds no performance overhead to application being profiled.

Profiler UI

  • Connect to the application.
  • Choose the profiling mode.
  • Click the button to start profiling as shown on the picture:

Startup options

It may be useful to launch the application with CPU profiling right from the start. Learn more about profiler agent startup options.

Command line tool

Command line tool is designed to control profiling modes in headless environments.

Profiler API

API class com.yourkit.api.Controller for each profiling mode has a corresponding method to start CPU profiling. For example:

Controller controller = new Controller();
controller.startSampling(null);

Triggers

Profiler built-in triggers allow to start CPU profiling on high CPU usage, by timer, on entering particular method, or by other conditions.

Live results

When CPU profiling is started, the results are immediately available in Call tree - All threads merged, Flame graph and Method list sections on CPU tab.

In case of CPU tracing, both method times and invocation counts are shown. In case of CPU sampling, only times are shown.

The live view provides only basic information. To perform comprehensive analysis, capture performance snapshot, open it and use the full featured CPU tab.

Finish measuring and get the results

When the task you intended to profile has finished (or has performed for a sufficient amount of time), capture a performance snapshot with all the recorded information.

When this is done from the profiler UI, you can open the results for immediate analysis.

Further topics in this section describe the profiler's UI for analyzing CPU profiling results.

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.