phatak-dev / java-sizeof   0.1

Apache License 2.0 GitHub

Memory consumption estimator for Scala/Java

Scala versions: 2.11 2.10

This is a memory consumption estimator for Scala/Java. This library is ported from Spark project.

Dependency

###Sbt

libraryDependencies += "com.madhukaraphatak" %% "java-sizeof" % "0.1"

supported for both 2.10 and 2.11.

###Maven

 <dependency>
 <groupId>com.madhukaraphatak</groupId>
 <artifactId>java-sizeof_2.11</artifactId>
 <version>0.1</version>
 </dependency>

Usage

For any object, estimate object size by calling

SizeEstimator.estimate(obj);

For more examples look at examples folder.