Methods Summary |
---|
public void | add(JavaObject obj, int old_gen_end)
_total_heap_size += obj.size;
_count++;
_total_size += obj.size;
if (!obj.alive()) {
_dead_size += obj.size;
}
if (obj.address < old_gen_end) {
_old_gen_size += obj.size;
}
|
public int | getAverageSize()
if (_count== 0) return 0;
return _total_size / _count;
|
public int | getCount()return _count;
|
public int | getHeapPercentage()
if (_total_heap_size == 0) return 0;
return (10000*_total_size) / _total_heap_size;
|
public int | getLivePercentage()
if (_total_size == 0) return 0;
return (10000*(_total_size - _dead_size)) / _total_size;
|
public int | getOldGenPercentage()
if (_total_size == 0) return 0;
return (10000*_old_gen_size) / _total_size;
|
public int | getTotalSize()return _total_size;
|
public static void | reset()
_total_heap_size= 0;
|