VisualVM中的时间和时间(CPU)有什么区别 [英] What the difference between Time and Time(CPU) in VisualVM

查看:62
本文介绍了VisualVM中的时间和时间(CPU)有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 VisualVM 来查找特定调用所花费的时间.我发现大部分时间都在数据库调用中,但是 profier 显示 85% 的时间是 java.lang.Object 而只有 15% 的时间在 DB Call 中.

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 Call.

我读错了吗?

包含数据的列是时间、时间 (CPU)、调用.

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

推荐答案

看起来大部分时间都花在了 Object.wait() 上.Time 和 Time(CPU) 之间的差异在特定列的工具提示中进行了描述.Time(CPU) 是实际 CPU 使用率的近似值,而 Time 是挂钟时间.因此对于 Object.wait(),Time(CPU) 始终为零,因为它只等待而不使用 CPU.

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.

这篇关于VisualVM中的时间和时间(CPU)有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆