【发布时间】:2011-10-20 23:32:33
【问题描述】:
我有一个很长的操作想要在 JProfiler 中进行分析(或其他建议),但该方法非常递归,因此 CPU View 中的树形视图并没有太大帮助。它向我显示 CPU 时间是这样的:
beginOperation 100%
|- recursiveMethod 99%
| | - recursiveMethod 98%
| | | - recursiveMethod 97%
| | | | - ...more recursion
| | |- otherMethods 1%
| | - otherMethod 1%
| - otherMethods 1%
你看,recursiveMethod 真的不需要任何时间。相反,它的otherMethods 占用了时间,并且是我想要描述的那些。我的理想视图会显示 recursiveMethod 的时间接近 0%,而 otherMethods 的组合时间接近 100%。
那么在 JProfiler 中是否有任何方法可以将这个视图向上滚动,以便我可以更清楚地查看我的 CPU 时间花费在哪里?有没有人建议另一个可以做到这一点的分析器?
注意:我使用的是 JProfiler 6,但如果其他版本可以这样做,则可能会升级。
谢谢!
【问题讨论】:
标签: java recursion profiling rollup jprofiler