- System requirements
- Profiler architecture
- Profiler installation
- Uninstall profiler
- Running the profiler
- Profiler activation
- Welcome screen
- Start profiling
- Profiling overhead
- Snapshots
- Solving performance problems
- CPU profiling
- Thread profiling
- Object allocation profiling
- Memory profiling
- Exception profiling
- Telemetry
- Probes: monitor higher level events
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Automatic deobfuscation
- Summary, automatic deobfuscation
- Filters
- Profiler command line
- Command line tool to control profiling
- Export of profiling results to external formats
- Profiler .NET API
- Profiler HTTP API
- Settings
- Troubleshooting
CPU profiling modes
YourKit .NET Profiler provides a variety of CPU profiling modes to cater to different performance analysis requirements. Choosing the right profiling mode depends on your specific needs and the trade-offs you are willing to make between detail level, performance overhead, and analysis complexity. Here's an overview of CPU profiling modes, and when you might want to use each:
CPU usage estimation or statistical profiling
Statistical profiling is a specialized form of CPU sampling where the sampling rate is kept deliberately low. Unlike traditional sampling, which aims for higher-frequency stack samples to capture more detail, statistical profiling focuses on long-term behavior by sampling the call stack at infrequent intervals. This allows for a broader view of the application's performance, making it easier to identify long-term trends and aggregate bottlenecks.
Advantages:
- Extremely low performance overhead
- Useful for identifying broader performance trends
- Easy to run in the production environment
Disadvantages:
- Not suitable for capturing short-lived or rare events
- Estimations may be less precise due to the low sample rate
Lear more about CPU estimation
CPU sampling
Profiler takes periodic snapshots of a program's call stack at fixed intervals. This approach is less intrusive compared to tracing and typically introduces less overhead. However, the data may not be as detailed, and you may miss short-lived or infrequently called functions.
Advantages:
- Lower performance overhead
- Easier data analysis
Disadvantages:
- Less detailed than tracing
- May miss short-lived or rare events
CPU tracing
In this mode, the profiler captures a detailed, chronological trace of all function calls made during the program’s execution. This allows you to get an exact account of which functions were called, how often, and in what sequence. However, CPU tracing can introduce significant overhead, making the application slower during the profiling period. The data obtained is often extensive, requiring a lot of effort to analyze.
Advantages:
- High detail level
- Complete chronological history
Disadvantages:
- Significant performance overhead