开发者

What the difference between Time and Time(CPU) in VisualVM

I was using VisualVM to find where all the time was being spent for a particular call. I found that most the time was in a database call, but the profier shows that 85% of the time was java.lang.Object and only 15% in the DB Cal开发者_如何学JAVAl.

Am I reading something wrong?

The columns with data are Time, Time (CPU), Invocations.

What the difference between Time and Time(CPU) in VisualVM


It looks like most of the time is spend in Object.wait(). The difference between Time and Time(CPU) is described in the tooltip for particular column. Time(CPU) is an approximation of real CPU usage, while Time is wall-clock time. So for Object.wait(), Time(CPU) is always zero, since it only waits and does not use CPU.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜