- System requirements
- Profiler architecture
- Running the profiler
- Profiler activation
- Start profiling
- Solving performance problems
- CPU profiling
- CPU usage estimation
- Sampling
- Asynchronous sampling
- Tracing
- Call counting
- CPU tab
- What-if: an ability to ignore particular methods or focus on particular methods only
- Comparing performance snapshots
- Sampling settings
- Tracing settings
- Threads
- Deadlock detector
- Memory profiling
- Garbage collection
- Monitor profiling
- Exception profiling
- Probes: monitor events of various kinds
- Performance Charts
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Summary, snapshot annotation, automatic deobfuscation
- Time measurement (CPU time, wall time)
- Filters
- Snapshot directory customization
- Export of profiling results to HTML, CSV, XML, plain text
- Profiler Java API
- Profiler HTTP API
- Command line tool to control profiling
- Settings
- FAQ: How to profile in my scenario?
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
.With synchronous and asynchronous periodic sampling, it's possible to measure wall time instead by using
time=wall
.Asynchronous CPU sampling always measures CPU time, the
time
property value is ignored.When starting sampling from the profiler UI, choose the option via Use Preconfigured Settings... or manually edit the property value.
-
Sampling period (synchronous and asynchronous periodic sampling)
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
). -
CPU threshold (asynchronous CPU sampling)
Specify CPU time threshold for asynchronous CPU sampling with
cpu_threshold_ms=<time in milliseconds>
. By default, CPU time threshold is 10 milliseconds.
Configuration file
The settings are stored in the file
<user home>/.yjp/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 methods
Controller.startSampling*(null)
-
trigger actions
StartSampling
,StartAsyncSamplingCpu
,StartAsyncSamplingPeriodic
- the command line tool
You can specify a custom settings file for a particular application
by using the startup option
sampling_settings_path