org.apache.giraph.utils
Class MemoryUtils

java.lang.Object
  extended by org.apache.giraph.utils.MemoryUtils

public class MemoryUtils
extends Object

Helper static methods for tracking memory usage.


Method Summary
static double freeMemoryMB()
          Get free memory in megabytes
static String getRuntimeMemoryStats()
          Get stringified runtime memory stats
static void initMetrics()
          Initialize metrics tracked by this helper.
static double maxMemoryMB()
          Get maximum memory in megabytes
static double totalMemoryMB()
          Get total memory in megabytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

totalMemoryMB

public static double totalMemoryMB()
Get total memory in megabytes

Returns:
total memory in megabytes

maxMemoryMB

public static double maxMemoryMB()
Get maximum memory in megabytes

Returns:
maximum memory in megabytes

freeMemoryMB

public static double freeMemoryMB()
Get free memory in megabytes

Returns:
free memory in megabytes

initMetrics

public static void initMetrics()
Initialize metrics tracked by this helper.


getRuntimeMemoryStats

public static String getRuntimeMemoryStats()
Get stringified runtime memory stats

Returns:
String of all Runtime stats.


Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.