Class MemoryUsageStress
java.lang.Object
org.jboss.test.clusterbench.common.load.MemoryUsageStress
Stressing MemoryUsageStress
- Author:
- Michal Babacek Some reading: http://docs.oracle.com/javase/6/docs/api/java/lang/management/MemoryUsage.html http://stackoverflow.com/questions/3422557/sun-jvm-committed-virtual-memory-high-consumption
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetStats()longstressSystemMemory(int megabytes, int milliseconds) stressSystemMemory JVM will be forced to put up a specified number of megabytes, thus affecting both memory allocated for JVM already and possible the physical memory as well (in case JVM will have to ask for more memory up to the maxMem constant).
-
Constructor Details
-
MemoryUsageStress
public MemoryUsageStress()
-
-
Method Details
-
stressSystemMemory
stressSystemMemory JVM will be forced to put up a specified number of megabytes, thus affecting both memory allocated for JVM already and possible the physical memory as well (in case JVM will have to ask for more memory up to the maxMem constant).- Parameters:
megabytes-milliseconds-- Returns:
- status before and after the stress
-
getFreePhysical
- Throws:
JMException
-
getTotalPhysical
- Throws:
JMException
-
getHeapMem
-
getNonHeapMem
-
getStats
- Throws:
JMException
-