Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy-to-use performance and memory .NET profiler for Windows, Linux and macOS.
Secure and easy profiling in cloud, containers and clustered environments.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

CPU usage estimation

YourKit Java Profiler collects stack samples of running Java threads at regular intervals. It allows you to analyze the frequency of function calls and their relationships, and to get an understanding of the performance of your Java program. We call it "statistical profiling".

Keep in mind that statistical profiling is an estimation, and the results may not be precise. However, it can give you valuable insights into the performance characteristics of your Java application. Also, remember that the quality of the estimation depends on the number of selected samples. The wider the selection, the more samples it contains, the better the estimate.

How to invoke

To estimate CPU usage, please select arbitrary time range in any telemetry chart. Profiler will show merged call tree for all the stacks (CPU samples) recorded within the selected time interval, and will display number of the samples:

CPU usage estimation

Comparison with CPU sampling

This feature is similar to CPU sampling, as it also uses sampling approach, but there are sufficient differences:

Criteria CPU usage estimation CPU sampling Comments
Results availability As long as stack telemetry is turned on CPU sampling should be explicitly started CPU usage estimation is ideal for analysis of anomalies such as CPU spikes, especially those which has already happened, so you do not need to turn CPU sampling or tracing on, and try to reproduce the spike.
Accuracy Lower Higher

CPU usage estimation is based on stack telemetry, whose frequency is normally as low as 1 sample per second, but can be changed using the startup option telemetry_period.

CPU usage estimation can adequately measure events not shorter than the stack telemetry period.

So, it suits for measuring events or method calls that last at least several seconds. If the measured event or method call is long enough, the estimation will do its job - locate problematic code responsible for the CPU spike.

For measuring shorter events or methods, use normal CPU profiling, or decrease the telemetry period using the startup option telemetry_period.

Granularity Results are available for the selected time interval Results are aggregated for the entire period of CPU profiling

CPU usage estimation enables analysis of particular events or time ranges within single snapshot.

CPU profiling results are aggregated since CPU profiling has been started. It is not possible to "extract" CPU profiling results for a smaller time range within one snapshot. However, you can choose which method calls to analyze.

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content, 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.