List of usage examples for java.lang.management GarbageCollectorMXBean getMemoryPoolNames
public String[] getMemoryPoolNames();
From source file:com.thoughtworks.go.server.service.support.ServerRuntimeInformationProvider.java
private void gcInfo(List<GarbageCollectorMXBean> garbageCollectorMXBeans, InformationStringBuilder builder) { builder.addSection("GC information"); for (GarbageCollectorMXBean gcBean : garbageCollectorMXBeans) { builder.append(String.format("%s %s %s : %s (Count : Time)\n", gcBean.getName(), Arrays.toString(gcBean.getMemoryPoolNames()), gcBean.getCollectionCount(), gcBean.getCollectionTime())); }/*w w w. j ava 2 s .co m*/ }