Total method time in Java VisualVM

前端 未结 7 870
野趣味
野趣味 2020-12-04 21:09

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

相关标签:
7条回答
  • 2020-12-04 21:51

    There's a simple way to get total time of a routine as a percent of wall-clock execution time (rather than milliseconds). Just use ctrl-break to get a bunch of stackshots while you're waiting for it. The fraction of them containing the routine is the % of time it takes. The accuracy depends on how many shots you take. If you're just looking for where the problems are, you don't need precision time measurement. Here's a short explanation of how it works.

    0 讨论(0)
提交回复
热议问题