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 will be reflected in your profiling results.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.