开发者

Does the NetBeans CPU Profiler use Wall Clock Time or CPU Time?

Does the NetBeans CPU Profiler use Wall Clock Time or CPU Time? This is important to know, for example, when thinking about how I/O w开发者_如何学Goill be reflected in your profiling results.


The NetBeans default is to use wall clock ("absolute") time for all method timing calculations. A CPU time approach is available, but currently only on Solaris. If CPU time is desired, it can be enabled from the "Advanced settings" area in the "Attach Profiler" window. (The option is called "Use thread CPU timer (Solaris only).")

Regardless of which timer setting is chosen, that setting applies globally to all classes/methods. (For contrast, YourKit allows you to time certain methods using CPU time but other methods using wall clock time.)

Note that, regardless of timer mode, NetBeans does correct its timing info to take into account profiler overhead.

As for I/O: With the default (wall clock) setting, method timings will theoretically include time spent blocking on I/O operations.

More details about the timer options can be found at http://wiki.NetBeans.org/FaqProfilerUsingTimers. I found it helpful to consult that page together with http://wiki.netbeans.org/FaqProfilerSampledInstrumentation, which describes how instrumentation works in both "Exact Call Tree and Timing" mode and "Exact Call Tree, Sampled Timing" mode.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜