开发者

jprofiler or other: how do I roll up recursive method calls?

I have a long operation that I want to profile in JProfiler (or other suggestions), but the method is very recursive, so the tree view in CPU View doesn't help very much. It shows me CPU times like this:

beginOperation 100%
|- recursiveMethod 99%
| | - recursiveMethod 98%
| | | - recursiveMethod 97%
| | | | - ...more recursion
| | |- otherMethods 1%
| | - otherMethod 1%
| - otherMethods 1%

You see, the recursiveMethod really doesn't take any time at all. Rather, its the otherMeth开发者_JS百科ods that take up time, and are the ones I want to profile. My ideal view would show recursiveMethod having next to 0% time, and the otherMethods combining to near 100%.

So is there any way in JProfiler to roll this view up so that I can view where my CPU time is being spent more clearly? Does anyone have a suggestion for another profiler that can do this?

Note: I am using JProfiler 6, but could potentially upgrade if another version could do this.

Thanks!


JProfiler has a 'Hot Spots' view useful for gathering these types of performance metrics. To get to this view, go to 'CPU Views' on the left hand navigation and 'Hot Spots' should be the second button the left at the bottom of the application window. (These instructions are based on JProfiler 5, but I believe this is the same on version 6).

You can sort by inhernet time (probably what you're looking for), average time and invocations and then follow the call stack up from where those expensive calls were made. At the top of the view, there's also a drop down to change the 'Hot Spot Type', so you can look at the time consumed by JDBC queries, invoked URL and many other options.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜