Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
437 views
in Technique[技术] by (71.8m points)

profiling - Total method time in 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.)

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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.

(The above information is based on VisualVM 1.3.1)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...