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.

Sampling settings

CPU sampling settings allow to customize some aspects of CPU sampling.

CPU tracing settings are specified separately, as described here.

When the settings are applied

The settings are applied each time you start CPU sampling. This means you can change the settings without restarting the profiled application.

Configuring the settings

To configure CPU sampling settings use Settings | CPU Sampling... in the main menu.

The settings are also accessible via a link in the CPU profiling toolbar popup:

The following dialog appears:

Configurable properties:

  • Time measurement

    Specify whether CPU or wall time will be measured for profiled methods by using the time property.

    By default, CPU time is measured which corresponds to the option time=cpu.

    To measure wall time instead, specify time=wall.

    When starting sampling from the profiler UI, choose the option via Use Preconfigured Settings... or manually edit the property value.

  • Sampling period

    Specify how often samples are taken with sampling_period_ms=<time in milliseconds>. By default, samples are taken each 20 milliseconds (sampling_period_ms=20).

Configuration file

The settings are stored in the file

<user home>/.ynp/sampling_2022.txt

where user home corresponds to the account under which a profiled application is launched.

This file is automatically updated in your user home directory when you apply changes in the UI (see above).

You can edit this file manually, but note that it may be fully overwritten with Use Preconfigured Settings... in UI.

The settings file is read and applied when CPU sampling is started with:

  • API method Controller.StartSampling
  • trigger action StartSampling

You can specify a custom settings file for a particular application by using the startup option sampling_settings_path

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.