Java VisualVM中的总方法时间 [英] Total method time in Java VisualVM

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

问题描述

在Java VisualVM中,有没有办法显示总方法时间,而不是自我时间? (后者不是特别有用,因为它没有告诉你任何方法实际运行的时间。)

In Java VisualVM, is there any way to display total method time, rather than "self time"? (The latter is not particularly useful, since it doesn't tell you anything about how much time methods actually take to run.)

如果没有,是否有任何独立的免费Java分析器确实计算总方法时间?

If not, is there any standalone free Java profiler that does calculate total method time?

推荐答案

在快照视图中查看跟踪数据可以让您看到总和以及自我时间。

Looking at the trace data in a "snapshot" view allows you to see the total as well as the self time.

按下关于结果表的快照按钮。这将创建一个包含调用树视图的新选项卡,该视图可以分解自我与总时间。 组合视图还提供此信息,但使用类似于标准概要分析视图的热点视图拆分屏幕空间。

Press the "snapshot" button that appears about the table of results. This will create a new tab that contains a "Call Tree" view which breaks down the self vs. total time. The "combined" view also provides this information, but splits the screen space with a "Hot Spots" view that is similar to the standard profiling view.

可以从标准的Profiler或Sampler数据创建快照。但是,Profiler快照只能在应用程序关闭之前创建,而Sampler快照可以随时创建。

Snapshots can be created from either standard "Profiler" or "Sampler" data. However, "Profiler" snapshots can only be created before the application is closed, while "Sampler" ones can be created at any time.

(以上信息基于VisualVM 1.3.1)

(The above information is based on VisualVM 1.3.1)

这篇关于Java VisualVM中的总方法时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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