public static double heapSize(Iterable<ClusterNode> nodes,int precision){
  double heap=0.0;
  for (  ClusterNode n : nodesPerJvm(nodes)) {
    ClusterMetrics m=n.metrics();
    heap+=Math.max(m.getHeapMemoryInitialized(),m.getHeapMemoryMaximum());
  }
  return roundedHeapSize(heap,precision);
}

public static double heapSize ( Iterable < ClusterNode > nodes , int precision ) { double heap = 0.0 ; for ( ClusterNode n : nodesPerJvm ( nodes ) ) { ClusterMetrics m = n . metrics ( ) ; heap += Math . max ( m . getHeapMemoryInitialized ( ) , m . getHeapMemoryMaximum ( ) ) ; } return roundedHeapSize ( heap , precision ) ; }
gets total heap size in gb rounded to specified precision .
