Click or drag to resize

ControllerStartSampling Method

Starts CPU sampling.

Namespace:  YourKit.Profiler.Api
Assembly:  YourKit.Profiler.Api (in YourKit.Profiler.Api.dll) Version: 2025.3.143
Syntax
public void StartSampling(
	CpuProfilingSettings settings
)

Parameters

settings
Type: YourKit.Profiler.ApiCpuProfilingSettings
CPU sampling settings.
Exceptions
ExceptionCondition
Exception If CPU profiling cannot be started. Possible reasons:
  • the profiled application has terminated
  • I/O error
Remarks
When sampling is used, the profiler periodically queries stacks and times of running threads to estimate the slowest parts of the code. In this mode method invocation counts are not available.

If CPU profiling is already running, it will reset and start anew.

See Also