- System requirements
- Profiler architecture
- 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
- Profiler HTTP API
- Command line tool to control profiling
Sampling is one of the CPU profiling modes.
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.
Use profiler toolbar to start CPU sampling as shown on the picture below. There are also alternate methods to start CPU profiling.
Sampling is typically the best option when your goal is to locate and discover performance bottlenecks. With sampling, the profiler adds virtually no overhead to the profiled application. However, the probes for the high-level statistics, if enabled, may impose additional overhead.
See also: Profiling overhead: how to reduce or avoid.
You can configure some CPU sampling aspects with CPU sampling settings.