|
Description
Krum Tsvetkov
One minor enhancement would be to ensure we use IContextObjectSet where appropriate not IContextObject e.g. in LeakHunter getHistogramOfDominated then modify HTMLOutputer to have an additional query listing say the first 10 objects or the OQL command if appropriate. The HTMLOutputter could be enhanced to show more information from a StructuredResult If there is a list of objects from IContextObjectSet.getOQL then return a link for this, else if IContextObjectSet.getObjects then return a query for the first 10 objects. first 10 of 30 objects or 7 objects If there are alternate contexts from ResultMetaData.getContextProviders() then we can provide this information too. Perhaps we should skip a context if it returns the same data as the base IContext. For example, ClassLoaderExplorer has Class Loader and Defined Classes contexts, but the Class Loader context is the same as the base context. Should there by a URI for multiple objects? The query context menu would then appear for them, rather than running a query to display them all. Is the MAT protocol suitable for when there are multiple snapshots? It doesn't have the snapshot name, so this must be obtained from elsewhere. I've updated HtmlOutputter
If there are multiple contexts then these are also displayed, presuming they
are not simple contexts with the same object id as the base context.
If there is a context object set with at least one object then if there are <= 10 then all the objects are linked via a list_objects query
All {0} objects
else if there is an OQL this is used via the OQL query
All objects
else via the list_objects query
First 10 of {1} objects
For example a immediate dominators report can now say:
sun.security.provider.Sun
Objects
All 1 objects
Dominated Objects
First 10 of 23 objects
Is this a useful first step?
We could show more commands in the report, if available, as links to rerunning a part of the report.
If there is a QuerySpec with a command and a result of a SectionSpec then the report generation code converts the SectionSpec to a SectionPart based on the QuerySpec, but the command is lost. The command cannot then be shown in the report.
Perhaps SectionPart should also hold a command in this situation.
If the command contains a ${} expansion for OQL then this gets lost by the params conversion.
E.g. a command such as
list_objects SELECT OBJECTS s FROM OBJECTS ${snapshot}.getImmediateDominatedIds(-1) s;
goes to
list_objects SELECT OBJECTS s FROM OBJECTS null.getImmediateDominatedIds(-1) s;
Perhaps unrecognized vars should not be substituted, or replaced with the empty string, and the substitution only done for executed commands.
Adding getCommand to a SectionPart generated from a QuerySpec gives more links in the leak suspects report:
Leaks
System Properties
Thread Overview
Top Consumers
Class Histogram
all then have links.
We can avoid problems with ${snapshot} being substituted by changing it to $ {snapshot} with a space between $ and {. The OQL parser handles that, the parameter substitution in the report generation ignores that.
The leak suspects report could do with more commands from the different parts - possibly by adding QuerySpec wrappers to the results. New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170435 New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170437 Gerrit change https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170437 was merged to [master]. Commit: http://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=9f1ff7e3afebbbe7968370d1f08506f4813a1efa New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170442 Gerrit change https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170442 was merged to [master]. Commit: http://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=9c666089d848cb997114ec3092fd45651b8e3a65 I've added some more links to the Top Consumers report when running on the whole heap. I have also improved the HTML charts. There was an <area> section for the pie chart showing the labels in the legend. It wasn't always in the right place with Windows high res displays - though rescaling coords in <area> doesn't seem the right solution as there should be a better way in BIRT. I have now added an mat:// link if the pie slice has an associated object ID and given alternative text for the labels <area> and the whole image. I have improved the tooltip/hover text for pie chart labels to show the size too. For collapsible sections I change the words from 'hide / unhide' when it is open to 'unhide / hide' when it is closed as that is useful when using a screen reader. Do we need to do any more - or are the links in the existing HTML reports sufficient? New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170515 Gerrit change https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170515 was merged to [master]. Commit: http://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=cddf1d1329872a2111d2ef11db32e6b0345c78f2 >Do we need to do any more - or are the links in the existing HTML reports sufficient?
I think they are sufficient.
New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170543 Gerrit change https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/170543 was merged to [master]. Commit: http://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=c8b7ea499e92a44ef4d69d247405c1cc84c968dc Created attachment 284409 [details]
Links from Pie Chart
Showing a area hotspot link from the legend of a pie chart in an HTML report
Marking this as done. For new and noteworthy, note the extra links on reports and the first 10 objects available from IContextObjectSet. Also the tooltips and mat:// links now work on Pie Chart images on HTML reports |