Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 VisualVM 来查找所有时间都用于特定呼叫的位置。我发现大部分时间都在数据库调用中,但 profier 显示 85% 的时间是 java.lang.Object 而只有 15% 是在 DB 调用中。
我读错了吗?
包含数据的列是时间、时间 (CPU)、调用。
看起来大部分时间都花在了 Object.wait() 上。Time 和 Time(CPU) 之间的差异在特定列的工具提示中进行了描述。Time(CPU) 是实际 CPU 使用率的近似值,而 Time 是挂钟时间。因此对于 Object.wait(),Time(CPU) 始终为零,因为它只等待而不使用 CPU。