DEV Community

A Mugisha
A Mugisha

Posted on

Java tool to accurately measure object sizes and their hierarchies.

Do people fancy the idea of an agent for measuring the size of objects and their hierarchies? A good example is collections that can grow indefinitely such as Maps. In most cases you don't need to worry about it, but sometimes you may want your app to be responsive the the size of a certain object. So do some people dig the idea or was it time wasted?

Top comments (2)

Collapse
 
wldomiciano profile image
Wellington Domiciano

Perhaps the Java Object Layout (JOL) library might be close to what you're looking for: github.com/openjdk/jol

Collapse
 
a_mugisha profile image
A Mugisha

It's not exactly what am looking for, JOL is more of a profiling tool and provides shallow sizes, am talking of deep size of objects and their hierarchies. I went a dead a developed a tool for that :)