public static void printClassStats(MemoryStats tracker) { String[] classes = tracker.getClassNames(); int n = classes.length; System.out.println("class_stats["+n+"]:"); for (int i = 0 ; i < n; i++) { String cl = classes[i]; ClassTracker ct = tracker.getClassTracker(cl); System.out.println(ct); System.out.println("update("+cl+")");  InstanceStats[] ignoreme = ct.update(); ClassStats cs = ct.getOverallStats(); long instances = cs.getInstances(); long collected = cs.getGarbageCollected(); System.out.println( "  type="+cl+ "\n    instances:           "+instances+ "\n    gc'ed:               "+collected+ "\n    total:               "+(instances + collected)+ "\n    total_size:          "+cs.getTotalSize()+ "\n    total_capacity:      "+cs.getTotalCapacity()+ "\n    mean_size:           "+getMeanSize(cs)+ "\n    mean_capacity:       "+getMeanCapacity(cs) ); }
public static void printClassStats(ClassTracker ct) { ClassStats cs = ct.getOverallStats(); int bytes_each = ct.getObjectSize(); long live = cs.getInstances(); long dead = cs.getGarbageCollected(); long sum_capacity_bytes = cs.getSumCapacityBytes(); long mem = (live * bytes_each + sum_capacity_bytes); System.out.println( ct.getClassName()+"{"+ "\n  memory:             "+mem+ "\n  live:               "+live+ "\n  gc'ed:              "+dead+ "\n  total:              "+(live + dead)+ "\n  sum_size:           "+cs.getSumSize()+ "\n  sum_capacity_count: "+cs.getSumCapacityCount()+ "\n  sum_capacity_bytes: "+sum_capacity_bytes+ "\n}" );
  public static void printClassStats(MemoryStats tracker) {    String[] classes = tracker.getClassNames();    int n = classes.length;    System.out.println("class_stats["+n+"]:");    for (int i = 0 ; i < n; i++) {      String cl = classes[i];      ClassTracker ct = tracker.getClassTracker(cl);      System.out.println(ct);      System.out.println("update("+cl+")");      // force an update      InstanceStats[] ignoreme = ct.update();      ClassStats cs = ct.getOverallStats();      long instances = cs.getInstances();      long collected = cs.getGarbageCollected();      System.out.println(          "  type="+cl+          "\n    instances:           "+instances+          "\n    gc'ed:               "+collected+          "\n    total:               "+(instances + collected)+          "\n    total_size:          "+cs.getTotalSize()+          "\n    total_capacity:      "+cs.getTotalCapacity()+          "\n    mean_size:           "+getMeanSize(cs)+          "\n    mean_capacity:       "+getMeanCapacity(cs)          );    }  }