What's the difference between selecting a time range in the "live" CPU view, and inspecting the data in "CPU Usage Estimation" pane, versus capturing a CPU snapshot using the sampling method?
Does CPU sampling provide a higher sample frequency, thus generating possibly more accurate results?
Difference between "CPU Usage Estimation" and sampling
-
- Posts: 314
- Joined: Thu Jun 02, 2005 8:36 pm
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Difference between "CPU Usage Estimation" and sampling
1. Both use the sampling approach. Usage estimation samples are obtained in the telemetry thread, the period between samples is 1 second by default. Sampling's default period is smaller - 20 ms, it uses a dedicated sampler thread. Roughly speaking, the sampling's accuracy is approximately 50 times higher.
2. Usage estimation always uses thread CPU times. CPU sampling measures CPU or wall time, depending on the settings:
http://www.yourkit.com/docs/java/help/times.jsp
3. CPU sampling results may include high-level EE statistics, if corresponding probes are enabled:
http://www.yourkit.com/docs/java/help/c ... _level.jsp
4. Usage estimation allows to select an arbitrary time sub-range (of course, respecting available samples). CPU sampling results are always cumulative: if sampling started at a time point t1 and ended at a time point t2, you always get the summary of method execution for entire (t1;t2), you can't, for example, see what happened in the first half only.
2. Usage estimation always uses thread CPU times. CPU sampling measures CPU or wall time, depending on the settings:
http://www.yourkit.com/docs/java/help/times.jsp
3. CPU sampling results may include high-level EE statistics, if corresponding probes are enabled:
http://www.yourkit.com/docs/java/help/c ... _level.jsp
4. Usage estimation allows to select an arbitrary time sub-range (of course, respecting available samples). CPU sampling results are always cumulative: if sampling started at a time point t1 and ended at a time point t2, you always get the summary of method execution for entire (t1;t2), you can't, for example, see what happened in the first half only.