highlighting "my" code in CPU views

Questions about YourKit Java Profiler
Post Reply
plethora
Posts: 314
Joined: Thu Jun 02, 2005 8:36 pm

highlighting "my" code in CPU views

Post by plethora »

In views like "CPU usage estimation", I typically methods from the project I work on intermixed with methods from the JDK, Hibernate, Spring and other infrastructure code.
The built-in filters feature of YourKit helps to reduce the noise somewhat, but it's not perfect. In some cases I do not want to filter out specific third-party infrastructure code, because it's relevant to better understand the full context of the execution (transaction management, for example).

Perhaps it would be helpful if I could configure YourKit to display rows or cells in such treeviews with a different (background?) color, when they relate to classes/methods from a specific package (and subpackages). For example, if all elements under "com.somecompany" would have a visual distinction, I would give a nice visual aid to recognize specific elements in the call stack(s) relating to "our" code.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: highlighting "my" code in CPU views

Post by Anton Katilin »

Hi Taras

Just a note: if you turn off "Settings | Collapse Filtered Calls" the stacks will be shown in full, but the methods matching filters will still be marked with a hollow arrow. The hollow vs filled arrow mark is not exactly what you asked about, but I think it still may be useful.

Also, we are thinking about a feature which will allow to expand particular collapsed filtered node. It may be a link inside the row and/or a popup menu item. By default, filtered calls will be collapsed, as they now are, but you will be able to expand particular call of interest without touching the entire tree.
Perhaps it would be helpful if I could configure YourKit to display rows or cells in such treeviews with a different (background?) color, when they relate to classes/methods from a specific package (and subpackages). For example, if all elements under "com.somecompany" would have a visual distinction, I would give a nice visual aid to recognize specific elements in the call stack(s) relating to "our" code.
Should it be something like "Highlight Package" working on current selection, or a bunch of actions for sub-packages, e.g.

"Highlight com.somecompany",
"Highlight com.somecompany.foo",
"Highlight com.somecompany.foo.bar"

if invoked on com.somecompany.foo.bar.SomeClass?

It could also automatically partially expand the collapsed code, if necessary, to show hidden occurrences of the package.

Best regards,
Anton
plethora
Posts: 314
Joined: Thu Jun 02, 2005 8:36 pm

Re: highlighting "my" code in CPU views

Post by plethora »

Hi Anton,

I use the "filters" feature quite heavily. Being able to expand collapsed filters sounds like a nice enhancement.

The main thing for me is to have an easy visual distinction between "our code" and "everything else" (which will likely be partially filtered already).
In large call stacks, the amount of visual elements is huge, and having a visual cue allows me to quickly visually recognize classes from the project I work on would help, I think.
In essence, my brain needs to spend less time reading the package and class names when browsing over the presented information.

Regarding UI, I was thinking more about a configuration option to associate "com.somecompany" (and everything below) with a specific color. That color would then be used whenever elements from "com.somecompany" are presented in the UI (either as a background color, foreground color, or perhaps a custom icon color overlay).
I could also imagine using such a feature to, for example, configure a color for all Hibernate code, or all Spring code.

Kind regards,
Taras
Post Reply