Start CPU profiling.
Namespace:
YourKit.Profiler.Api
Assembly:
YourKit.Profiler.Api (in YourKit.Profiler.Api.dll) Version: 4.0.9.426 (4.0.9.426)
Syntax
| C# |
|---|
public void StartCPUProfiling(
long mode,
string filters,
string wallTimeSpec
) |
| Visual Basic (Declaration) |
|---|
Public Sub StartCPUProfiling ( _
mode As Long, _
filters As String, _
wallTimeSpec As String _
) |
Parameters
- mode
- Type: System..::.Int64
CPU_SAMPLING or CPU_TRACING
- filters
- Type: System..::.String
String containing '\n'-separated list of classes
whose methods should not be profiled.
Alternatively, you may want to profile only particular methods; in this case,
add '+' at the beginning of filters.
Wildcards are accepted in identifier names ('*').
More methods are profiled, bigger the overhead.
The filters are used with CPU_TRACING only; with CPU_SAMPLING
the value is ignored.
If null or empty string passed, all methods will be profiled (not recommended due to high overhead).
Use DEFAULT_FILTERS unless you want to specify your custom settings.
Read about filters.
- wallTimeSpec
- Type: System..::.String
For which methods should wall time be measure instead of CPU time.
Use DEFAULT_WALLTIME_SPEC unless you want to specify your custom settings.
Please read more about time measurement.
Exceptions
| Exception | Condition |
|---|
| System..::.Exception |
If capture failed. The possible reasons are:
-
there's no application with properly configured profiler agent
listening on port at host
-
CPU profiling is already running
-
profiled application has terminated
-
agent cannot capture snapshot for some reason
-
I/O failure
|
See Also