on 03-19-2008 2:44 AM
I'm currently doing some memory analysis on a ColdFusion application, for which this tool has been absolutely incredible.
ColdFusion has objects/class in it called CFC's (ColdFusion Component), which behind the scenes are made up of multiple Java Objects.
The Java class for an instance of a CFC is an object of class coldfusion.runtime.TemplateProxy
The TemplateProxy object has a field on it, 'cfcFullyQualifiedName', which stores the class name of the ColdFusion object, e.g. 'security.User'.
Since every CFC instance is a instance of type coldfusion.runtime.TemplateProxy, I'm trying to use OQL to determine how many of each CFC type there is, and how much retained heap each CFC type has.
What I have to begin is:
select toString(t.cfcFullyQualifiedName)
from
coldfusion.runtime.TemplateProxy t
This works very well, as it shows me every type of CFC that is in our system, but I want to be able to get a count of each.
Essentially I want to be able to do something like:
select
count(t) as countInstances,
t.cfcFullyQualifiedName
from
coldfusion.runtime.TemplateProxy t
group by t.cfcFullyQualifiedName
(if I was using regular SQL)
From that count, I would like to get the retained heap on a per cfcFullQualifiedName level - basically doing a retained heap per class, just not a Java Class, but the ColdFusion CFC class.
Looking at the OQL help and the Analyzer, I believe this may be possible, but I can't see any documentation on how to do it, and I couldn't work out how to use the 'define grouping' button.
Any help would be appreciated.
Hello Mark,
We have a query dedicated to exactly this purpose (core/group by value), and I think using it will be the easiest way to get what you want.
Here is what you can do:
1) get to the objects you are interested in. for example, filter the histogram to
coldfusion.runtime.TemplateProxy
2) use the context menu on the TemplateProxy line, and select from there "Core" -> "Group by Value"
3) you will get a box, where you can specify the field you want to group by, i.e. cfcFullyQualifiedName
4) that's all. now execute the query.
The result should be a table, where you have the objects grouped by the value of this field. On this table you can use the context menus on any line to get to the objects in each group, or to calculate the retained set/size (what you wanted).
Let me know if this help.
Regards,
Krum
PS: for the field (3) you can specify a field not directly in the object, e.g. ref1.ref2.ref3.value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.