我有一个很长的操作,我想在 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,但如果另一个版本可以做到这一点,则可能会升级。
谢谢!