- System requirements
- Running the profiler
- Profiler activation
- Start profiling
- Connect to profiled application
- Capturing snapshots
- Solving performance problems
- CPU profiling
- CPU usage estimation
- CPU tab
- What-if: an ability to ignore particular methods or focus on particular methods only
- Comparing performance snapshots
- Sampling settings
- Tracing settings
- Memory profiling
- Garbage collection
- Exception profiling
- Probes: monitor higher level events
- Performance Charts
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Summary, snapshot annotation, automatic deobfuscation
- Time measurement (CPU time, wall time)
- Snapshot directory customization
- Export of profiling results to HTML, CSV, XML, plain text
- Profiler API
- Command line tool to control profiling
When the profiler is connected to the profiled application, the toolbar contains the following CPU profiling controls:
|Capture performance snapshot - save the profiling results to a file, for comprehensive analysis|
|Start/Stop CPU profiling|
|Reset recorded CPU profiling results and continue CPU profiling|
CPU profiling modes
|Measured time accuracy||High for long running methods, low for short running methods||Low to high, depending on profiled application and settings|
|Invocation counts||Not available||Available|
|Overhead||Negligible unless high-level profiling is enabled||Low to high, depending on profiled application and settings|
Start CPU profiling
You can start and stop CPU profiling during the execution of your application as many times as you want. When CPU profiling is not running, the profiler adds no performance overhead to application being profiled.
- Connect to the application.
- Choose the profiling mode.
- Click the button to start profiling as shown on the picture:
It may be useful to launch the application with CPU profiling right from the start. Learn more about profiler agent startup options.
Command line tool
Command line tool is designed to control profiling modes in headless environments.
YourKit.Profiler.Api.Controller for each profiling mode has a corresponding method
to start CPU profiling. For example:
var controller = new Controller("localhost", 10001); controller.StartSampling(null);
Profiler built-in triggers allow to start CPU profiling on high CPU usage, periodically, or by other conditions.
When CPU profiling is started, the results are immediately available in Call tree - All threads merged, Flame graph and Method list sections on CPU tab.
In case of CPU tracing, both method times and invocation counts are shown. In case of CPU sampling, only times are shown.
The live view provides only basic information. To perform comprehensive analysis, capture performance snapshot, open it and use the full featured CPU tab.
Finish measuring and get the results
When the task you intended to profile has finished (or has performed for a sufficient amount of time), capture a performance snapshot with all the recorded information.
When this is done from the profiler UI, you can open the results for immediate analysis.
Further topics in this section describe the profiler's UI for analyzing CPU profiling results.