Does "total time (CPU)" column in CPU profiler tab of Java VisualVM contain time which CPU spent executing other processes?
For instance, let's consider such situation:
- I run a program in which I have a method called myMethod() which does some computation. This computation takes 2 seconds - so if a CPU does nothing but only executes my code, then executing this method takes 2 seconds.
While I was profiling my application, CPU was executing several processes - my process and some other process as well (for instance, I had a browser running, or something like this).
CPU has started myMethod(), it was executing this method for some time, then started executing a browser's process and spent 1 second there, then again came back to executing myMethod() and has finished it. So between start of myMethod() and its end 3 seconds has passed, but only 2 seconds were used for executing myMethod().
Which time will be shown in "total time (CPU)" column in CPU profiler tab of Java VisualVM - 2 seconds or 3 seconds?