Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to sum @retainedHeapSize with oql in the Eclipse Memory Analyzer Tool

Tags:

java

eclipse

oql

Have you used MAT(Memory Analyzer Tool) from eclipse. it's really cool.(1.5G heap dump file kill jhat, ibm's heap dump analyzer with OOME). MAT is alive and fast and beautiful and powerful.

I wonder how much the ehcahce key's memory size is, so write oql below.

SELECT c.key.@retainedHeapSize 
FROM net.sf.ehcache.store.compound.HashEntry c 

Unfortunately, the group function like sum(), max(), min() does't exist. I export total result row(about 60,000) to excel file and sum in the excel sheet.

Do you have the tip or hidden(?) function/feature about using group function(like sum())?

like image 920
uuidcode Avatar asked Jun 29 '11 09:06

uuidcode


People also ask

How do I use memory analyzer in Eclipse?

Use the Eclipse Memory Analyzer You may need to refresh your project (F5 on the project). Double-click the file and select the Leak Suspects Report. The overview page allows you to start the analysis of the heap dump. The dominator tree gives quickly an overview of the used objects.

What is dominator tree in heap dump?

The dominator tree is used to identify the retained heap. It is produced by the complex object graph generated at runtime and helps to identify the largest memory graphs. An Object X is said to dominate an Object Y if every path from the Root to Y must pass through X.

What is Eclipse Memory Analyzer free?

The Eclipse Memory Analyzer is a fast and feature-rich Java heap analyzer that helps you find memory leaks and reduce memory consumption.

Is Eclipse MAT free?

The Eclipse Memory Analyzer Tool (MAT) is a free and open source Java heapdump analysis tool for issues such as OutOfMemoryErrors and heap sizing.


1 Answers

You can generate a Histogram from the OQL results - select the "Show as Histogram" icon. From this histogram you can calculate the retained size using the "Calculate Precise Retained Set" icon.

like image 111
Liam Mooney Avatar answered Sep 23 '22 01:09

Liam Mooney